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:
Florian Duros
2026-04-30 16:32:43 +02:00
committed by GitHub
parent a7ab72af11
commit c2e5aa7adc
16 changed files with 392 additions and 14 deletions
@@ -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",
},
};