Skip to content

Commit 10b7f06

Browse files
authored
fix: Shorten page name correctly in the top bar (#4921)
## Description <img width="396" alt="image" src="https://github.com/user-attachments/assets/38a839cb-3261-4cbc-93bb-17410769abd6" /> ## Steps for reproduction 1. click button 2. expect xyz ## Code Review - [ ] hi @kof, I need you to do - conceptual review (architecture, feature-correctness) - detailed review (read every line) - test it on preview ## Before requesting a review - [ ] made a self-review - [ ] added inline comments where things may be not obvious (the "why", not "what") ## Before merging - [ ] tested locally and on preview environment (preview dev login: 0000) - [ ] updated [test cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md) document - [ ] added tests - [ ] if any new env variables are added, added them to `.env` file
1 parent 1bf36e0 commit 10b7f06

File tree

1 file changed

+4
-5
lines changed
  • apps/builder/app/builder/features/topbar

1 file changed

+4
-5
lines changed

apps/builder/app/builder/features/topbar/topbar.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,18 +46,17 @@ const PagesButton = () => {
4646
}
4747
>
4848
<ToolbarButton
49-
css={{
50-
paddingInline: theme.panel.paddingInline,
51-
maxWidth: theme.spacing[24],
52-
}}
49+
css={{ paddingInline: theme.panel.paddingInline }}
5350
aria-label="Toggle Pages"
5451
onClick={(event) => {
5552
$editingPageId.set(event.altKey ? page.id : undefined);
5653
toggleActiveSidebarPanel("pages");
5754
}}
5855
tabIndex={0}
5956
>
60-
<Text truncate>{page.name}</Text>
57+
<Text truncate css={{ maxWidth: theme.spacing[24] }}>
58+
{page.name}
59+
</Text>
6160
</ToolbarButton>
6261
</Tooltip>
6362
);

0 commit comments

Comments
 (0)