Skip to content

Remove redundant header from API reference pages#25235

Open
dvdksn wants to merge 2 commits into
docker:mainfrom
dvdksn:worktree-remove-api-header
Open

Remove redundant header from API reference pages#25235
dvdksn wants to merge 2 commits into
docker:mainfrom
dvdksn:worktree-remove-api-header

Conversation

@dvdksn
Copy link
Copy Markdown
Contributor

@dvdksn dvdksn commented Jun 2, 2026

Summary

The API reference layout (layouts/api.html) rendered a custom header above the ReDoc explorer with a duplicate title/description and Open Markdown / Download OpenAPI specification links. ReDoc already renders the title and description from the spec, so this header was redundant. This removes the header section and its now-unused CSS, while keeping the non-visible <link rel="alternate"> discovery metadata in the <head>.

Affects all API reference pages using the layout: api cascade (Engine, Hub, Registry, etc.).

Generated by Claude Code

The API reference layout rendered a custom header above the ReDoc
explorer with a duplicate title/description and "Open Markdown" /
"Download OpenAPI specification" links. ReDoc already renders the
title and description from the spec, so this header was redundant.
Remove the header section and its now-unused CSS, keeping the
non-visible <link rel="alternate"> discovery metadata in the head.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@netlify
Copy link
Copy Markdown

netlify Bot commented Jun 2, 2026

Deploy Preview for docsdocker ready!

Name Link
🔨 Latest commit f0be2b6
🔍 Latest deploy log https://app.netlify.com/projects/docsdocker/deploys/6a1eb35dcd00de00084a0eaf
😎 Deploy Preview https://deploy-preview-25235--docsdocker.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.

@dvdksn dvdksn added the status/review Pull requests that are ready for review label Jun 2, 2026
@github-actions github-actions Bot added the hugo Updates related to hugo label Jun 2, 2026
@dvdksn dvdksn requested a review from a team June 2, 2026 10:20
Copy link
Copy Markdown

@docker-agent docker-agent left a comment

Choose a reason for hiding this comment

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

Assessment: 🟡 NEEDS ATTENTION

This PR removes the api-shell header section (title, description, and action links) from the API reference layout, relying on ReDoc to render the spec's own title and description. The <link rel="alternate"> discovery metadata in <head> is correctly preserved. Two medium-severity UX concerns are flagged below.

Comment thread layouts/api.html
Comment thread layouts/api.html
>
</li>
</ul>
<noscript>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[MEDIUM] noscript fallback guidance removed — JS-disabled users see a blank page with no alternative

The removed section included a <noscript> block that directed users with JavaScript disabled to the Markdown page or OpenAPI download as alternatives to the interactive ReDoc explorer. Without it, a JS-disabled user now sees only an empty <article class="redoc-container"> with no content and no instructions.

The <link rel="alternate"> head tags are parsed by browsers/tools but are invisible to a human reading the page. Consider adding a minimal <noscript> notice elsewhere in the template (e.g., inside the redoc-container article) to preserve this accessibility fallback.

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.

@dvdksn We should probably still keep the <noscript> part (added originally in 67c1e98 / #23944

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thanks for confirming! Since the entire .api-shell section is being removed (which makes sense if you're simplifying the layout), the <noscript> could be reintroduced inside the redoc-container article itself. Something like:

<article class="redoc-container">
  <noscript>
    <p style="padding: 2rem; max-width: 72ch;">
      This reference uses JavaScript for the interactive explorer. 
      View the <a href="{{ partial "utils/markdown-url.html" . }}">Markdown page</a> 
      or <a href="{{ $specURL.String | absURL }}">download the OpenAPI specification</a> 
      if JavaScript is unavailable.
    </p>
  </noscript>
  {{ if or (strings.HasPrefix .RelPermalink "/reference/api/hub/") ... }}

This keeps the accessibility fallback without bringing back the removed header section.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good call — restored in f0be2b6. I kept the visible header/action links removed (per @dvdksn, intentional) but reintroduced the <noscript> fallback inside the redoc-container article, with links to the Markdown page and OpenAPI spec for JS-disabled users.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Great, thanks for restoring it! That strikes a good balance — keeping the cleaner layout you wanted while preserving the accessibility fallback for JS-disabled users. The placement inside redoc-container makes sense since that's exactly where the content would otherwise be missing.

Marking this as resolved.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

"JS-disabled users", what a weird phrase :-D

Keep the JavaScript-disabled fallback guidance (originally added in
docker#23944) by reintroducing a <noscript> block inside the redoc-container
article, with links to the Markdown page and OpenAPI spec. The visible
header and its action links remain removed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copy link
Copy Markdown
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

LGTM; perhaps squash the commits?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hugo Updates related to hugo status/review Pull requests that are ready for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants