From 5a1b98d8b7ced255d83a09d038e870f33251d59b Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 17 Jun 2024 09:27:15 +0100 Subject: [PATCH] Improve accessibility of the room summary card (#12586) * Improve accessibility of the room summary card Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update @vector-im/compound-web to 4.5.0 Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update snapshots Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Fix bad merge Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --------- Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- .../views/right_panel/RoomSummaryCard.tsx | 105 +- .../RoomSummaryCard-test.tsx.snap | 1665 +++++++++-------- 2 files changed, 898 insertions(+), 872 deletions(-) diff --git a/src/components/views/right_panel/RoomSummaryCard.tsx b/src/components/views/right_panel/RoomSummaryCard.tsx index b259d5e3ad..a8c5a85478 100644 --- a/src/components/views/right_panel/RoomSummaryCard.tsx +++ b/src/components/views/right_panel/RoomSummaryCard.tsx @@ -522,57 +522,68 @@ const RoomSummaryCard: React.FC = ({ room, permalinkCreator, onClose, on - tagRoom(room, DefaultTagID.Favourite)} - // XXX: https://github.com/element-hq/compound/issues/288 - onSelect={() => {}} - /> - inviteToRoom(room)} - /> - - +
+ tagRoom(room, DefaultTagID.Favourite)} + // XXX: https://github.com/element-hq/compound/issues/288 + onSelect={() => {}} + /> + inviteToRoom(room)} + /> + + - - - {!isVideoRoom && ( - <> - - - {pinningEnabled && ( + + + {!isVideoRoom && ( + <> + - - {pinCount} - - - )} - - - )} + Icon={PollsIcon} + label={_t("right_panel|polls_button")} + onSelect={onRoomPollHistoryClick} + /> + {pinningEnabled && ( + + + {pinCount} + + + )} + + + )} - + - + +
{SettingsStore.getValue(UIFeature.Widgets) && !isVideoRoom && diff --git a/test/components/views/right_panel/__snapshots__/RoomSummaryCard-test.tsx.snap b/test/components/views/right_panel/__snapshots__/RoomSummaryCard-test.tsx.snap index 58566b8a32..afe08bacb5 100644 --- a/test/components/views/right_panel/__snapshots__/RoomSummaryCard-test.tsx.snap +++ b/test/components/views/right_panel/__snapshots__/RoomSummaryCard-test.tsx.snap @@ -124,288 +124,293 @@ exports[` has button to edit topic when expanded 1`] = ` role="separator" />