Repository navigation
Docs match the code: typecheck every example, check every props table - #206
Merged
Merged
Conversation
Two checkers in apps/docs, run in CI before the docs build: - check-examples typechecks every preview and copyable code block on the docs site, the fenced and inline examples in the agent harness's rules, recipes and gotchas, and the READMEs, against the built package. - check-props checks each PropsTable against ai/spec.json: describe and exclude keys, and hand-written rows' values and defaults. Fixes the 168 problems they found (wrong opacity scale on Background, radius="none" for corners, a Timeline state that does not exist, Recharts examples on the streaming hooks, @/modules imports and more), moves 21 hand-written props tables onto the spec, and adds API tables for HeadingNav, IconProvider, Meta, Schema and OgRoutesProvider. Types that refused what the components already do are loosened: SegmentedControl onChange, StatusIndicator color, Skeleton shape, InteractiveDetails onClick, KbarItem shortcut and keywords are optional, LetterFx charset takes a string, CursorCard placement takes corners. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01E5ivjExopsYxSMrNg18Ghm
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Merged
30 tasks done
lorant-one
pushed a commit
that referenced
this pull request
Oct 18, 2026
The docs example checker types a snippet with no Once UI import against core, where ThemeProvider has no insets and Column no safeArea, so the docs build on preview went red once both #204 and #206 were in. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_0183UV8SQBGYKctRTFAv64N8
lorant-one
added a commit
that referenced
this pull request
Oct 18, 2026
* Accessibility drill, round 2: focus, keyboard and announcements - Dialog and FocusTrap: Tab walks tabbables in document order and wraps; focus moves into a dialog when it opens. - Select keeps an uncontrolled value and focuses its search field reliably; options show a visible keyboard focus. - InfoTip and other hover triggers open with Enter and Space. - ToggleButton defaults to type="button" with aria-pressed; Button and IconButton set aria-busy while loading. - DropdownWrapper puts the button role on the element that takes focus. - ContextMenu closes on Escape and marks disabled state. - Feedback: danger/warning are alerts, info/success polite status. - LinearGauge and RadialGauge are named meters with unique gradient ids. - Reduced motion: transitions and animations end at once under prefers-reduced-motion; Spinner opts out as essential motion. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_0183UV8SQBGYKctRTFAv64N8 * Docs: import the safe-area example's components from native The docs example checker types a snippet with no Once UI import against core, where ThemeProvider has no insets and Column no safeArea, so the docs build on preview went red once both #204 and #206 were in. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_0183UV8SQBGYKctRTFAv64N8 --------- Co-authored-by: Claude <[email protected]>
Merged
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.
Requested by Lorant · project thread
Before: nothing compiled the examples on the docs site or in the agent harness. 168 of them were wrong:
Backgroundopacities written as0.5on a 0–100 scale,radius="none"onButton/IconButton(the prop iscorners),Timelineitems in a"completed"state that doesn't exist, streaming-hook examples written against Recharts' API,Meta/Schemaimported from the pre-package@/modules,OGCardinstead ofOgCard, missing required props, and more. 21 props tables were hand-written and could drift silently.After:
pnpm --filter @once-ui-system/docs check:docstypechecks 1,341 examples (docs previews and copyable code, fenced and inline examples inai/rules*.md,recipes.md,layouts.md,gotchas.json, the READMEs) against the built package, and checks everyPropsTableagainstai/spec.json. Both pass with 0 problems, and CI runs them in the docs job before the docs build.How:
apps/docs/scripts/check-examples.mjspulls everypreview={…}andcode:block out of the MDX, wraps each in a TSX module and typechecks them in memory with the docs tsconfig. Names an example assumes (its data, handlers, the reader's own components) becomeany, so only unknown components, unknown props and wrong values fail. Unparsable notation (radius: xs | s | m) is skipped and counted.apps/docs/scripts/check-props.mjsflagsdescribe/excludekeys for props a component doesn't have, and hand-written rows whose literal values or defaults disagree with the spec. With--notesit lists hand tables that could read from the spec instead.component=, andHeadingNav,IconProvider,Meta,SchemaandOgRoutesProviderget API tables.SegmentedControlonChange,StatusIndicatorcolor,Skeletonshape,InteractiveDetailsonClickandKbarItemshortcut/keywordsare now optional.LetterFxcharsettakes a string, andCursorCardplacementtakes the corners its positioning code handles. These are in the CHANGELOG under Unreleased.Checked locally: core typecheck clean, 155 test files / 1,982 tests pass, lint gate at baseline, docs typecheck and
next buildpass. Generatedai/files are not committed, per AGENTS.md.Generated by Claude Code