fix(registry): apply components.build standard across all components#18
Merged
fix(registry): apply components.build standard across all components#18
Conversation
Audit and fix all 20 registry components against the components.build specification. Changes across 20 files: data-slot - Add data-slot on every exported sub-component for stable parent-targeting via CSS attribute selectors Types - Extend React.ComponentProps<element> on all prop interfaces so consumers can pass id, aria-*, data-*, and event handlers - Spread ...props last on root elements so consumer overrides win - Remove standalone className props (now inherited) Styling - Remove decorative /* --- */ separator comments (4 files) Accessibility - FileTree: add full WAI-ARIA tree keyboard map (Arrow keys, Home/End, expand/collapse, all items focusable) - RequestViewer: add WAI-ARIA tabs keyboard map (Arrow Left/Right, Home/End, roving tabindex) State - CodeBlockCommand: fix hydration mismatch by moving localStorage read from useState initializer to useEffect, wrap commands in useMemo for stable dependency
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Audit and fix all 20 registry components (20 files) against the components.build specification.
Changes by pillar
data-slot (
data-attributes)Added
data-slot="<component-name>"on every exported sub-component root element. Enables stable parent-targeting:Types (
types)React.ComponentProps<"element">{...props}lastid,aria-*,data-*, event handlers, and any native HTML attributeclassNameprops (inherited from ComponentProps)Styling (
styling)/* ---- */separator comments from 4 files (ai-copy-button,code-block-client,log-viewer,stepper)Accessibility (
accessibility)tabIndex(only active tab in tab order)State (
state)localStorage.getItem()fromuseStateinitializer touseEffect, wrappedcommandsinuseMemofor stable dependencyVerification
pnpm lint— 0 errors, 0 warningspnpm registry:build— all 20 items builtpnpm build— 35/35 pages generatedFiles changed