diff --git a/playwright/e2e/polls/pollHistory.spec.ts b/playwright/e2e/polls/pollHistory.spec.ts index e9ebf0a30db1..20a8b912fea0 100644 --- a/playwright/e2e/polls/pollHistory.spec.ts +++ b/playwright/e2e/polls/pollHistory.spec.ts @@ -69,7 +69,7 @@ test.describe("Poll history", () => { async function openPollHistory(app: ElementAppPage): Promise { const { page } = app; await app.toggleRoomInfoPanel(); - await page.locator(".mx_RoomSummaryCard").getByRole("menuitem", { name: "Poll history" }).click(); + await page.locator(".mx_RoomSummaryCard").getByRole("menuitem", { name: "Polls" }).click(); } test.use({ diff --git a/playwright/snapshots/crypto/crypto.spec.ts/RoomSummaryCard-with-verified-e2ee-linux.png b/playwright/snapshots/crypto/crypto.spec.ts/RoomSummaryCard-with-verified-e2ee-linux.png index 2c6160f2a190..51b6458487bb 100644 Binary files a/playwright/snapshots/crypto/crypto.spec.ts/RoomSummaryCard-with-verified-e2ee-linux.png and b/playwright/snapshots/crypto/crypto.spec.ts/RoomSummaryCard-with-verified-e2ee-linux.png differ diff --git a/playwright/snapshots/right-panel/right-panel.spec.ts/with-name-and-address-linux.png b/playwright/snapshots/right-panel/right-panel.spec.ts/with-name-and-address-linux.png index 943cc9dfc8b5..2415d8ca2c93 100644 Binary files a/playwright/snapshots/right-panel/right-panel.spec.ts/with-name-and-address-linux.png and b/playwright/snapshots/right-panel/right-panel.spec.ts/with-name-and-address-linux.png differ diff --git a/res/css/views/right_panel/_RoomSummaryCard.pcss b/res/css/views/right_panel/_RoomSummaryCard.pcss index c6273a72253f..7bc036661b5b 100644 --- a/res/css/views/right_panel/_RoomSummaryCard.pcss +++ b/res/css/views/right_panel/_RoomSummaryCard.pcss @@ -15,6 +15,9 @@ limitations under the License. */ .mx_RoomSummaryCard { + --cpd-separator-inset: var(--cpd-space-4x); + --cpd-separator-spacing: var(--cpd-space-4x); + .mx_RoomSummaryCard_container { text-align: center; margin: $spacing-20 var(--cpd-space-4x) 0; diff --git a/src/components/views/right_panel/RoomSummaryCard.tsx b/src/components/views/right_panel/RoomSummaryCard.tsx index cd9a4cad5a8b..3df979678a78 100644 --- a/src/components/views/right_panel/RoomSummaryCard.tsx +++ b/src/components/views/right_panel/RoomSummaryCard.tsx @@ -378,18 +378,11 @@ const RoomSummaryCard: React.FC = ({ disabled={!canInviteToState} onSelect={() => inviteToRoom(room)} /> - - + {!isVideoRoom && ( <> - - {pinningEnabled && ( = ({ )} + + + )} + + + + + + {!isVideoRoom && ( + <> + = ({ )} + + ", () => { it("displays poll history when tab clicked", () => { const { container } = getComponent(); - fireEvent.click(screen.getByText("Poll history")); + fireEvent.click(screen.getByText("Polls")); expect(container.querySelector(".mx_SettingsTab")).toMatchSnapshot(); }); diff --git a/test/components/views/dialogs/__snapshots__/RoomSettingsDialog-test.tsx.snap b/test/components/views/dialogs/__snapshots__/RoomSettingsDialog-test.tsx.snap index 6c148400d884..8f60a60c0835 100644 --- a/test/components/views/dialogs/__snapshots__/RoomSettingsDialog-test.tsx.snap +++ b/test/components/views/dialogs/__snapshots__/RoomSettingsDialog-test.tsx.snap @@ -89,7 +89,7 @@ NodeList [ class="mx_TabbedView_tabLabel_text" id="mx_tabpanel_ROOM_POLL_HISTORY_TAB_label" > - Poll history + Polls , ] @@ -105,7 +105,7 @@ exports[` poll history displays poll history when tab clic

- Poll history + Polls

", () => { fireEvent.click(getByText("Question?")); - expect(queryByText("Poll history")).not.toBeInTheDocument(); + expect(queryByText("Polls")).not.toBeInTheDocument(); // elements from MPollBody expect(getByText("Question?")).toMatchSnapshot(); expect(getByText("Socks")).toBeInTheDocument(); @@ -396,13 +396,13 @@ describe("", () => { expect(getByText("Question?")).toBeInTheDocument(); // header not shown - expect(queryByText("Poll history")).not.toBeInTheDocument(); + expect(queryByText("Polls")).not.toBeInTheDocument(); expect(getByText("Active polls")).toMatchSnapshot(); fireEvent.click(getByText("Active polls")); // main list header displayed again - expect(getByText("Poll history")).toBeInTheDocument(); + expect(getByText("Polls")).toBeInTheDocument(); // active filter still active expect(getByTestId("filter-tab-PollHistory_filter-ACTIVE").firstElementChild).toBeChecked(); // list displayed diff --git a/test/components/views/polls/pollHistory/__snapshots__/PollHistory-test.tsx.snap b/test/components/views/polls/pollHistory/__snapshots__/PollHistory-test.tsx.snap index 70f66bb8030b..f78f2e4642e9 100644 --- a/test/components/views/polls/pollHistory/__snapshots__/PollHistory-test.tsx.snap +++ b/test/components/views/polls/pollHistory/__snapshots__/PollHistory-test.tsx.snap @@ -37,7 +37,7 @@ exports[` renders a list of active polls when there are polls in

- Poll history + Polls

", () => { mocked(settingsHooks.useFeatureEnabled).mockImplementation((feature) => feature === "feature_pinning"); const { getByText } = getComponent(); - expect(getByText("Pinned")).toBeInTheDocument(); + expect(getByText("Pinned messages")).toBeInTheDocument(); }); }); @@ -280,14 +280,14 @@ describe("", () => { it("renders poll history option", () => { const { getByText } = getComponent(); - expect(getByText("Poll history")).toBeInTheDocument(); + expect(getByText("Polls")).toBeInTheDocument(); }); it("opens poll history dialog on button click", () => { const permalinkCreator = new RoomPermalinkCreator(room); const { getByText } = getComponent({ permalinkCreator }); - fireEvent.click(getByText("Poll history")); + fireEvent.click(getByText("Polls")); expect(Modal.createDialog).toHaveBeenCalledWith(PollHistoryDialog, { room, 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 56731430d032..91fe523d0951 100644 --- a/test/components/views/right_panel/__snapshots__/RoomSummaryCard-test.tsx.snap +++ b/test/components/views/right_panel/__snapshots__/RoomSummaryCard-test.tsx.snap @@ -180,6 +180,12 @@ exports[` has button to edit topic when expanded 1`] = ` /> +