From 917d53a56fd6de290fdf2269a330d62fe6464907 Mon Sep 17 00:00:00 2001 From: Florian Duros Date: Thu, 13 Mar 2025 14:32:48 +0100 Subject: [PATCH] Add wrap props to flex component (#29480) * feat(flex): add wrap props to flex component * test: update snapshot --- res/css/components/views/utils/_Flex.pcss | 1 + src/components/utils/Flex.tsx | 9 ++++- .../__snapshots__/ErrorView-test.tsx.snap | 6 +-- .../__snapshots__/FilePanel-test.tsx.snap | 2 +- .../__snapshots__/RoomView-test.tsx.snap | 14 +++---- ...teractiveAuthEntryComponents-test.tsx.snap | 2 +- .../ExtensionsCard-test.tsx.snap | 2 +- .../PinnedMessagesCard-test.tsx.snap | 2 +- .../RoomSummaryCard-test.tsx.snap | 12 +++--- .../__snapshots__/UserInfo-test.tsx.snap | 30 +++++++------- .../__snapshots__/RoomHeader-test.tsx.snap | 2 +- .../__snapshots__/RoomList-test.tsx.snap | 40 +++++++++---------- .../__snapshots__/RoomListCell-test.tsx.snap | 4 +- .../RoomListHeaderView-test.tsx.snap | 16 ++++---- .../__snapshots__/RoomListPanel-test.tsx.snap | 16 ++++---- .../RoomListSearch-test.tsx.snap | 16 ++++---- .../ThirdPartyMemberInfo-test.tsx.snap | 8 ++-- .../MemberTileView-test.tsx.snap | 2 +- .../ResetIdentityPanel-test.tsx.snap | 8 ++-- .../EncryptionUserSettingsTab-test.tsx.snap | 2 +- .../vector/__snapshots__/init-test.ts.snap | 6 +-- 21 files changed, 104 insertions(+), 96 deletions(-) diff --git a/res/css/components/views/utils/_Flex.pcss b/res/css/components/views/utils/_Flex.pcss index a7f3688466..9cfa6424f0 100644 --- a/res/css/components/views/utils/_Flex.pcss +++ b/res/css/components/views/utils/_Flex.pcss @@ -12,4 +12,5 @@ Please see LICENSE files in the repository root for full details. align-items: var(--mx-flex-align, unset); justify-content: var(--mx-flex-justify, unset); gap: var(--mx-flex-gap, unset); + flex-wrap: var(--mx-flex-wrap, unset); } diff --git a/src/components/utils/Flex.tsx b/src/components/utils/Flex.tsx index ca085a0a52..c4e2f90066 100644 --- a/src/components/utils/Flex.tsx +++ b/src/components/utils/Flex.tsx @@ -39,6 +39,11 @@ type FlexProps should match snapshot 1`] = `

should show the empty state when there are no pi >
has button to edit topic 1`] = ` />
has button to edit topic 1`] = `
renders the room summary 1`] = ` />
renders the room summary 1`] = `
renders the room topic in the summary 1`] = ` />
renders the room topic in the summary 1`] = `
with crypto enabled renders 1`] = ` >

with crypto enabled renders 1`] = ` >
@user:example.com
@@ -113,7 +113,7 @@ exports[` with crypto enabled renders 1`] = `

with crypto enabled should render a deactivate button for >

with crypto enabled should render a deactivate button for >
@user:example.com
@@ -399,7 +399,7 @@ exports[` with crypto enabled should render a deactivate button for

renders verification unavailable message 1`] = ` >

renders verification unavailable message 1`] = ` >
@user:example.com
@@ -689,7 +689,7 @@ exports[` renders verification unavailable message 1`] = `

renders verified badge when user is verified 1`] = ` >

renders verified badge when user is verified 1`] = ` >
@user:example.com
@@ -771,7 +771,7 @@ exports[` renders verified badge when user is verified 1`] = `

renders verify button 1`] = ` >

renders verify button 1`] = ` >
@user:example.com
@@ -868,7 +868,7 @@ exports[` renders verify button 1`] = `

should display the reset identity panel w