Skip to content

feat: add full Phosphor 2.1 set, AutoGuru customs and icon categories#77

Merged
timaMehro merged 11 commits into
mainfrom
feature/full-icon-set-categories
Jun 16, 2026
Merged

feat: add full Phosphor 2.1 set, AutoGuru customs and icon categories#77
timaMehro merged 11 commits into
mainfrom
feature/full-icon-set-categories

Conversation

@timaMehro

@timaMehro timaMehro commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Summary

Brings @autoguru/icons up to parity with the AutoGuru Design System: the full
Phosphor 2.1 regular-weight set plus the bespoke AutoGuru icons, with a
browsable category reference. Additive only — existing icons are never
removed, renamed, or edited, so current consumers keep working.

What's changed

  • Full icon set (203 → 1,576 icons). Added the complete Phosphor 2.1
    regular-weight set alongside the existing AutoGuru-custom icons. Every SVG now
    lives directly in icons/, so the repo is self-contained — no external icon
    dependency or import tooling.
  • Build untouched. scripts/build.js is unchanged; it still turns
    icons/*.svg into individual, tree-shakeable React components and the
    generated index.ts. The published package layout and every existing export
    name are preserved.
  • Category reference (categories/). New standalone documentation: an
    image-free index (categories/README.md) linking to one page per category
    (20 pages, e.g. categories/commerce.md), generated by
    categories/generate.js from categories/categories.json. Split per category
    so GitHub renders all previews reliably — a single 1,576-image page trips
    GitHub's image rate-limiting and shows broken icons. Pure docs: not part of the
    build and not published (only dist/ and icons/ ship).
  • README refreshed with clearer usage, naming, categories and contributing
    docs.

Compatibility

  • Purely additive at the export level (no removals or renames), so
    @autoguru/overdrive and other consumers integrate without code changes.
  • ⚠️ No changeset / version bump yet — add one (a minor bump) before release.

Adding an icon

  1. Drop a kebab-case SVG into icons/ (the filename becomes the export name —
    car-key.svgCarKeyIcon).
  2. Add its category to categories/categories.json.
  3. Run node categories/generate.js to refresh the reference, then yarn build.

Bring the icon library to parity with the AutoGuru Design System:

- Import the full Phosphor 2.1 regular-weight set via @phosphor-icons/core
  (scripts/import-phosphor.js). Additive only — existing icons are never
  overwritten, so hand-tuned AutoGuru icons are preserved (1367 added).
- Add the 6 remaining AutoGuru-custom icons from Figma that have no Phosphor
  equivalent: car-alert, car-info, car-key, car-wrench, clutch, fuel-yes.
- Categorise all 1576 icons across 20 design-system categories. build.js now
  emits a typed iconCategories/Category export plus a generated CATEGORIES.md;
  categories.json holds AutoGuru/brand/filled overrides, Phosphor's own
  figma_category is the fallback.
- Cap generator concurrency to keep memory stable at ~1.6k icons.
- Rewrite the README with clearer structure, usage and contributing docs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@timaMehro timaMehro requested a review from a team as a code owner June 15, 2026 04:56
Tima and others added 10 commits June 15, 2026 15:02
The Phosphor SVGs are already committed under icons/, so the one-time import
tooling and the @phosphor-icons/core dependency are no longer needed.

- Remove scripts/import-phosphor.js.
- Remove the @phosphor-icons/core devDependency.
- Bake the full icon -> category map into categories.json (1576 entries) so
  build.js resolves categories from that static file alone; icons missing from
  it are reported and fall into Uncategorized.
- Update the README contributing guide to the SVG-first workflow.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Per review: keep scripts/build.js untouched from main and drop the in-code
category metadata. Categories now live solely in a single reference doc.

- Restore scripts/build.js and .gitignore to their main versions (no category
  generation, no concurrency cap, no exported iconCategories/Category).
- CATEGORIES.md is generated by a new standalone scripts/categories.js from
  categories.json — separate from the build; the package exports no category
  metadata.
- Update the README to reference CATEGORIES.md and the new workflow.

Net change vs main: the new icon SVGs plus CATEGORIES.md, categories.json,
scripts/categories.js and the README. build.js/package.json/yarn.lock unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ny branch

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
GitHub only renders SVGs inline from absolute raw.githubusercontent.com URLs
and resolves them against a concrete ref; relative paths and the default branch
miss the not-yet-merged icons. Pin to a commit SHA that contains all icons so
previews render now and survive the branch merge. The generator takes ICONS_REF.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Previews were pinned to an absolute raw.githubusercontent.com URL at a
feature-branch commit SHA, which would 404 once the branch is squash-merged
into main (the commit gets orphaned). Switch the generator to emit
repo-relative paths (icons/<name>.svg) by default; GitHub resolves these
against whichever ref the file is viewed on, so previews render on the branch
now and on main after merge. ICONS_REF still produces absolute URLs for
off-GitHub rendering. build.js untouched.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
A single CATEGORIES.md with all 1576 icon previews tripped GitHub's image
rate-limiting, so a random subset rendered as broken images on every load.
Split into an image-free index (CATEGORIES.md) that links to one page per
category under categories/ (largest ~176 previews), each well within what
GitHub renders reliably. Category pages reference icons relatively
(../icons/<name>.svg) so previews resolve on any ref. build.js untouched.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Keep main's structure intact and add the icon-category docs as one self-contained
folder. Move categories.json -> categories/categories.json and
scripts/categories.js -> categories/generate.js, and emit the index as
categories/README.md (GitHub renders it when the folder is opened) instead of a
root CATEGORIES.md. Update readme links accordingly. Pure documentation tooling;
build.js and the published package are unaffected.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Link every category directly from the root readme (kept in sync by
categories/generate.js between markers), so the full category reference is one
click from the repo front page instead of buried in a folder.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Replace the inline dot-separated category list with a two-pair table (category +
count), generated by categories/generate.js, for a tidier landing page.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of files (300). Try reducing the number of changed files and requesting a review from Copilot again.

@timaMehro timaMehro merged commit 2190da9 into main Jun 16, 2026
2 checks passed
@timaMehro timaMehro deleted the feature/full-icon-set-categories branch June 16, 2026 23:20
timaMehro pushed a commit that referenced this pull request Jun 16, 2026
Marks #77 (full Phosphor 2.1 regular-weight set, AutoGuru custom icons,
and category reference) as a minor release. Purely additive — no existing
icons removed or renamed — so it bumps 2.0.1 -> 2.1.0.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
timaMehro added a commit that referenced this pull request Jun 17, 2026
Marks #77 (full Phosphor 2.1 regular-weight set, AutoGuru custom icons,
and category reference) as a minor release. Purely additive — no existing
icons removed or renamed — so it bumps 2.0.1 -> 2.1.0.

Co-authored-by: Tima <timamehro@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants