-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(frontend): refactor ChatMessageFooter and bubble components to la…
…yout children rather than knowing implementation details
- Loading branch information
Showing
23 changed files
with
413 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 0 additions & 19 deletions
19
frontend-new/src/chat/chatMessage/components/chatMessageFooter/ChatMessageFooter.stories.tsx
This file was deleted.
Oops, something went wrong.
57 changes: 57 additions & 0 deletions
57
...new/src/chat/chatMessage/components/chatMessageFooter/ChatMessageFooterLayout.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import type { Meta, StoryObj } from "@storybook/react"; | ||
import ChatMessageFooter from "./ChatMessageFooterLayout"; | ||
import Timestamp from "./components/timestamp/Timestamp"; | ||
import { VisualMock } from "src/_test_utilities/VisualMock"; | ||
import { ConversationMessageSender } from "src/chat/ChatService/ChatService.types"; | ||
|
||
const meta: Meta<typeof ChatMessageFooter> = { | ||
title: "Chat/ChatMessageFooter/Layout", | ||
component: ChatMessageFooter, | ||
tags: ["autodocs"], | ||
}; | ||
|
||
export default meta; | ||
|
||
type Story = StoryObj<typeof ChatMessageFooter>; | ||
|
||
export const ShownWithTimestampCompassSender: Story = { | ||
args: { | ||
sender: ConversationMessageSender.COMPASS, | ||
children: <Timestamp sentAt={new Date().toISOString()} />, | ||
}, | ||
} | ||
export const ShownWithTimestampUserSender: Story = { | ||
args: { | ||
sender: ConversationMessageSender.USER, | ||
children: <Timestamp sentAt={new Date().toISOString()} />, | ||
}, | ||
} | ||
|
||
export const OneFullWidthChild: Story = { | ||
args: { | ||
children: <VisualMock text={"only child"} />, | ||
}, | ||
}; | ||
export const OneFixedWidthChild: Story = { | ||
args: { | ||
children: <VisualMock maxWidth={"200px"} text={"only child"} />, | ||
}, | ||
} | ||
|
||
export const MultipleFullWidthChildren: Story = { | ||
args: { | ||
children: [ | ||
<VisualMock text={"child 1"} key={"1"}/>, | ||
<VisualMock text={"child 2"} key={"2"}/>, | ||
], | ||
}, | ||
}; | ||
|
||
export const MultipleFixedWidthChildren: Story = { | ||
args: { | ||
children: [ | ||
<VisualMock maxWidth={"200px"} text={"child 1"} key={"1"}/>, | ||
<VisualMock maxWidth={"200px"} text={"child 2"} key={"2"}/>, | ||
], | ||
}, | ||
}; |
Oops, something went wrong.