docs(back-to-top): enhance inline documentation#2740
Open
bennypowers wants to merge 1 commit intomainfrom
Open
docs(back-to-top): enhance inline documentation#2740bennypowers wants to merge 1 commit intomainfrom
bennypowers wants to merge 1 commit intomainfrom
Conversation
Enhanced inline documentation for rh-back-to-top component to improve developer experience and API understanding: - Added @cssprop documentation for `--rh-back-to-top-background-color` CSS custom property, explaining default value (--rh-color-accent-base), color scheme adaptation, and when to customize for brand-specific themes - Enhanced `visible` property JSDoc with semantic meaning of visibility behavior and usage guidelines for default vs always-visible modes - Enhanced `scrollableSelector` property JSDoc explaining window vs element scrolling, use cases for SPAs and scrollable containers - Enhanced `scrollDistance` property JSDoc with threshold behavior and guidelines for customizing based on page length - Enhanced `href` property JSDoc with fragment link requirements, common targets, and accessibility benefits of proper anchor links - Added inline documentation for `trigger` CSS part explaining button styling and pill-shaped appearance - Added inline documentation for default slot with text content guidelines and localization considerations All documentation includes design system context about theming, accessibility, and usage best practices. Closes #2491 🤖 Generated with [Claude Code](https://claude.com/claude-code) Assisted-By: Claude <noreply@anthropic.com>
|
✅ Deploy Preview for red-hat-design-system ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
|
Size Change: +867 B (+0.34%) Total Size: 258 kB
ℹ️ View Unchanged
|
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 I did
Enhanced inline documentation for
rh-back-to-topcomponent to improve developer experience and API understanding, following the documentation standards established in PR #2548 forrh-progress-stepper.Testing Instructions
This documentation was created with assistance from LLM tools. Reviewers MUST carefully verify the semantic meaning and design system accuracy of all new documentation.
Please check that the enhanced documentation:
Specific sections to review:
1. CSS Custom Property:
--rh-back-to-top-background-color(lines 19-35)--rh-color-accent-base) is correct2. Properties
visibleproperty (lines 41-56):scrollableSelectorproperty (lines 59-75):scrollDistanceproperty (lines 78-94):hrefproperty (lines 97-117):3. Template Documentation
triggerCSS part (lines 162-167):Default slot (lines 169-174):
Notes to Reviewers
Additional Enhancements
Beyond the CSS custom property listed in issue #2491, this PR also enhances documentation for:
visible,scrollableSelector,scrollDistance,href)triggerCSS part for styling the buttonThese additional enhancements provide comprehensive API documentation that helps developers understand:
Documentation Format
Following the project standard:
@csspropJSDoc tag in class documentationCloses #2491
🤖 Generated with Claude Code