feat: Add TableOfContents component and fix Slug field button styling#429
Merged
ainsleyclark merged 5 commits intomainfrom Mar 13, 2026
Merged
feat: Add TableOfContents component and fix Slug field button styling#429ainsleyclark merged 5 commits intomainfrom
ainsleyclark merged 5 commits intomainfrom
Conversation
Adds a new TableOfContents Svelte 5 component that wraps Sidebar with scrollspy logic. Headings are auto-discovered from the DOM using data-sidebar-content / data-sidebar-selector attributes by default, with contentSelector and headingSelector props for explicit overrides. https://claude.ai/code/session_01Qrcz9fPxJBQk2GD1G3ZAug
…n in Slug component The Button component from @payloadcms/ui dropped the style prop, causing a TS2322 type error during build. Wrap the button in a span to preserve the margin/padding styles. https://claude.ai/code/session_01Qrcz9fPxJBQk2GD1G3ZAug
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #429 +/- ##
==========================================
+ Coverage 64.59% 70.26% +5.67%
==========================================
Files 154 187 +33
Lines 6064 7439 +1375
==========================================
+ Hits 3917 5227 +1310
+ Misses 2064 2012 -52
- Partials 83 200 +117 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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
This PR adds a new
TableOfContentscomponent to the sveltekit-helper package with scrollspy functionality, and fixes a styling issue in the Payload helper's Slug field component.Key Changes
TableOfContents Component (New)
TableOfContents.sveltecomponent with the following features:data-sidebar-contentanddata-sidebar-selectorattributes for DOM discoverypackages/sveltekit-helper/src/components/index.tsSlug Field Component Fix
packages/payload-helper/src/fields/Slug/Component.tsxby:styleprop from Payload'sButtoncomponent<span>element to apply the styling insteadImplementation Details
$stateand$propsrunes for reactivityidattributesdata-sidebar-selectorattribute > defaulth2https://claude.ai/code/session_01Qrcz9fPxJBQk2GD1G3ZAug