Skip to content

docs(navigation-secondary): enhance inline documentation#2751

Open
bennypowers wants to merge 8 commits intomainfrom
docs/navigation-secondary-inline-docs
Open

docs(navigation-secondary): enhance inline documentation#2751
bennypowers wants to merge 8 commits intomainfrom
docs/navigation-secondary-inline-docs

Conversation

@bennypowers
Copy link
Member

@bennypowers bennypowers commented Nov 12, 2025

What I did

Enhanced inline documentation for rh-navigation-secondary component to improve developer experience and API understanding.

👉 Deploy Preview 👈

⚠️ Important: LLM-Assisted Documentation

This documentation was created with assistance from LLM tools. Reviewers MUST carefully verify the semantic meaning and design system accuracy of all new documentation.

  • The accessible-label property defaults to "secondary" which is generic. A designer should recommend whether the default should include the product name or if documentation should more strongly encourage overriding this value.
  • The --rh-navigation-secondary-z-index defaults to 102, matching the primary navigation z-index. A designer should confirm whether these should be differentiated when both navigations are visible simultaneously.
  • The layout attribute on rh-navigation-secondary-menu accepts 'fixed-width' and 'full-width' but there is no design guidance on when to use 'fixed-width'. A designer should provide usage recommendations.
  • The color-palette on rh-navigation-secondary-menu defaults to 'lightest' and the JSDoc says menus are "always" lightest. A designer should confirm whether the attribute should be locked or if dark-palette menus are a valid future use case.
  • The current page indicator relies on consumers applying aria-current="page" manually. A designer should evaluate whether a utility or helper should be provided to simplify this integration for common CMS platforms.
  • The dropdown chevron is implemented via CSS pseudo-elements with hardcoded rotation angles. A designer should confirm whether an <rh-icon> approach would be more consistent with the rest of the design system.
  • The mobile menu has no animation when expanding or collapsing. A designer should confirm whether this is intentional or if a transition should be added for a smoother user experience.

Enhanced inline documentation for rh-navigation-secondary component family to
improve developer experience and API understanding:

**rh-navigation-secondary:**
- Enhanced nav, container, and cta parts with comprehensive inline documentation
  explaining structure, styling customization, and responsive behavior
- Documented --rh-navigation-secondary-z-index CSS property in CSS file with
  usage guidelines for z-index stacking and coordination with primary navigation

**rh-navigation-secondary-dropdown:**
- Enhanced container part with inline documentation covering dropdown state
  management, expanded/highlight classes, and styling guidelines

**rh-navigation-secondary-menu-section:**
- Enhanced container part with inline documentation explaining semantic structure,
  accessibility enhancements, and automatic aria-labelledby association

**rh-navigation-secondary-menu.css:**
- Documented --rh-navigation-secondary-menu-section-grid CSS property with
  usage guidelines for responsive grid column layout
- Documented --rh-navigation-secondary-menu-section-grid-gap CSS property with
  usage guidelines for menu section spacing
- Documented --rh-navigation-secondary-menu-content-max-width CSS property with
  usage guidelines for dropdown content width constraints

**rh-navigation-secondary-overlay:**
- Enhanced `open` property with detailed description of overlay behavior,
  automatic management by parent component, and accessibility considerations

All documentation includes design system context about navigation patterns,
accessibility requirements, and usage best practices.

Note: Issue #2502 mentioned firstUpdated() method, but this is a Lit lifecycle
method (excluded by CEM). This PR documents the public API instead.

Closes #2502

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Assisted-By: Claude <[email protected]>
@changeset-bot
Copy link

changeset-bot bot commented Nov 12, 2025

⚠️ No Changeset found

Latest commit: 9c2bf94

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@netlify
Copy link

netlify bot commented Nov 12, 2025

Deploy Preview for red-hat-design-system ready!

Name Link
🔨 Latest commit 9c2bf94
🔍 Latest deploy log https://app.netlify.com/projects/red-hat-design-system/deploys/69aac2eb749cf50008d83316
😎 Deploy Preview https://deploy-preview-2751--red-hat-design-system.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

…elines

Update element, attribute, slot, event, and CSS property documentation.
Add demo description .md files. Use RFC 2119 keywords, include
ARIA/accessibility notes, and document event detail shapes.

Assisted-By: Claude Opus 4.6 (1M context) <[email protected]>
@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

Documentation Health

Module Score
rh-navigation-secondary/rh-navigation-secondary-dropdown.js 145/200 ⚠️ 72%
rh-navigation-secondary/rh-navigation-secondary-menu-section.js 82/100 82%
rh-navigation-secondary/rh-navigation-secondary-menu.js 68/100 ⚠️ 68%
rh-navigation-secondary/rh-navigation-secondary-overlay.js 78/100 ⚠️ 78%
rh-navigation-secondary/rh-navigation-secondary.js 152/200 ⚠️ 76%
Overall 525/700 ⚠️ 75%
SecondaryNavDropdownExpandEvent — 65/100 ⚠️
Category Score
Element description 0/25
Attribute documentation 20/20
Slot documentation 15/15
CSS documentation 15/15
Event documentation 15/15
Demos 0/10
rh-navigation-secondary-dropdown (RhNavigationSecondaryDropdown) — 80/100 ✅
Category Score
Element description 20/25
Attribute documentation 20/20
Slot documentation 15/15
CSS documentation 10/15 ⚠️
Event documentation 15/15
Demos 0/10
rh-navigation-secondary-menu-section (RhNavigationSecondaryMenuSection) — 82/100 ✅
Category Score
Element description 22/25
Attribute documentation 20/20
Slot documentation 15/15
CSS documentation 10/15 ⚠️
Event documentation 15/15
Demos 0/10
rh-navigation-secondary-menu (RhNavigationSecondaryMenu) — 68/100 ⚠️
Category Score
Element description 14/25 ⚠️
Attribute documentation 20/20
Slot documentation 10/15 ⚠️
CSS documentation 9/15 ⚠️
Event documentation 15/15
Demos 0/10
rh-navigation-secondary-overlay (RhNavigationSecondaryOverlay) — 78/100 ⚠️
Category Score
Element description 19/25 ⚠️
Attribute documentation 20/20
Slot documentation 15/15
CSS documentation 9/15 ⚠️
Event documentation 15/15
Demos 0/10
SecondaryNavOverlayChangeEvent — 65/100 ⚠️
Category Score
Element description 0/25
Attribute documentation 20/20
Slot documentation 15/15
CSS documentation 15/15
Event documentation 15/15
Demos 0/10
rh-navigation-secondary (RhNavigationSecondary) — 87/100 ✅
Category Score
Element description 17/25 ⚠️
Attribute documentation 20/20
Slot documentation 15/15
CSS documentation 10/15 ⚠️
Event documentation 15/15
Demos 10/10

Recommendations:

  1. SecondaryNavOverlayChangeEvent: add a description to explain what this declaration does (Element description, +5 pts)
  2. rh-navigation-secondary-menu-section: reference design tokens or theme considerations in CSS descriptions (CSS documentation, +5 pts)
  3. SecondaryNavDropdownExpandEvent: describe purpose and context using words like 'for', 'when', 'provides', 'allows' (Element description, +5 pts)
  4. SecondaryNavDropdownExpandEvent: use RFC 2119 keywords (MUST, SHOULD, AVOID) to clarify requirements (Element description, +5 pts)
  5. rh-navigation-secondary: describe purpose and context using words like 'for', 'when', 'provides', 'allows' (Element description, +5 pts)

Backticks inside HTML comments within lit-html template literals must
be escaped as \` to avoid esbuild parse errors.

Assisted-By: Claude Opus 4.6 (1M context) <[email protected]>
Replace companion .md files with <meta itemprop="description"> tags
in demo HTML files per CEM demo documentation guidelines.

Assisted-By: Claude Opus 4.6 (1M context) <[email protected]>
@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

Size Change: +3.5 kB (+1.35%)

Total Size: 263 kB

Filename Size Change
./elements/rh-navigation-secondary/rh-navigation-secondary-dropdown.js 3.19 kB +622 B (+24.18%) 🚨
./elements/rh-navigation-secondary/rh-navigation-secondary-menu-section.js 2.06 kB +749 B (+57.26%) 🆘
./elements/rh-navigation-secondary/rh-navigation-secondary-menu.js 2.04 kB +359 B (+21.42%) 🚨
./elements/rh-navigation-secondary/rh-navigation-secondary-overlay.js 1.02 kB +458 B (+81.49%) 🆘
./elements/rh-navigation-secondary/rh-navigation-secondary.js 6.53 kB +1.3 kB (+24.85%) 🚨
./react/rh-navigation-secondary/rh-navigation-secondary-dropdown.js 227 B +10 B (+4.61%) 🔍
ℹ️ View Unchanged
Filename Size
./elements.js 635 B
./elements/rh-accordion/context.js 162 B
./elements/rh-accordion/rh-accordion-header.js 2.71 kB
./elements/rh-accordion/rh-accordion-panel.js 1.27 kB
./elements/rh-accordion/rh-accordion.js 3.35 kB
./elements/rh-alert/rh-alert.js 5.09 kB
./elements/rh-announcement/rh-announcement.js 2.17 kB
./elements/rh-audio-player/rh-audio-player-about.js 1.83 kB
./elements/rh-audio-player/rh-audio-player-rate-stepper.js 1.76 kB
./elements/rh-audio-player/rh-audio-player-scrolling-text-overflow.js 1.47 kB
./elements/rh-audio-player/rh-audio-player-subscribe.js 1.41 kB
./elements/rh-audio-player/rh-audio-player.js 12.4 kB
./elements/rh-audio-player/rh-cue.js 1.95 kB
./elements/rh-audio-player/rh-transcript.js 2.68 kB
./elements/rh-avatar/random-pattern-controller.js 2.72 kB
./elements/rh-avatar/rh-avatar.js 2.61 kB
./elements/rh-back-to-top/rh-back-to-top.js 1.98 kB
./elements/rh-badge/rh-badge.js 1.62 kB
./elements/rh-blockquote/rh-blockquote.js 1.38 kB
./elements/rh-breadcrumb/rh-breadcrumb.js 1.67 kB
./elements/rh-button/rh-button.js 3.34 kB
./elements/rh-card/rh-card.js 3.13 kB
./elements/rh-chip/context.js 165 B
./elements/rh-chip/rh-chip-group.js 1.58 kB
./elements/rh-chip/rh-chip.js 2.06 kB
./elements/rh-code-block/prism.css.js 667 B
./elements/rh-code-block/prism.js 572 B
./elements/rh-code-block/rh-code-block.js 8.99 kB
./elements/rh-cta/rh-cta.js 3.72 kB
./elements/rh-dialog/rh-dialog.js 4.72 kB
./elements/rh-dialog/yt-api.js 617 B
./elements/rh-disclosure/rh-disclosure.js 2.53 kB
./elements/rh-footer/rh-footer-block.js 714 B
./elements/rh-footer/rh-footer-copyright.js 357 B
./elements/rh-footer/rh-footer-links.js 1.1 kB
./elements/rh-footer/rh-footer-social-link.js 1.03 kB
./elements/rh-footer/rh-footer-universal.js 3.99 kB
./elements/rh-footer/rh-footer.js 4.67 kB
./elements/rh-health-index/rh-health-index.js 2.11 kB
./elements/rh-icon/rh-icon.js 2.52 kB
./elements/rh-icon/ssr.js 181 B
./elements/rh-jump-links/context.js 179 B
./elements/rh-jump-links/rh-jump-link.js 1.48 kB
./elements/rh-jump-links/rh-jump-links-list.js 1.17 kB
./elements/rh-jump-links/rh-jump-links.js 2.38 kB
./elements/rh-menu-dropdown/rh-menu-dropdown.js 4.12 kB
./elements/rh-menu/rh-menu-item-group.js 614 B
./elements/rh-menu/rh-menu-item.js 2.21 kB
./elements/rh-menu/rh-menu.js 1.6 kB
./elements/rh-navigation-link/rh-navigation-link.js 1.87 kB
./elements/rh-navigation-primary/context.js 176 B
./elements/rh-navigation-primary/rh-navigation-primary-item-menu.js 1.03 kB
./elements/rh-navigation-primary/rh-navigation-primary-item.js 3.46 kB
./elements/rh-navigation-primary/rh-navigation-primary-overlay.js 534 B
./elements/rh-navigation-primary/rh-navigation-primary.js 7.67 kB
./elements/rh-navigation-secondary/test/fixtures.js 769 B
./elements/rh-navigation-vertical/rh-navigation-vertical-list.js 2.24 kB
./elements/rh-navigation-vertical/rh-navigation-vertical.js 1.54 kB
./elements/rh-pagination/rh-pagination.js 5.69 kB
./elements/rh-progress-stepper/context.js 187 B
./elements/rh-progress-stepper/rh-progress-step.js 3.02 kB
./elements/rh-progress-stepper/rh-progress-stepper.js 4.78 kB
./elements/rh-scheme-toggle/rh-scheme-toggle.js 1.91 kB
./elements/rh-site-status/rh-site-status.js 2.44 kB
./elements/rh-skeleton/rh-skeleton.js 677 B
./elements/rh-skip-link/rh-skip-link.js 1.33 kB
./elements/rh-spinner/rh-spinner.js 1.31 kB
./elements/rh-stat/rh-stat.js 2.05 kB
./elements/rh-subnav/rh-subnav.js 2.98 kB
./elements/rh-surface/rh-surface.js 911 B
./elements/rh-surface/test/elements.js 763 B
./elements/rh-switch/rh-switch.js 2.9 kB
./elements/rh-table/rh-sort-button.js 1.39 kB
./elements/rh-table/rh-table.js 2.81 kB
./elements/rh-tabs/context.js 226 B
./elements/rh-tabs/rh-tab-panel.js 1 kB
./elements/rh-tabs/rh-tab.js 2.83 kB
./elements/rh-tabs/rh-tabs.js 3.65 kB
./elements/rh-tag/rh-tag.js 2.96 kB
./elements/rh-tile/rh-tile-group.js 1.78 kB
./elements/rh-tile/rh-tile.js 4.71 kB
./elements/rh-timestamp/rh-timestamp.js 991 B
./elements/rh-tooltip/rh-tooltip.js 3.18 kB
./elements/rh-video-embed/rh-video-embed.js 4.64 kB
./lib/color-palettes.js 851 B
./lib/context/headings/consumer.js 591 B
./lib/context/headings/provider.js 1.2 kB
./lib/elements/rh-context-demo/rh-context-demo.js 1.16 kB
./lib/elements/rh-context-picker/rh-context-picker.js 2.18 kB
./lib/environment.js 194 B
./lib/functions.js 175 B
./lib/I18nController.js 1.37 kB
./lib/ScreenSizeController.js 876 B
./lib/ssr-controller.js 201 B
./lib/themable.js 549 B
./react/lib/color-palettes.js 97 B
./react/lib/context/headings/consumer.js 103 B
./react/lib/context/headings/provider.js 105 B
./react/lib/elements/rh-context-demo/rh-context-demo.js 186 B
./react/lib/elements/rh-context-picker/rh-context-picker.js 189 B
./react/lib/functions.js 92 B
./react/lib/I18nController.js 97 B
./react/lib/ScreenSizeController.js 102 B
./react/lib/ssr-controller.js 97 B
./react/lib/themable.js 91 B
./react/rh-accordion/rh-accordion-header.js 199 B
./react/rh-accordion/rh-accordion-panel.js 185 B
./react/rh-accordion/rh-accordion.js 202 B
./react/rh-alert/rh-alert.js 184 B
./react/rh-announcement/rh-announcement.js 189 B
./react/rh-audio-player/rh-audio-player-about.js 191 B
./react/rh-audio-player/rh-audio-player-rate-stepper.js 199 B
./react/rh-audio-player/rh-audio-player-scrolling-text-overflow.js 214 B
./react/rh-audio-player/rh-audio-player-subscribe.js 196 B
./react/rh-audio-player/rh-audio-player.js 183 B
./react/rh-audio-player/rh-cue.js 195 B
./react/rh-audio-player/rh-transcript.js 187 B
./react/rh-avatar/rh-avatar.js 173 B
./react/rh-back-to-top/rh-back-to-top.js 183 B
./react/rh-badge/rh-badge.js 174 B
./react/rh-blockquote/rh-blockquote.js 179 B
./react/rh-breadcrumb/rh-breadcrumb.js 179 B
./react/rh-button/rh-button.js 174 B
./react/rh-card/rh-card.js 172 B
./react/rh-chip/rh-chip-group.js 182 B
./react/rh-chip/rh-chip.js 187 B
./react/rh-code-block/rh-code-block.js 193 B
./react/rh-cta/rh-cta.js 170 B
./react/rh-dialog/rh-dialog.js 203 B
./react/rh-disclosure/rh-disclosure.js 192 B
./react/rh-footer/rh-footer-block.js 184 B
./react/rh-footer/rh-footer-copyright.js 187 B
./react/rh-footer/rh-footer-links.js 185 B
./react/rh-footer/rh-footer-social-link.js 193 B
./react/rh-footer/rh-footer-universal.js 188 B
./react/rh-footer/rh-footer.js 174 B
./react/rh-health-index/rh-health-index.js 184 B
./react/rh-icon/rh-icon.js 195 B
./react/rh-jump-links/rh-jump-link.js 183 B
./react/rh-jump-links/rh-jump-links-list.js 189 B
./react/rh-jump-links/rh-jump-links.js 195 B
./react/rh-menu-dropdown/rh-menu-dropdown.js 185 B
./react/rh-menu/rh-menu-item-group.js 190 B
./react/rh-menu/rh-menu-item.js 181 B
./react/rh-menu/rh-menu.js 173 B
./react/rh-navigation-link/rh-navigation-link.js 186 B
./react/rh-navigation-primary/rh-navigation-primary-item-menu.js 205 B
./react/rh-navigation-primary/rh-navigation-primary-item.js 198 B
./react/rh-navigation-primary/rh-navigation-primary-overlay.js 199 B
./react/rh-navigation-primary/rh-navigation-primary.js 189 B
./react/rh-navigation-secondary/rh-navigation-secondary-menu-section.js 205 B
./react/rh-navigation-secondary/rh-navigation-secondary-menu.js 199 B
./react/rh-navigation-secondary/rh-navigation-secondary-overlay.js 201 B
./react/rh-navigation-secondary/rh-navigation-secondary.js 213 B
./react/rh-navigation-vertical/rh-navigation-vertical-list.js 198 B
./react/rh-navigation-vertical/rh-navigation-vertical.js 189 B
./react/rh-pagination/rh-pagination.js 178 B
./react/rh-progress-stepper/rh-progress-step.js 196 B
./react/rh-progress-stepper/rh-progress-stepper.js 186 B
./react/rh-scheme-toggle/rh-scheme-toggle.js 183 B
./react/rh-site-status/rh-site-status.js 181 B
./react/rh-skeleton/rh-skeleton.js 176 B
./react/rh-skip-link/rh-skip-link.js 181 B
./react/rh-spinner/rh-spinner.js 175 B
./react/rh-stat/rh-stat.js 171 B
./react/rh-subnav/rh-subnav.js 175 B
./react/rh-surface/rh-surface.js 175 B
./react/rh-switch/rh-switch.js 174 B
./react/rh-table/rh-sort-button.js 200 B
./react/rh-table/rh-table.js 174 B
./react/rh-tabs/rh-tab-panel.js 181 B
./react/rh-tabs/rh-tab.js 187 B
./react/rh-tabs/rh-tabs.js 174 B
./react/rh-tag/rh-tag.js 182 B
./react/rh-tile/rh-tile-group.js 183 B
./react/rh-tile/rh-tile.js 181 B
./react/rh-timestamp/rh-timestamp.js 176 B
./react/rh-tooltip/rh-tooltip.js 175 B
./react/rh-video-embed/rh-video-embed.js 227 B
./uxdot/ssr-failure-recoverable.js 658 B
./uxdot/uxdot-best-practice.js 812 B
./uxdot/uxdot-copy-button.js 1.24 kB
./uxdot/uxdot-copy-permalink.js 1.14 kB
./uxdot/uxdot-demo.js 2.76 kB
./uxdot/uxdot-example.js 1.14 kB
./uxdot/uxdot-feedback.js 983 B
./uxdot/uxdot-header.js 886 B
./uxdot/uxdot-knob-attribute.js 3.73 kB
./uxdot/uxdot-masthead.js 1.45 kB
./uxdot/uxdot-pattern-ssr-controller-client.js 1.24 kB
./uxdot/uxdot-pattern-ssr-controller-server.js 1.71 kB
./uxdot/uxdot-pattern-ssr-controller.js 213 B
./uxdot/uxdot-pattern.js 2.39 kB
./uxdot/uxdot-repo-status-checklist.js 1.39 kB
./uxdot/uxdot-repo-status-list.js 1.24 kB
./uxdot/uxdot-repo.js 867 B
./uxdot/uxdot-sidenav.js 2.04 kB
./uxdot/uxdot-spacer-tokens-table.js 2.45 kB
./uxdot/uxdot-toc.js 1.8 kB

compressed-size-action

Fix empty-line-before-comment, max-line-length, and formatting
issues in CSS custom property documentation comments.

Assisted-By: Claude Opus 4.6 (1M context) <[email protected]>
Remove JSDoc comments from --_ prefixed private CSS custom properties
(excluded from manifest). Improve slot documentation with content type
guidelines and accessibility considerations.

Assisted-By: Claude Opus 4.6 (1M context) <[email protected]>
Add brief comments explaining what each design token controls
within this component's context.

Assisted-By: Claude Opus 4.6 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant