mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-12-03 12:49:30 +00:00
Room list: add collapse/expand all sections (#33318)
* chore: update compound design tokens * feat(sc): add collapse/expand button to room list header * feat: add new events to broadcast section state * feat(vm): add expand/collpase event to room list events * test: add e2e tests * chore: fix company name in copyright * chore: use two differant actions for collapse/expand * Update apps/web/src/viewmodels/room-list/RoomListHeaderViewModel.ts Co-authored-by: Michael Telatynski <7t3chguy@gmail.com> * test: fix existing tests --------- Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
+9
@@ -31,6 +31,7 @@ const RoomListHeaderViewWrapperImpl = ({
|
||||
sort,
|
||||
toggleMessagePreview,
|
||||
createSection,
|
||||
collapseOrExpandSections,
|
||||
...rest
|
||||
}: RoomListHeaderProps): JSX.Element => {
|
||||
const vm = useMockedViewModel(rest, {
|
||||
@@ -44,6 +45,7 @@ const RoomListHeaderViewWrapperImpl = ({
|
||||
openSpacePreferences,
|
||||
toggleMessagePreview,
|
||||
createSection,
|
||||
collapseOrExpandSections,
|
||||
});
|
||||
return <RoomListHeaderView vm={vm} />;
|
||||
};
|
||||
@@ -65,6 +67,7 @@ const meta = {
|
||||
openSpacePreferences: fn(),
|
||||
toggleMessagePreview: fn(),
|
||||
createSection: fn(),
|
||||
collapseOrExpandSections: fn(),
|
||||
},
|
||||
parameters: {
|
||||
design: {
|
||||
@@ -109,3 +112,9 @@ export const PlusIcon: Story = {
|
||||
useComposeIcon: false,
|
||||
},
|
||||
};
|
||||
|
||||
export const CollapseSections: Story = {
|
||||
args: {
|
||||
collapseSections: "collapse",
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user