Fix connector license notice disappearing and support server-rendered metadata#403
Conversation
… 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>
✅ Deploy Preview for docs-ui ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe 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: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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
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. Comment |
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>

Problem
On Redpanda Connect connector pages, the enterprise license notice flashed on page load and then disappeared (DOC-2383).
24-move-connector-metadata.jsmoves 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 forpostgres_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) setspage-context-switcherwithpub.urlvalues, 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.hbsrenders 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, andconvertDocumentonly re-extracts metadata whenpage.asciidocis unset (it never is). So every connector page falls back to the client-side script. The companion PR moves the attribute-setting to thedocumentsConvertedevent, 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
postgres_cdcmarkup: license paragraph stays visible, availability paragraph hidden, sticky bar populated; non-enterprise pages unchanged.gulp lintpasses.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