fix: update side panel header title to base font size with baseline alignment#16095
fix: update side panel header title to base font size with baseline alignment#16095
Conversation
There was a problem hiding this comment.
Pull request overview
This PR improves the typography and alignment of the side panel header by increasing the title font size and introducing baseline alignment between title and subtitle elements.
- Updated title font size from
theme.font.size.sm(0.92rem) totheme.font.size.md(1rem) for better readability - Introduced
StyledPageInfoTextContainerwrapper to baseline-align title and subtitle independently from the icon - Restructured component hierarchy to separate text alignment from icon alignment
Comments suppressed due to low confidence (1)
packages/twenty-front/src/modules/command-menu/components/CommandMenuPageInfoLayout.tsx:34
- The
StyledPageInfoTitleContainerhasmax-width: 150pxbut is missing the text truncation properties needed to properly handle overflow. When text exceeds 150px, it should be truncated with an ellipsis.
Add the following properties:
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;This pattern is consistently used throughout the codebase when max-width is combined with text content (see examples in EllipsisDisplay.tsx, NavigationDrawerItem.tsx, Breadcrumb.tsx, etc.).
export const StyledPageInfoTitleContainer = styled.div`
font-size: ${({ theme }) => theme.font.size.md};
font-weight: ${({ theme }) => theme.font.weight.semiBold};
min-width: 0;
max-width: 150px;
`;
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Greptile OverviewGreptile SummaryChanged side panel header title font size from sm (0.92rem) to md (1rem) and added baseline alignment between title and subtitle text.
Confidence Score: 5/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant Parent as Parent Component
participant Layout as CommandMenuPageInfoLayout
participant Icon as StyledPageInfoIcon
participant TextContainer as StyledPageInfoTextContainer
participant TitleDiv as StyledPageInfoTitleContainer
participant Label as StyledPageInfoLabel
Parent->>Layout: "Render with props"
alt icon exists
Layout->>Icon: "Render icon"
Note over Icon: Centered alignment
end
Layout->>TextContainer: "Wrap text elements"
Note over TextContainer: Baseline alignment applied
TextContainer->>TitleDiv: "Render title"
Note over TitleDiv: Font size md
alt label exists
TextContainer->>Label: "Render label"
Note over Label: Font size sm
end
|
|
🚀 Preview Environment Ready! Your preview environment is available at: http://bore.pub:21355 This environment will automatically shut down when the PR is closed or after 5 hours. |
Summary
Changes
StyledPageInfoTitleContainerfont size fromtheme.font.size.smtotheme.font.size.mdStyledPageInfoTextContainerwrapper to baseline-align title and subtitle independently from the icon