Backgrounds: merge the overlapping generators into variants
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 55/100
- Issue type
- Refactor
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- react, typescript
Research direction
Start with the listed generators in lib/background/generators/, then read types/background.ts, lib/background/registry.ts, the picker and controls, and store/background-store.ts. Capture the old generators’ SVG output as fixtures before changing them, and run the existing tests to see how rendering and saved backgrounds are covered. Done means three variant-based generators preserve each old seeded SVG, old saved kinds still load, the picker shows three entries with variant controls, and README.md and CHANGELOG.md describe the merge.
Written by the indexing model from the issue text.
Description
Summary
Several generators draw the same idea in a slightly different way. Merge three groups into one generator each with a variant control, taking nine generators to three, without losing a look and without breaking a saved background.
Part of the 2.0.0 plan: fewer, better and fully tested studios.
Where to look
lib/background/generators/:rings.ts,arcs.ts,squares.ts;argyle.ts,plaid.ts,checks.ts;zigzag.ts,chevron.ts,squiggle.tstypes/background.ts:BackgroundKindandBackgroundOptionslib/background/registry.ts,components/backgrounds/generator-picker.tsxandbackground-controls.tsxstore/background-store.ts
Behaviour
- Concentric (rings, arcs, squares), Diamonds and bands (argyle, plaid, checks) and Waves of lines (zigzag, chevron, squiggle) each get one generator with a
variantoption next tohalftoneGradientinBackgroundOptions. - Each old kind keeps working: add an alias map so a saved or shared background with
kind: "plaid"loads as the merged generator with the matching variant. - With the same seed and settings, a variant must draw exactly what the old generator drew.
Acceptance criteria
- Golden test: for each old kind, the merged generator with its variant renders the same SVG as the old module did (commit the old output as fixtures before deleting the old code).
- A saved background with each old
kindstill loads, covered by a store or registry test. - The picker shows three entries instead of nine, with a variant control.
- README.md and CHANGELOG.md say what merged.
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
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 2 days
-
reproduced
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
anomalyco/opencode#62052 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
strapi/design-system#2084 ·
Maintainers usually reply within 3 days
-
check:passed streams:remove
Difficulty 1/5 Under an hour Newbie friendliness 67/100
Maintainers usually reply within 1 day
-
OAuth documentation for GET /api/v2/users/me/ appears inconsistent with required global read scopeOpen
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day