Typography: split the font catalog and load it in parts
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 72/100
- Issue type
- Refactor
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- nextjs, typescript
- Domain
- frontend, performance
Research direction
Start with lib/typography/catalog.ts, catalog.json, and scripts/generate-font-catalog.mjs to see how the catalog is generated and consumed; then trace useFontMeta, useFonts, and the font browser. Generate an index plus category detail files, load and cache the needed details, and verify the generator output agrees in a test. Done means all listed catalog uses still work, the specified pages exclude the full catalog from first-load JS, and the offline font browser flow is unchanged.
Written by the indexing model from the issue text.
Description
Summary
The Google Fonts catalog (lib/typography/catalog.json, about 120 kB) is loaded whole whenever a typography feature needs one font's details. Load a small index first and the rest only when browsing, so most pages that name one font stay light.
Part of the 2.0.0 plan: fewer, better and fully tested studios, on a calmer and faster site.
Where to look
lib/typography/catalog.tsandcatalog.json;scripts/generate-font-catalog.mjshooks/use-font-catalog.ts:useFontMetaanduseFontscomponents/typography/font-browser.tsx
Behaviour
- Generate two files: an index (family, category, rank, weights count) and the details by category, loaded on demand.
useFontMeta(family)fetches only the part that holds the family, and caches it.- The generator script writes both files and a test checks they agree with each other.
Acceptance criteria
- Every current use of the catalog works (browser, pairing, brand fonts, export).
- The first-load JS of
/brand,/colorsand/exportdoes not include the full catalog. - The offline behaviour of the font browser is unchanged (check in the offline e2e flow).
Getting started: fork the repo, then pnpm install and pnpm dev (Node 22+, pnpm 11, no API keys). Before opening a PR, run pnpm typecheck && pnpm test && pnpm lint && pnpm format:check && pnpm check:dashes && pnpm build (CI fails on unformatted files, so pnpm format first). See CONTRIBUTING.md and the first contribution walkthrough.
Everything needed is in the repository. This doesn't need maintainer access, secrets or paid services. Comment below to claim it, and ask questions here any time.
- Dominant language
- TypeScript
- Stars
- 11
- Forks
- 3
- Avg merge
- 5h 23m
- Merged PRs (30d)
- 74
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from yakew7/DesignHub
-
difficulty: easy enhancement good first issue help wanted testing v2.0.0
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
area: ui difficulty: easy enhancement good first issue help wanted v2.0.0
Difficulty 3/5 1-2 days Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
area: projects difficulty: easy enhancement good first issue help wanted v2.0.0
Difficulty 3/5 1-2 days Newbie friendliness 66/100
Maintainers usually reply within 1 day
-
area: projects difficulty: easy enhancement good first issue help wanted v2.0.0
Difficulty 3/5 1-2 days Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
area: ui difficulty: medium enhancement help wanted v2.0.0
Difficulty 4/5 3-5 days Newbie friendliness 45/100
Maintainers usually reply within 1 day
All issues in yakew7/DesignHub
Similar issues
-
bug module:nodes tests
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
rocketride-org/rocketride-server#3020 ·
Maintainers usually reply within 2 days
-
area: dashboard area: tests good first issue size: XS tests
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
Read canvas commentsOpenenhancement needs-community-review
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
shaharia-lab/slackcli#501 · 3 comments ·
Maintainers usually reply within 1 day
-
[Bug] Pod detail shows CPU usage ten times too high, and throws on decimal memory suffixesPossibly taken @RaphaelFakhri claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 11 days
-
`package.json`: build tools listed as runtime dependencies, exact pins causing duplicate installsOpen
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
themesberg/flowbite-vue#471 ·