Skip to content

fix(web): align project menu labels - #8029

Open
davidhu2000 wants to merge 2 commits into
pingdotgg:mainfrom
davidhu2000:fix/project-menu-icon-alignment
Open

fix(web): align project menu labels#8029
davidhu2000 wants to merge 2 commits into
pingdotgg:mainfrom
davidhu2000:fix/project-menu-icon-alignment

Conversation

@davidhu2000

@davidhu2000 davidhu2000 commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Project rows using detected favicon images placed their labels farther right than rows using fallback folder SVGs.

Pass matching horizontal margin through the Sidebar project favicon slot, so loaded images and SVG fallbacks share the same geometry without changing the shared menu primitive.

UI evidence: to be added by maintainer.

Model: GPT-5.6
Harness: Codex in T3 Code

Note

Fix project menu icon alignment by adding -mx-0.5 to ProjectFavicon in Sidebar

Adjusts the horizontal margin of the project favicon in the project scope selection menu so icons align with menu labels. Adds the Tailwind class -mx-0.5 to the existing size-4 shrink-0 classes in Sidebar.tsx.

Macroscope summarized 958c1ed.

@coderabbitai

coderabbitai Bot commented Aug 23, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 340323b1-92a9-4224-82e3-a83922a7863a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Aug 23, 2026
macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Aug 23, 2026
@macroscopeapp

macroscopeapp Bot commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — This is a narrowly scoped, UI-only class change with no broader runtime or data impact. An unresolved comment identifies that the offset applies equally to image and fallback icons while neighboring menu rows remain unchanged, leaving the intended alignment behavior uncertain.

You can add or adjust custom eligibility rules. Learn more.

@davidhu2000
davidhu2000 force-pushed the fix/project-menu-icon-alignment branch from a38fc1f to e128511 Compare August 23, 2026 20:40
@macroscopeapp
macroscopeapp Bot dismissed their stale review August 23, 2026 20:40

Dismissing prior approval to re-evaluate e128511

@macroscopeapp macroscopeapp Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One finding on the project menu alignment fix: the new [&_img] rule only covers one of ProjectFavicon's render states, so rows will align inconsistently depending on favicon load state.

Posted via Macroscope — UI Consistency

Comment thread apps/web/src/components/Sidebar.tsx Outdated
@davidhu2000
davidhu2000 force-pushed the fix/project-menu-icon-alignment branch from e128511 to c57cf99 Compare August 23, 2026 20:46
@davidhu2000

Copy link
Copy Markdown
Contributor Author

Addressed by moving the margin onto ProjectFavicon's className, which is applied to both the loaded image and SVG fallback. The fallback and All projects SVGs were already normalized by MenuRadioItem's existing SVG margin rule; this change keeps that behavior while removing the DOM-selector coupling.

@macroscopeapp macroscopeapp Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the project-scope menu icon change against the surrounding menu rows and ProjectFavicon's branch geometry. One finding below.

Posted via Macroscope — UI Consistency

cwd={project.workspaceRoot}
faviconPath={project.faviconPath}
className="size-4 shrink-0"
className="-mx-0.5 size-4 shrink-0"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ProjectFavicon merges className into every branch — the loaded <img> (cn("size-3.5 shrink-0 rounded-sm object-contain", className)) and ProjectFaviconFallback (cn("size-3.5 shrink-0 text-icon-muted", className)) — so -mx-0.5 lands on both. Image rows and SVG-fallback rows were already the same 16px box and both now shift by the same 2px, so their relative geometry is unchanged and the stated image-vs-fallback discrepancy isn't addressed.

What it does change is the sibling row: the All projects MenuRadioItem above still renders <FolderIcon className="size-4 shrink-0" /> without the offset, so within one open menu project icons sit 2px left of it and their labels 4px left of All projects (icon 16px → 12px of layout width, plus the same gap-2). The MenuTrigger favicon/FolderIcon also keeps the original spacing.

Smallest fix is to drop the offset here; if favicon bitmaps genuinely need optical compensation versus lucide's inset glyph, apply it inside ProjectFavicon's image branch only so the fallback path is unaffected.

Suggested change
className="-mx-0.5 size-4 shrink-0"
className="size-4 shrink-0"

Posted via Macroscope — UI Consistency

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant