Skip to content

feat: add recently added missing code from default-ui#1022

Merged
mmattel merged 1 commit into
masterfrom
add_missing_from_default_ui
Jun 17, 2026
Merged

feat: add recently added missing code from default-ui#1022
mmattel merged 1 commit into
masterfrom
add_missing_from_default_ui

Conversation

@mmattel

@mmattel mmattel commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

This PR adds recently added missing code from the default-ui.

Tested locally, works

@mmattel mmattel requested review from LukasHirt and phil-davis June 16, 2026 14:38

@DeepDiver1975 DeepDiver1975 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated review by Claude Code review agent.

Overview

This PR adds a single {{#if ./latest.navigation}} guard around each component <li> in src/partials/nav-explore.hbs, porting a change that already exists in the upstream Antora default-ui. The effect: components whose latest version exposes no navigation are no longer rendered in the explore panel's component list. The change is +2/-0 lines, one file.

Code quality / style

  • The added lines follow the existing indentation and Handlebars conventions in this file (block helpers placed on their own lines, ./ context-relative references consistent with the surrounding ./url, ./versions, etc.).
  • I diffed the modified partial against the current upstream antora-ui-default nav-explore.hbs. The block structure is an exact match: {{#if ./latest.navigation}} opens immediately after {{#each site.components}} and closes right before {{/each}}, wrapping the full <li class="component">…</li>. Bracket/nesting balance is correct.

Specific suggestions

  • None required. This is a faithful, minimal upstream sync.
  • Optional (non-blocking): a one-line comment or a reference to the upstream commit in the PR description would help future maintainers understand why the guard exists, but this is not necessary.

Potential issues / risks

  • Behavioral change to be aware of: any component whose latest version has no navigation (latest.navigation falsy) will now be hidden from the explore sidebar entirely — including its version sublist. This matches upstream intent and is almost certainly the goal, but it is a visible behavior change rather than a pure no-op. The author notes "tested locally, works," which covers the happy path.
  • latest.navigation is evaluated on the component's latest version while the version loop below still iterates all ./versions. This is consistent with upstream and fine: a component with a navigation-bearing latest version still lists older versions normally; the guard only suppresses components whose latest has no nav.
  • Scope is limited to this one partial. I confirmed site.components is iterated in exactly one place in src/, so there is no sibling template needing the same guard for consistency. No bundling/JS/build config is touched, so no regression risk there.

LGTM. Correct, minimal, and consistent with the upstream default-ui reference.

@mmattel mmattel merged commit d86b6fb into master Jun 17, 2026
3 checks passed
@mmattel mmattel deleted the add_missing_from_default_ui branch June 17, 2026 05:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants