Repository navigation
docs(authority): define static component icon maps - #7117
rubyycheung wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report📚 Storybook Preview🧪 Sandbox PreviewNo new or modified components detected. Bundle Size SummaryNo component packages changed. Accessibility AuditStatus: No accessibility violations detected. Visual Regression19 of 436 shot(s) changed. A change here is a question, not a failure: check whether the after is the
Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
a9d9f98 to
2ad5ee9
Compare
2ad5ee9 to
7aed987
Compare
There was a problem hiding this comment.
This change looks ready for the theme owners to decide. It completes the existing static componentIcons contract in the two records that already own its open halves: theme authoring takes normalization and per-slot inheritance (explicit names and null replace inherited entries, undefined leaves inheritance or the component fallback in place, and null is preserved), and theme compilation takes built-output preservation (the same keys and values, including null, with no CSS). Both records keep icon authority as the owner of what an entry means, and both state plainly that the field is still unshipped, with the new test rows describing implementation acceptance rather than existing behavior. Existing themes without the field are unaffected. Formatting, knowledge-record validation, and its test suite pass for the changed files.
[Automated review]
|
@cixzhang @rubyycheung before I approve this, two questions:
|
Direction updateThis PR is no longer the direction we intend to land as written. While reviewing the open questions, we found that this proposal solves only one narrow part of the problem: mapping a component icon role to an icon source. It does not cover the complete AST-054 goal. A theme owner needs to use the same theme file to control icon dimensions, appearance, weight by final resolved size, and state appearance across both registered icons and opt-in direct product icon libraries. The corrected ownership model is:
Compatibility remains important:
#6891 now restores the complete AST-054 specification, and #7116 projects the corresponding authority changes. To make the replacement easier to review, the implementation is being split into smaller stacked PRs:
All approved use cases remain unchanged. A split that cannot safely land independently will remain stacked and blocked rather than weakening the contract. #7117, #7122, and #7131 are now closed as superseded so reviewers do not spend more time on the discarded direction. Their branches and discussion remain available as historical context. Replacement links will be added to #6891 and #7116 as each focused PR opens. |
|
Closing this PR because the static-only The replacement implementation is being split into focused review surfaces for: Core capabilities/build parity, direct-icon adapters, component role/state infrastructure, a Button-family visual proof, and inventory/conformance guidance. This PR remains available as historical context; none of it landed. Replacement links will be added to #6891 and #7116 as each focused PR opens. |
Primary intent
Complete the approved static
componentIconscontract by assigning its normalization, inheritance, and built-output behavior to the theme owners.Existing authority
architecture:icon-resolution-and-component-slotsalready owns the static slot model:ComponentIconSlotMapowns typed slot names;componentIcons[slot]isIconName | null;undefinedcontinues fallback andnullsuppresses the slot.This amendment adds only the missing theme-authoring and theme-compilation ownership needed to implement that current contract. It is independent of draft AST-054 and does not add resolver functions, state, variant, size, or private request metadata.
Contract amendments
Theme authoring
DefineThemeInput.componentIconsaccepts the approved staticComponentIconMap.DefinedTheme.componentIconsis public static theme data.IconNameandnull, removesundefined, and mergesextendsper slot.nullreplaces the inherited entry; an absent/undefined key keeps inheritance or the component fallback.Theme compilation
componentIconsproduces no CSS.null.Compatibility
This is an additive public theme field. Existing themes and builds without
componentIconsremain unchanged. Static mappings keep the already-approved slot precedence andnullmeaning.Non-goals
Scope
Writing rubric results
Validation
pnpm exec prettier --check docs/architecture/theme-authoring-contract.md docs/architecture/theme-compilation.mdpnpm check:knowledgepnpm exec vitest run scripts/check-knowledge.test.mjsgit diff --check