Skip to content

feat(styles)!: take typography from groudon - #314

Merged
sohhamm merged 3 commits into
mainfrom
feat/typography-from-groudon
Nov 4, 2026
Merged

sohhamm merged 3 commits into
mainfrom
feat/typography-from-groudon

Conversation

@sohhamm

@sohhamm sohhamm commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

PSD-3901: the library's type scale now comes from @hybr1d-tech/groudon@1.0.0 (published from Usehybrid/groudon with provenance). No visual change in any app.

What changes

  • charizard.css imports @hybr1d-tech/groudon (type-scale tokens and the same 24 zap-* classes) in place of the library's own _typography.css copy, which is deleted.
  • .zap-button-small keeps the !important the old copy had, because the table filter chips depend on it.
  • Nothing else changes. Component CSS, Geist as the library font (--font-sans/--font-mono, fontsource imports) and the docs site are exactly as on main.

An earlier revision also rewrote component rem values to design pixels. Before/after builds showed that shrinking components by about 19% in the 16px-root apps, so it was reverted and will ship separately with design QA.

Breaking (release as 4.0.0)

  • The old --letter-spacing, --line-height-142/145/150/166/171 and --link-color custom properties are no longer defined. Their groudon equivalents are --zap-letter-spacing, --zap-text-*-line-height and --zap-link-color. Nothing in charizard or any consuming app references the old names (checked on every app's branch).
  • A 13px-root app must declare :root { --zap-base-font-size: 13; }. The console's paired PR does this.

Verification

Production builds of main and of each branch were served locally side by side, and headless Chrome compared every rendered element (font size, line height, weight, family, letter spacing, and box x/y/w/h):

  • Docs site, all 40 component pages, at a 16px root and a 13px root: identical (80 of 80 pages).
  • Console (pikachu, 13px), logged in on staging, 16 pages: no font or layout differences. The only change is that 14px text using line-height: normal gets an 18px line box instead of 17px, because the old copy's 1.0769rem produced 13.9997px, just under the rounding boundary.
  • zenex (gengar), logged in, 8 pages; ops dashboard (rayquaza), logged in, 19 pages; vendor portal (latios) login: identical. The only differences were live data (a different app sample, a cache label).
  • Paired app PRs bump to charizard 4 and delete their local _typography.css copies. The console PR also keeps its root font with font-family: var(--zap-font-sans), which the before/after check caught.

🤖 Generated with Claude Code

sohhamm and others added 2 commits November 4, 2026 10:55
…sign pixels

- charizard.css bundles @hybr1d-tech/groudon (tokens + zap-* classes) in place of the
  library's own _typography.css copy.
- Component CSS rem values were written for the console's 13px root, so in 16px apps
  (zenex, ops, vendor portal) drawers, inputs, switches, selects and date pickers rendered
  ~23% too large. They are now calc(N * var(--zap-px)) in design pixels and render the same
  in every app; the console is unchanged (within 1px of rounding).
- The library renders groudon's Instrument Sans again (--font-sans: var(--zap-font-sans));
  Geist moves to the docs site only, so apps stop downloading the Geist font files.
- .zap-button-small keeps the !important it had in the old copy (table filter chips).

BREAKING CHANGE: --font-mono is no longer defined by the library, and 16px-root apps see
charizard components shrink to their designed sizes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replaces the local link: used while groudon 1.0.0 was unreleased. The
Geist fontsource packages move to devDependencies: only the docs site
loads them, the library ships Instrument Sans via groudon tokens.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no new blocking issue was found.

Summary

The PR replaces the local typography stylesheet with @hybr1d-tech/groudon.

  • Charizard gets its typography scale from the shared Groudon package.

No new actionable issues were found. Build and browser checks were not run; dependencies are not installed locally.

Reviews (3) · Last reviewed commit: "fix(styles)!: keep every app rendering e..." · Reviewed by Greptile

Narrow this change to moving the type scale onto groudon. Before/after production
builds of every consuming app showed the design-pixel rewrite of component sizes
shrinking components ~19% in the 16px-root apps (zenex, ops, vendor portal), so it
is reverted here and will ship separately with design QA:

- component CSS (drawer, input, switch, select, date pickers, progress, upload,
  empty state, layout tabs, popover, pagination, toast) back to the rem values on
  main; Drawer.tsx back to its rem calc
- Geist stays the library font exactly as on main (--font-sans / --font-mono and
  the fontsource imports + dependencies); toasts and progress still read it
- the docs site no longer needs its own Geist override

What remains: charizard.css imports @hybr1d-tech/groudon instead of the library's
_typography.css copy, and .zap-button-small keeps its !important.

BREAKING CHANGE: the old --letter-spacing, --line-height-142/145/150/166/171 and
--link-color custom properties are no longer defined by the library; use groudon's
--zap-* tokens (no consumer references the old names).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sohhamm sohhamm changed the title feat(styles)!: take typography from groudon and size components in design pixels feat(styles)!: take typography from groudon Nov 4, 2026
@sohhamm

sohhamm commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator Author

@greptileai review

@greptile-apps

greptile-apps Bot commented Nov 4, 2026

Copy link
Copy Markdown

Comments Outside Diff

These findings could not be posted inline.

  • P2 Apps still use Geist src/components/styles/global.css:4 ▶

    global.css now selects Geist again, and charizard.css loads its font files for every consuming app. Because global.css comes after the Groudon import, this replaces the intended --zap-font-sans choice with Geist. Apps keep the old font and its downloads instead of moving to Instrument Sans.

    Keep the Geist imports and overrides in the docs site, and restore --font-sans: var(--zap-font-sans) for the library.

@sohhamm

sohhamm commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator Author

Re the review of 1da26d0 ("Apps still use Geist" and "restore the design-pixel dimensions"): both are intentional. This PR's requirement is now no visual change in any app. It only moves the type scale onto groudon.

  • Geist. On main, the library already sets --font-sans: Geist and loads Geist, and the toast and progress components read var(--font-sans). Switching the library to --zap-font-sans would change the font of those components in every app, which is a visible change. The page font itself is unaffected: every app sets Instrument Sans on its root (the console via font-family: var(--zap-font-sans) in its paired PR), and the logged-in before/after runs show the same loaded fonts and families on every page.
  • Design-pixel sizes. Restoring them shrinks drawers, inputs, switches, layout tabs and progress by about 19% in the 16px-root apps (zenex, ops, vendor portal), which the before/after runs measured. That is a real design change, so it ships as a separate PR with design QA rather than inside a "no visual change" refactor.

The PR description has the verification: 80 of 80 component pages identical at 13px and 16px, plus 16 console, 8 zenex and 19 ops pages logged in on staging, with no font or layout differences.

@sohhamm

sohhamm commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator Author

@greptileai review

@sohhamm
sohhamm merged commit 102510c into main Nov 4, 2026
2 checks passed
@sohhamm
sohhamm deleted the feat/typography-from-groudon branch November 4, 2026 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant