Skip to content

Commit ea62538

Browse files
committed
feat(webapp): align org and account side menu padding with the main side menu
Match the organization settings and account side menus' horizontal padding (pl-2.5, pr-0, stable scrollbar gutter) to the main side menu. Add a nameClassName prop to SideMenuItem and tighten the "Personal Access Tokens" label's tracking so it no longer truncates.
1 parent c7e7766 commit ea62538

4 files changed

Lines changed: 14 additions & 3 deletions

File tree

.server-changes/side-menu-project-and-org-menus.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ Refresh the side menu and account UI:
2424
- Signal impersonation mode with a yellow side-menu border and a matching
2525
"Stop impersonating" accent.
2626
- Move the Settings item to the top of the organization settings side menu.
27+
- Align the organization settings and account side menus' horizontal padding
28+
with the main side menu, and tighten the "Personal Access Tokens" label so it
29+
no longer truncates.
2730

2831
The org loader now exposes whether the RBAC and SSO plugins are installed so the
2932
side menu can gate the Roles and SSO items the same way the settings side menu

apps/webapp/app/components/navigation/AccountSideMenu.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export function AccountSideMenu({ user }: { user: User }) {
3434
<span className="text-text-bright">Back to app</span>
3535
</LinkButton>
3636
</div>
37-
<div className="mb-6 flex grow flex-col overflow-y-auto px-1 pt-2 scrollbar-thin scrollbar-track-transparent scrollbar-thumb-charcoal-600">
37+
<div className="mb-6 flex grow flex-col overflow-y-auto pl-2.5 pr-0 pt-2 scrollbar-gutter-stable scrollbar-thin scrollbar-track-transparent scrollbar-thumb-charcoal-600">
3838
<SideMenuHeader title="Account" />
3939
<SideMenuItem
4040
name="Profile"
@@ -45,6 +45,7 @@ export function AccountSideMenu({ user }: { user: User }) {
4545
/>
4646
<SideMenuItem
4747
name="Personal Access Tokens"
48+
nameClassName="tracking-[-0.04em]"
4849
icon={ShieldIcon}
4950
activeIconColor="text-text-bright"
5051
to={personalAccessTokensPath()}

apps/webapp/app/components/navigation/OrganizationSettingsSideMenu.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export function OrganizationSettingsSideMenu({
8080
<span className="text-text-bright">Back to app</span>
8181
</LinkButton>
8282
</div>
83-
<div className="mb-6 flex grow flex-col gap-4 overflow-y-auto px-1 pt-2 scrollbar-thin scrollbar-track-transparent scrollbar-thumb-charcoal-600">
83+
<div className="mb-6 flex grow flex-col gap-4 overflow-y-auto pl-2.5 pr-0 pt-2 scrollbar-gutter-stable scrollbar-thin scrollbar-track-transparent scrollbar-thumb-charcoal-600">
8484
<div className="flex flex-col">
8585
<div className="mb-1">
8686
<SideMenuHeader title="Organization" />

apps/webapp/app/components/navigation/SideMenuItem.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export function SideMenuItem({
1414
trailingIcon,
1515
trailingIconClassName,
1616
name,
17+
nameClassName,
1718
to,
1819
badge,
1920
target,
@@ -30,6 +31,7 @@ export function SideMenuItem({
3031
trailingIcon?: RenderIcon;
3132
trailingIconClassName?: string;
3233
name: string;
34+
nameClassName?: string;
3335
to: string;
3436
badge?: ReactNode;
3537
target?: AnchorHTMLAttributes<HTMLAnchorElement>["target"];
@@ -83,7 +85,12 @@ export function SideMenuItem({
8385
}}
8486
transition={{ duration: 0.2, ease: "easeOut" }}
8587
>
86-
<span className="select-none truncate text-[0.90625rem] font-medium tracking-[-0.01em]">
88+
<span
89+
className={cn(
90+
"select-none truncate text-[0.90625rem] font-medium tracking-[-0.01em]",
91+
nameClassName
92+
)}
93+
>
8794
{name}
8895
</span>
8996
{badge && !isCollapsed && (

0 commit comments

Comments
 (0)