Repository navigation
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 2 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
This branch has not been deployed
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.
What this changes
Adds
TableOfContents, a scroll-aware anchor list for long pages, to the web collection (panelui-web) — the component, its docs page, registry item, demos, and generated agent-skill reference.Why
The navigation category had no way to show where you are inside a long page. The native package has
SectionRail, but that is a floating position indicator rather than a linked outline.TableOfContentsfills the gap: a real<ol>of anchors that tracks the section at the reading line, with one indicator that moves to it.Type of change
How it was tested
Web only — the component has no iOS or Android surface.
npm run typecheck --workspace=panelui-webnpm run typecheck --workspace=docsnpx fumadocs-mdxgenerated the gitignored.source/)node --test packages/web/test/package-contract.test.mjs packages/web/test/table-of-contents-spy.test.mjsnode --test apps/docs/test/web-registry.test.mjs apps/docs/test/registry-budgets.test.mjsnode --test apps/docs/test/*.test.mjsnpm run build --workspace=panelui-webnode scripts/verify-registry-budgets.mjsreact-dom/serverScreenshots or recording
Captured from the running docs page at 2× — the docs-style ToC, nesting, a scrolling article with live spy, and dark.
Checklist
npm run typecheckpassesnpm run buildpassesprefers-reduced-motionnavlandmark,aria-current="location",<ol>/<li>semantics, focus ringsclassNameIf this touches a component's API
web-meta.jsonandweb-usage/table-of-contents.jsonare updated, withaddedInset to0.15.0build-web-registry,gen-web,build-web-skill, andbuild-skill-assetshave been run and the generated files are committedIf this adds a component
packages/web/src/index.ts, with its types and named twins for every dotted partNotes for the reviewer
observe,offsetorrootchanges. Anchors added to an already-mounted tree without one of those changing are not picked up. A stablerootref is the intended pattern; the docs note this.rootis optional: the viewport is the default scroll container. Pass an element or ref for an article with its own scroller.<ol>keeps only<li>children and screen readers hear links, not chrome.addedInis0.15.0whilepanelui-webis still0.14.0, so the docs page carries the "new" badge until the release lands. No version bump in this PR, per CONTRIBUTING.@base-ui/reactandtailwind-variants, all already declared.