Skip to content

Fix connector license notice disappearing and support server-rendered metadata#403

Merged
JakeSCahill merged 2 commits into
mainfrom
fix/connector-license-metadata
Jul 21, 2026
Merged

Fix connector license notice disappearing and support server-rendered metadata#403
JakeSCahill merged 2 commits into
mainfrom
fix/connector-license-metadata

Conversation

@JakeSCahill

@JakeSCahill JakeSCahill commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Problem

On Redpanda Connect connector pages, the enterprise license notice flashed on page load and then disappeared (DOC-2383). 24-move-connector-metadata.js moves the Type dropdown and availability info into the sticky bar, then hides the entire .metadata-block - including the license notice it never moved. This affects all enterprise connectors (reported via the docs feedback form for postgres_cdc).

Changes

  • src/js/24-move-connector-metadata.js: hide only the elements actually moved into the sticky bar (Type dropdown wrapper and the "Available in:" paragraph). The whole block is hidden only when nothing meaningful remains, so the license notice stays visible in the body.
  • src/helpers/resolve-resource.js: pass root-relative URLs (/connect/...) through unchanged. The companion change in docs-extensions-and-macros (fix: render connector sticky-bar metadata server-side, keep license notice visible docs-extensions-and-macros#216) sets page-context-switcher with pub.url values, which are not resolvable resource IDs; without this the context-switcher partial logs an unresolved-resource warning per link.

Why this happens on every connector page

The macro in docs-extensions-and-macros already tried to set the sticky-bar page attributes that article.hbs renders server-side, but attributes set by Asciidoctor extensions can never reach UI templates: Antora extracts page attributes in a header-only parse with extensions disabled, and convertDocument only re-extracts metadata when page.asciidoc is unset (it never is). So every connector page falls back to the client-side script. The companion PR moves the attribute-setting to the documentsConverted event, which makes the sticky bar render at build time with no flash. This PR's script fix then acts as a safety net for content built with older extension versions.

Testing

  • Reproduced the full pipeline in an isolated Antora build (real extension + macro + this UI bundle): sticky-bar metadata renders server-side, license notice stays visible, availability badges and context switcher correct for self-managed, cloud, and self-managed-only connectors.
  • Verified the script fix in a browser harness against live postgres_cdc markup: license paragraph stays visible, availability paragraph hidden, sticky bar populated; non-enterprise pages unchanged.
  • gulp lint passes.

Rollout

Release this first (fixes the disappearing license immediately), then release the extensions change and rebuild the docs to eliminate the flash entirely.

🤖 Generated with Claude Code

… metadata

The move-connector-metadata script hid the entire .metadata-block after
moving the Type dropdown and availability info into the sticky bar, which
also hid the enterprise license notice it never moved (DOC-2383). Hide only
the moved elements and keep the block visible when other content remains.

Also pass root-relative URLs through resolve-resource unchanged: the
context-switcher attribute set by the generate-rp-connect-info extension
uses pub.url values, which are not resolvable resource IDs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@netlify

netlify Bot commented Jul 21, 2026

Copy link
Copy Markdown

Deploy Preview for docs-ui ready!

Name Link
🔨 Latest commit e4ce5a0
🔍 Latest deploy log https://app.netlify.com/projects/docs-ui/deploys/6a5f85396745460008ce9928
😎 Deploy Preview https://deploy-preview-403--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: 29 (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 21, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5cc287fe-6b2b-471e-8dae-feceb6bc10e0

📥 Commits

Reviewing files that changed from the base of the PR and between f0e8001 and e4ce5a0.

📒 Files selected for processing (3)
  • src/css/doc.css
  • src/helpers/resolve-resource.js
  • src/js/24-move-connector-metadata.js

📝 Walkthrough

Walkthrough

The changes preserve root-relative resource URLs, selectively hide connector metadata after moving type and availability controls into the sticky bar, and keep remaining notices visible. Sticky indicator layout and mobile dropdown positioning are adjusted, with new light and dark availability badge link styles and a self-managed-only badge.

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 matches the main change: preserving the license notice and supporting server-rendered connector metadata.
Description check ✅ Passed The description is directly related to the implemented fixes and supporting context in the changeset.
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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/connector-license-metadata

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install timed out. The project may have too many dependencies for the sandbox.


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 server-rendered availability badges (status-badge--cloud-link,
--self-managed-link, --self-managed-only) had no styles - this path never
rendered before, so they appeared as bare underlined links. Style them to
match the other status badges, with hover states and dark-theme variants.

Let the sticky bar wrap at all widths: between 1025px and ~1200px a crowded
bar (pill, version selector, badges, type switcher) overflowed into the
right column because flex-wrap only applied below 1024px.

Anchor the context-switcher dropdown menu left on mobile - it was
right-anchored, which pushed most of the menu off screen when the metadata
row is left-aligned.

Co-Authored-By: Claude Fable 5 <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.

lgtm

@JakeSCahill
JakeSCahill merged commit dc31210 into main Jul 21, 2026
6 checks passed
@JakeSCahill
JakeSCahill deleted the fix/connector-license-metadata branch July 21, 2026 18:36
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.

2 participants