Repository navigation
Keep plugin detail row icons at the coarse-pointer size on phones - #6416
Merged
ymichael merged 1 commit intoOct 28, 2026
Merged
Conversation
Plugin sheets compile into the shared `utilities` layer and load after core, so a plugin that emits its own scoped `.size-3` outranked core's `max-md:pointer-coarse:size-4` on host DetailRow icons rendered inside the plugin root. The detail row icon now sizes from one `size-(--bb-detail-row-icon-size)` utility whose value theme.css bumps in the coarse-pointer media block, so no plugin sheet order can shrink it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
ymichael
force-pushed
the
bb/fix-12px-git-info-row-icons-on-mobile-thr_tktgb34dg3
branch
from
October 28, 2026 00:50
22267ef to
bb98e4e
Compare
ymichael
deleted the
bb/fix-12px-git-info-row-icons-on-mobile-thr_tktgb34dg3
branch
October 28, 2026 00:53
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Human comments
What was wrong
On phone-sized coarse-pointer screens, the Info panel's Branch, Merge base and Git status rows drew 12px icons, while Parent, Project, Environment and Directory drew 16px. Their labels started 4px further left. This began with #6157, which moved those rows into the Git plugin via the SDK
experimental_DetailRow.The SDK component is core's own
DetailRow, so the class list stayed the same:size-3 … max-md:pointer-coarse:size-4. What changed is that the row now renders inside the Git plugin's root. Plugin sheets compile into the sharedutilitiescascade layer and load after the app sheet. The Git plugin usessize-3itself, so its sheet emits:where([data-bb-plugin="bb--git"], …) .size-3. That rule has the same specificity as core'smax-md:pointer-coarse:size-4and comes later, so it wins.Nothing drops the variant. In the live page, the matched rules on the Branch icon are core
.size-3, core@media (width < 48rem) and (pointer: coarse) .max-md\:pointer-coarse\:size-4, and the Git plugin's scoped.size-3, last and winning. This is the same ordering problem as #3691, which madehidden md:flexdisjoint after the layer change in #3635 was reverted.What changed
apps/app/src/components/ui/detail-card.tsx:DETAIL_ROW_ICON_CLASSis now a single size utility,size-(--bb-detail-row-icon-size), with no base/variant pair. A plugin sheet re-emittingsize-3orsize-4no longer matches the icon.cn/tailwind-merge still dropsIcon's defaultsize-6for custom and asset icons.apps/app/src/components/ui/theme.css: defines--bb-detail-row-icon-sizeascalc(var(--spacing) * 3)on:root. The existing(max-width: 767px) and (pointer: coarse):rootblock raises it to* 4, the same token-override pattern the file already uses for--text-*so responsive values don't fight in the cascade.min-h-0 min-w-0toDETAIL_ROW_ICON_CLASS. Those are kept, so the class is nowsize-(--bb-detail-row-icon-size) min-h-0 min-w-0 shrink-0 text-subtle-foreground.DETAIL_ROW_ICON_CLASS, now resolve the icon size from the token.No wire, SDK surface, CLI or doc changes. Plugin artifacts do not need rebuilding.
How you verified
New test in
apps/app/src/lib/plugin-sdk-app-impl.test.tsx. It renderspluginSdkAppImplementation.experimental_DetailRowand fails if any rendered element pairs an unconditional utility with a variant utility that overrides it (checked with tailwind-merge). Any such pair breaks once a plugin sheet re-emits the base utility. With main'sdetail-card.tsxit fails, reportingsize-3 + max-md:pointer-coarse:size-4. With this change it passes.pnpm exec turbo run typecheck lint --filter=@bb/apppasses.pnpm exec turbo run test --filter=@bb/app -- src/lib/plugin-sdk-app-impl.test.tsx src/components/ui/theme.test.ts src/components/secondary-panelpasses: 54 files, 571 tests.I checked the live layout on a source dev app (
pnpm dev), using a project on a local git repo and a worktree thread with the Info panel open.Chromium, 390×844, touch plus
pointer: coarseemulation (icon box, label left in CSS px):iOS 18.4 Simulator Safari (iPhone 16 Pro, 402px wide), measured from simulator screenshots. On main, Branch, Merge base and Git status labels start at x≈35.3 with ~9–10px glyphs, while core rows start at 39.3. On this branch all six of those rows start at 39.3 with matching ~13–14px glyphs.
On desktop (Chromium 1280×800, fine pointer), every row stays 12×12 with labels at x=835, and the Info panel region is pixel-identical between main and this branch.
🤖 Generated with Claude Code