Skip to content

docs(icon): restore dropped dense best practice and straighten em dash - #4676

Open
josephfarina wants to merge 1 commit into
mainfrom
navi/docs/dense-coverage-icon-parity
Open

docs(icon): restore dropped dense best practice and straighten em dash#4676
josephfarina wants to merge 1 commit into
mainfrom
navi/docs/dense-coverage-icon-parity

Conversation

@josephfarina

Copy link
Copy Markdown
Contributor

What

The English Icon docs.usage.bestPractices gained a bullet in #4551 covering registerIcons / getExtendedIcon for library icon augmentation, but the docsDense overlay was never updated to match. The dense overlay merges best practices by count and position, so the missing bullet produced a silent 11-vs-10 parity gap: astryx component Icon --lang dense dropped the augmentation guidance entirely.

This adds the compressed dense bullet at the matching position (after the "use semantic icon names" bullet, guidance: true) so the dense output renders all 11 best practices with the same guidance flags and order as English. It also straightens one em dash to a colon in the English bullet, matching the doc prose style.

No prop, param, or return coverage changed. The edit is confined to the bestPractices arrays and does not overlap the Icon prop-doc edits in #4647, #4648, or #4505.

Validation

  • pnpm --filter @astryxdesign/core typecheck:docs passes
  • pnpm exec tsc --project packages/cli/tsconfig.template-docs.json --noEmit passes
  • astryx component Icon --lang dense renders 11 best practices, single (required) marker, consistent formatting

Night Watch — Doc Reviewer

The English Icon docs gained a best-practices bullet in #4551 covering
registerIcons/getExtendedIcon for library icon augmentation, but the
docsDense overlay was not updated to match. Because the dense overlay
merges by count and position, the missing bullet caused a silent 11-vs-10
parity gap: the dense CLI output dropped the augmentation guidance.

Add the compressed dense bullet at the matching position so
`astryx component Icon --lang dense` renders all 11 best practices with
the same guidance flags as English. Also straighten one em dash in the
English bullet to a colon per the doc prose style.

Found during Night Watch doc review.
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Aug 3, 2026
@vercel

vercel Bot commented Aug 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
astryx Ready Ready Preview Aug 3, 2026 9:39am

Request Review

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

PR Analysis Report

📚 Storybook Preview

View Storybook for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

🧪 Sandbox Preview

View Sandbox for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

Modified Components

Icon (@astryxdesign/core) · View in Storybook
Metric Before After Delta
Bundle Size (ESM) N/A N/A N/A
Lines of Code N/A 547 -
Complexity N/A High (28) -

Bundle Size Summary

Package Size (ESM) Size (CJS) Gzipped
@astryxdesign/core N/A 4.9KB 1.3KB

Accessibility Audit

Status: 1 accessibility violation(s) found — 1 serious.

Icon - 1 issue(s)
  • 🟠 serious: Ensure the contrast between foreground and background colors meets WCAG 2 AA minimum contrast ratio thresholds
    • Rule: color-contrast · Affects 1/18 stories · Learn more
    • WCAG: 1.4.3 (Level AA)

Generated by PR Enrichment workflow | Storybook | Sandbox | View full report

description: 'Icons are small visual symbols that represent actions, objects, or concepts. They improve scannability and reinforce meaning alongside text. Supports both direct SVG components and semantic icon names that adapt to the active theme.',
bestPractices: [
{ guidance: true, description: 'Use semantic icon names when available; they adapt to theme changes automatically.' },
{ guidance: true, description: 'Libraries can augment the icon map with their own keys: registerIcons({\'richtext:bold\': <MyIcon />}) accepts arbitrary keys (not just IconName). Resolve via getExtendedIcon(key, fallback), which prefers a theme-registered icon and falls back to a bundled default: the seam that makes library icons theme-overridable.' },

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.

The preferred way to do this is via theme

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants