Skip to content

Commit ee6fa72

Browse files
fix(web): make each profile its own row, and truncate the menu heading
Bare rows stack on narrow viewports with a larger gap inside a row than between rows, so the remove button read as belonging to the profile below. Each profile is now a bounded row, and the list carries the bottom spacing `SettingsRow` leaves to its children. `MenuGroupLabel` renders a block box, so `text-overflow` on an inline span inside it never applied and a long profile name pushed the popup past its width. The truncation sits on the label itself. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 5357208 commit ee6fa72

2 files changed

Lines changed: 18 additions & 5 deletions

File tree

apps/web/src/components/preview/PreviewMoreMenu.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -206,9 +206,10 @@ export function PreviewMoreMenu({
206206
each one drove the popup far past its width.
207207
*/}
208208
{profileName ? (
209-
<MenuGroupLabel>
210-
<span className="min-w-0 truncate">Profile: {profileName}</span>
211-
</MenuGroupLabel>
209+
// Truncation sits on the label itself: it renders a block box, so
210+
// `text-overflow` on an inline child inside it never applies and a
211+
// long name would push the popup past its width instead.
212+
<MenuGroupLabel className="max-w-64 truncate">Profile: {profileName}</MenuGroupLabel>
212213
) : null}
213214
<MenuItem
214215
onClick={() =>

apps/web/src/components/settings/IntegrationsSettings.tsx

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -544,11 +544,23 @@ function BrowserProfilesSetting({ disabled }: { readonly disabled: boolean }) {
544544
</Button>
545545
}
546546
>
547-
<div className="mt-1 space-y-1">
547+
{/*
548+
Each profile is its own bounded row, and the list carries the bottom
549+
spacing `SettingsRow` leaves to its children (`pt-3 pb-1`). Bare rows
550+
stack on narrow viewports with a larger gap inside a row than between
551+
rows, which reads as the remove button belonging to the profile below.
552+
*/}
553+
<div className="mt-2 space-y-1 pb-2">
548554
{resolveBrowserProfiles(userProfiles).map((profile) => {
549555
const builtIn = isBuiltInBrowserProfileId(profile.id);
550556
return (
551-
<div key={profile.id} className={ITEM_ROW_INNER_CLASSNAME}>
557+
<div
558+
key={profile.id}
559+
className={cn(
560+
ITEM_ROW_INNER_CLASSNAME,
561+
"rounded-lg border border-border/60 px-3 py-2",
562+
)}
563+
>
552564
{builtIn ? (
553565
// Dimmed here rather than on the list, which is the only
554566
// content in the row without a disabled treatment of its own:

0 commit comments

Comments
 (0)