From 5ab5fa1e045cb5375b758162a254cf568bf90b6e Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 5 Jun 2026 10:49:28 +0100 Subject: [PATCH] Limit width of the display name in user menu (#33746) * Limit width of the display name in user menu Fixes https://github.com/element-hq/element-web/issues/33726 * Change js-sdk moduleNameMapper to apps/web (#33734) Turns out the pnpm link has to be set to apps/web to actually work, so update the moduleNameMapper to look there too. * update screenshots * Update snapshot * Update other snapshots * Snapshot * More snapshots --- .../__snapshots__/SpacePanel-test.tsx.snap | 6 +++--- .../UserMenu.stories.tsx/longer-name-auto.png | Bin 23900 -> 21731 bytes .../UserMenu.stories.tsx/open-auto.png | Bin 45534 -> 44936 bytes .../src/menus/UserMenu/UserMenu.module.css | 7 +++++++ .../src/menus/UserMenu/UserMenu.tsx | 2 +- .../__snapshots__/UserMenu.test.tsx.snap | 14 +++++++------- 6 files changed, 18 insertions(+), 11 deletions(-) diff --git a/apps/web/test/unit-tests/components/views/spaces/__snapshots__/SpacePanel-test.tsx.snap b/apps/web/test/unit-tests/components/views/spaces/__snapshots__/SpacePanel-test.tsx.snap index 8acad258f2..298a81854c 100644 --- a/apps/web/test/unit-tests/components/views/spaces/__snapshots__/SpacePanel-test.tsx.snap +++ b/apps/web/test/unit-tests/components/views/spaces/__snapshots__/SpacePanel-test.tsx.snap @@ -7,19 +7,19 @@ exports[` should show all activated MetaSpaces in the correct orde class="mx_SpacePanel collapsed newUi" >
Sally Sanderson @@ -86,7 +86,7 @@ exports[`UserMenu > renders a button with a longer name 1`] = `
Sally Sanderson with a longer name @@ -138,7 +138,7 @@ exports[`UserMenu > renders a guest menu 1`] = ` Guest @@ -191,7 +191,7 @@ exports[`UserMenu > renders a menu 1`] = ` Sally Sanderson @@ -258,7 +258,7 @@ exports[`UserMenu > renders a menu without an avatar 1`] = ` Sally Sanderson @@ -571,7 +571,7 @@ exports[`UserMenu > renders an open menu 1`] = ` Sally Sanderson with a longer name @@ -931,7 +931,7 @@ exports[`UserMenu > renders the status emoji when set 1`] = ` Sally Sanderson