Skip to content

Fix version dropdown links/labels and code-block styling#400

Merged
JakeSCahill merged 4 commits into
mainfrom
fix-version-dropdown-and-code-blocks
Jul 20, 2026
Merged

Fix version dropdown links/labels and code-block styling#400
JakeSCahill merged 4 commits into
mainfrom
fix-version-dropdown-and-code-blocks

Conversation

@JakeSCahill

Copy link
Copy Markdown
Contributor

Fixes three issues reported on streaming docs pages (e.g. the streaming/26.2 stretch-clusters preview).

1. Support policy link

The version selector's "Support policy" footer link fell back to https://docs.redpanda.com/current/reference/versions/. It now always points to the correct Enterprise Support Services and Policies article: https://support.redpanda.com/hc/en-us/articles/20682204531351-Enterprise-Support-Services-and-Policies.

2. Beta/prerelease version mislabeled "Latest"

When the current version is an Antora prerelease (e.g. 26.2 Beta), the pill, group, and rows all read "Latest".

  • Prerelease versions are now labeled "Beta" in a dedicated Beta group (violet styling, distinct from green Latest/Supported and amber EOL).
  • The latest GA version (page.component.latest) is promoted into the Latest group.
  • Detection uses the Antora prerelease flag and page.component.latest, matching the existing logic in latest-banner.hbs. Non-prerelease components are unaffected (the Beta group is empty and auto-hidden).

3. Inconsistent code-block styling

Confirmed via computed styles + light/dark screenshots:

  • Inner borderbase.css puts a border on every pre/code, which showed inside the .content frame (visible in dark mode). Removed from block pre.
  • Loose/uneven line spacing ("big gaps") — pre was 1.65 and inner code was 1.7; unified to 1.5.
  • Asymmetric paddingpre reserved 40px of top space for the hover toolbar (plus a code padding-bottom), leaving short blocks top-heavy. Now uses symmetric 16px top/bottom; the toolbar floats over the top-right on hover with a small backdrop for legibility.

Mirrored in doc-bump.css so the search/Ask-AI overlay code blocks match.

Testing

  • Verified locally with gulp preview in both light and dark themes: Beta group + violet styling, GA promoted to Latest, correct support link, and code blocks with no inner border, tight even spacing, balanced padding, and a legible floating toolbar.
  • preview-src/ui-model.yml gains a prerelease streaming version so the Beta path is exercisable in local preview.
  • gulp lint passes.

Version selector (src/partials/version-selector.hbs):
- Support policy footer link now always points to the Enterprise
  Support Services and Policies article (was the outdated
  docs.redpanda.com/current/reference/versions/ fallback).
- Prerelease versions are labeled "Beta" instead of "Latest", in a
  dedicated Beta group; the latest GA version is promoted into the
  Latest group. Detection uses the Antora prerelease flag and
  page.component.latest, matching latest-banner.hbs.
- Add violet "beta" status styling for the pill, rows, and the sticky
  top-bar indicator (component-home-v3.css, doc.css).

Code blocks (src/css/doc.css, mirrored in doc-bump.css):
- Remove the faint inner border on pre (base.css border showed inside
  the .content frame, visible in dark mode).
- Unify line-height to 1.5 (was 1.65 on pre vs 1.7 on code) to remove
  the loose, uneven line spacing.
- Symmetric 16px top/bottom padding; the hover toolbar now floats over
  the top-right with a legible backdrop instead of reserving 40px of
  top space that left short blocks top-heavy.

preview-src/ui-model.yml: add a prerelease streaming version so the
Beta grouping/styling is exercisable in local preview.
@netlify

netlify Bot commented Jul 14, 2026

Copy link
Copy Markdown

Deploy Preview for docs-ui ready!

Name Link
🔨 Latest commit 1e75375
🔍 Latest deploy log https://app.netlify.com/projects/docs-ui/deploys/6a5e453e14f09d000850bc09
😎 Deploy Preview https://deploy-preview-400--docs-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 30 (no change from production)
Accessibility: 89 (no change from production)
Best Practices: 92 (no change from production)
SEO: 89 (no change from production)
PWA: -
View the detailed breakdown and full score reports

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

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 68960839-d2de-4d06-ae48-6734d5d9fbd1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The version model now includes a 7.0 beta release. The version selector classifies prereleases as beta and separates them from current, supported, and end-of-life versions. Beta indicators receive light- and dark-theme styling. Documentation code blocks now use updated line heights and spacing, while source toolboxes receive revised alignment, positioning, backgrounds, borders, and shadows.

Sequence Diagram(s)

sequenceDiagram
  participant VersionConfig
  participant VersionSelector
  participant Browser
  VersionConfig->>VersionSelector: provide 7.0 prerelease entry
  VersionSelector->>VersionSelector: classify prerelease as beta
  VersionSelector->>Browser: render beta selector row and status
Loading

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested reviewers: michelerp

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main changes to version dropdown behavior and code-block styling.
Description check ✅ Passed The description matches the implemented fixes for the support link, beta labeling, and code-block styling.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-version-dropdown-and-code-blocks

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

The Beta status reused the violet that is the Limited Availability
badge color. Switch it to the canonical beta-label indigo
(--link-highlight-color / --indigo-400/600-new) so it matches the
existing Beta pill and stays distinct from Limited Availability.
The Beta status is the same amber as the .status-badge--beta pill shown
on beta pages (#fef3c7/#92400e/#fcd34d light, amber tint/#fcd34d dark),
rather than the indigo .badge--beta variant, so the dropdown matches the
Beta indicator users actually see on the page.
@JakeSCahill
JakeSCahill requested a review from micheleRP July 14, 2026 15:45

@micheleRP micheleRP left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed against docs-team standards and ran a light/dark render check locally (built the preview, screenshotted the version selector and code blocks in both themes). Code-block changes (issue #3) look good in both themes — no inner/double border, symmetric padding, legible floating toolbar. One should-fix on the version selector, inline below.

Side note: I checked this with a local /render-check command (full build + Playwright screenshots in light and dark). I could add it to the docs-team-standards plugin in PR #2864 if you want it there for team.

box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.sm-ver-pill-dot[data-status="beta"] {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should fix: Beta and EOL render in the same amber palette — they're not distinguishable, especially in dark mode.

The PR description says Beta gets "violet styling, distinct from ... amber EOL," but the CSS here uses amber, and several rules are the same value as EOL:

Element EOL Beta
pill dot bg #f59e0b #fbbf24
pill status (dark) #fcd34d #fcd34d — identical
pill status (light) #d97706 #92400e
row status text #92400e #92400e — identical
row status (dark) #fcd34d #fcd34d — identical

Confirmed visually. In light mode Beta and EOL differ only by a slightly deeper fill; in dark mode they're effectively identical — same yellow text, same dark-amber background, same dot:

Light — Beta (v7.0) vs End of life (v5.0):
(screenshot)

Dark — Beta and EOL nearly indistinguishable:
(screenshot)

Since Beta (brand-new) and EOL (dead) mean opposite things, the color coding needs to separate them. A violet palette already exists in the repo (doc.css: #c4b5fd / #9333ea / #c084fc, used for "important" admonitions) — pointing the data-status="beta" rules at those would match the description and give a clear three-way distinction (green Latest/Supported, violet Beta, amber EOL). Applies to all beta rules added in this file (pill dot, pill status light/dark, row status light/dark, row note) plus the mirror in doc.css (.component-indicator-sticky .sm-ver-pill-status[data-status="beta"]).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

beta-eol-version-selector-dark beta-eol-version-selector-light

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@JakeSCahill flagging for action: this Beta/EOL amber collision is the first of two should-fixes from the final-pass review — either give Beta a genuinely distinct hue (the PR description says violet) or update the description.

@Feediver1 Feediver1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review (docs-team-standards, UI tooling focus)

Overall: All three fixes are sound and the template logic is correct for production. @micheleRP's should-fix (Beta color) stands, and one more should-fix surfaced that screenshots couldn't reveal: the preview model can't actually exercise the new Latest-group logic.

Endorsing the existing should-fix

The Beta-vs-EOL amber collision @micheleRP flagged is confirmed in the diff (identical #fcd34d in dark-mode pill status and row status). Either switch Beta to a genuinely distinct hue or correct the PR description's "violet" claim — the whole point of the Beta group is that it isn't EOL.

New findings

  1. [Should fix — preview-src/ui-model.yml] The preview can't render the Latest group at all. The template's new logic keys on page.component.latest.version (matching Antora's runtime model and latest-banner.hbs), but the preview model defines only latestVersion: on the component — latest is undefined in the gulp preview. Result: in every preview render the Latest group is empty (auto-hidden by updateCounts()) and v6.0 silently falls into "Supported." This PR adds a 7.0 Beta fixture specifically so the preview demos the new grouping, yet the Latest half of that demo is invisible — and since review here is screenshot-driven, that's a QA blind spot. One-line fix: add latest: *latest_version_xyz to the Streaming component in the preview model.
  2. [Verified OK] The new Beta group needs no JS changes: 22-version-selector.js updateCounts() iterates all .sm-ver-group elements generically — counts fill in and empty groups hide, including the new one.
  3. [Verified OK] Dropping the eol-doc config branch is safe in practice: neither docs nor cloud-docs sets that attribute in antora.yml, so no consumer loses the hook. Minor note: the Zendesk article ID is now hardcoded in the template, so a support-portal restructure requires a docs-ui release to fix the link — acceptable, worth knowing.
  4. [Verified OK] Group exclusion logic: prerelease versions are excluded from Latest (and (not ./prerelease) …), Supported (nested unless), and EOL; an all-prerelease component degrades correctly (Beta only, Latest hidden).

What works well

  • Detection reuses the established latest-banner.hbs semantics instead of inventing a second definition of "latest"
  • The doc.css/doc-bump.css toolbox rules are kept in lockstep, which is exactly where these two files historically drift
  • The floating-toolbox tradeoff (covers code on hover) is documented in a comment at the rule, not just in the PR

🤖 Automated review via docs-team-standards pr-review (UI tooling focus).

Comment thread preview-src/ui-model.yml
url: /streaming/24.3/index.html
urlType: internal
versions:
- version: '7.0'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@JakeSCahill second should-fix from the final-pass review: the template's new Latest-group logic keys on page.component.latest.version, but this preview model only defines latestVersion: — so in every gulp preview the Latest group renders empty (auto-hidden) and v6.0 falls into Supported. The 7.0 Beta fixture added here demos the Beta group, but the Latest half of the demo is invisible to screenshot review. One-line fix alongside this fixture: add latest: *latest_version_xyz to the Streaming component.

Addresses the two should-fix findings from the final-pass review on #400.

- Beta/EOL amber collision: Beta rows/pill were amber and byte-identical
  to EOL in dark mode. Repoint all data-status="beta" rules at the repo's
  existing violet palette (matching .status-badge--la and the "important"
  admonition), giving a clear three-way split: green Latest/Supported,
  violet Beta, amber EOL. Mirrored in the doc.css sticky rules.
- Preview couldn't render the Latest group: the template keys on
  page.component.latest.version but the Streaming fixture only defined
  latestVersion. Add latest: *latest_version_xyz so gulp preview exercises
  the Latest group (v6.0) instead of dropping it into Supported.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

@micheleRP micheleRP left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Re-review: both should-fixes resolved ✅

Verified commit 1e75375 against the two should-fixes from the final-pass review. Both are addressed. Approving.

1. Beta/EOL amber collision → fixed

Every data-status="beta" rule was repointed from amber to violet, in both component-home-v3.css and the doc.css sticky mirror:

Element Was (amber, collided w/ EOL) Now (violet)
pill dot bg #fbbf24 #c084fc
pill status (dark) #fcd34d (identical to EOL) #c4b5fd
pill status (light) #92400e #7c3aed
row status (light) #92400e / bg #fef3c7 #5b21b6 / bg #ede9fe
row status (dark) #fcd34d (identical to EOL) #c4b5fd / bg rgba(139,92,246,.15)
row note (light/dark) #b45309 / #fcd34d #7c3aed / #c4b5fd
doc.css sticky (light/dark) #92400e / #fcd34d #7c3aed / #c4b5fd

These match the existing violet "important" admonition palette (#c4b5fd / #c084fc). Beta is now a clean three-way distinction from green Latest/Supported and amber EOL, and the description's "violet" claim is accurate.

2. Preview can't render the Latest group → fixed

latest: *latest_version_xyz added to the Streaming component. The anchor resolves to the version: '6.0' object, so page.component.latest.version now resolves and v6.0 renders in the Latest group in gulp preview instead of falling into Supported. QA blind spot closed.

Notes

  • Commit 1e75375 touches only the eight color values and the one YAML line — no new logic, no scope creep. All prior "Verified OK" items are unaffected.
  • Confirmed by code inspection (values are unambiguously violet); I did not re-run a full render-check for the color swap.

@JakeSCahill
JakeSCahill merged commit f0e8001 into main Jul 20, 2026
6 checks passed
@JakeSCahill
JakeSCahill deleted the fix-version-dropdown-and-code-blocks branch July 20, 2026 18:38
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