feat: add recently added missing code from default-ui#1022
Merged
Conversation
LukasHirt
approved these changes
Jun 16, 2026
DeepDiver1975
left a comment
Member
There was a problem hiding this comment.
🤖 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-defaultnav-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.navigationfalsy) 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.navigationis evaluated on the component'slatestversion 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.componentsis iterated in exactly one place insrc/, 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.
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.
This PR adds recently added missing code from the default-ui.
Tested locally, works