refactor(status-bar): unify typography roles - #668
Open
beruro wants to merge 1 commit into
Open
Conversation
beruro
force-pushed
the
junyu/status-bar-typography
branch
from
August 4, 2026 05:26
3df2960 to
dcce776
Compare
beruro
marked this pull request as ready for review
August 4, 2026 05:28
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.

Problem
WorkStation status bars independently rebuild the same compact typography with repeated font-size, weight, and numeric-alignment utilities. Diff statistics also force a medium weight, so status-bar consumers cannot use the normal-weight role without overriding internal classes. The duplicated rules produce uneven emphasis and make future typography changes error-prone.
Solution
Define semantic status-bar typography roles for the shared root, labels, emphasis, and tabular numerals. Add
StatusBarLabeland extendStatusBarTextso Browser, Editor, Project, Git, CI, Ports, and sync surfaces use those roles consistently. ExtendDiffStatsBadgewith a backwards-compatible named weight variant; all existing callers retain medium weight while status bars can explicitly request normal weight.Potential risks
Typography utilities move from individual children to shared primitives, so an overlooked consumer could inherit a different weight or line-height. Compatibility is preserved for
DiffStatsBadgeby keeping its default weight asmedium, and tests cover the default and status-bar variants. Packaged visual capture across constrained widths and both themes remains follow-up evidence; semantic markup tests and the backwards-compatible default cover the merge boundary. Rollback is a source-only revert with no persisted data or API migration.Frontend UI audit
docs/frontend-ui-audit-2026-08-03/StatusBarTypography.mdrecords 4 completed fixes, 8 keep-with-reason findings, 2 deferred out-of-scope candidates, and 2 abstracted typography patterns. The deferred width/background-token findings are intentionally excluded to preserve single responsibility.Verification
npx vitest run src/components/DiffStatsBadge/__tests__/DiffStatsBadge.typography.test.ts src/components/DiffStatsBadge/__tests__/diffStatsBadgeHelpers.test.ts src/modules/WorkStation/shared/StatusBar/__tests__/StatusBarBase.typography.test.ts— 3 files, 14 tests passed.npx eslintover all changed TypeScript/TSX files — passed.npm run typecheck— passed.git diff --cached --checkbefore commit — passed.origin/develop; every source and test change maps to status-bar typography consistency.Not run: packaged desktop visual QA in light/dark themes and narrow widths; this remains follow-up verification.