fix(web): align project menu labels - #8029
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
ApprovabilityVerdict: 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. |
a38fc1f to
e128511
Compare
Dismissing prior approval to re-evaluate e128511
There was a problem hiding this comment.
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
e128511 to
c57cf99
Compare
|
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. |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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.
| className="-mx-0.5 size-4 shrink-0" | |
| className="size-4 shrink-0" |
Posted via Macroscope — UI Consistency
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.5toProjectFaviconinSidebarAdjusts 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.5to the existingsize-4 shrink-0classes in Sidebar.tsx.Macroscope summarized 958c1ed.