preview: add enterprise macro test page - #413
Conversation
Replicates the exact HTML emitted by the enterprise inline macro (docs-extensions-and-macros#249, DOC-887) so the enterprise-feature class can be developed and styled against real markup in the UI preview.
✅ Deploy Preview for docs-ui ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
📝 WalkthroughWalkthroughAdded an AsciiDoc test page for enterprise macro rendering. The page covers default linked output, custom feature xrefs, unlinked output, and the Estimated code review effort: 1 (Trivial) | ~3 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@preview-src/enterprise-macro-test.adoc`:
- Line 11: The fixture uses placeholder href="#" values instead of generated
macro targets. In preview-src/enterprise-macro-test.adoc, update line 11 to the
licensing-page URL produced by enterprise:Continuous Data Balancing[], and
update line 19 to the feature xref URL produced by enterprise:Tiered
Storage[xref=manage:tiered-storage.adoc].
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 82821221-12d5-4740-9732-f77e0dd3c3ed
📒 Files selected for processing (1)
preview-src/enterprise-macro-test.adoc
| The macro `enterprise:Continuous Data Balancing[]` renders: | ||
|
|
||
| ++++ | ||
| <p>This cluster uses <span class="enterprise-feature" title="Continuous Data Balancing requires an Enterprise Edition license."><a href="#" class="xref page">Continuous Data Balancing</a></span> to spread partitions evenly.</p> |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "## files"
git ls-files | rg '(^|/)enterprise-macro-test\.asciidoc$|(^|/)enterprise-macro-test\.adoc$' || true
echo
echo "## target file"
if [ -f preview-src/enterprise-macro-test.adoc ]; then
cat -n preview-src/enterprise-macro-test.adoc
fi
echo
echo "## macro occurrences in repo"
rg -n "enterprise:\[A-Za-z].+\[|\]|\(href=\"#\" class=\"xref page\"\)|class=\"enterprise-feature\"" .
echo
echo "## relevant generated/adoc fixtures"
git ls-files 'preview-src/*' | sort | tail -80Repository: redpanda-data/docs-ui
Length of output: 50380
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "## target file exact"
cat -n preview-src/enterprise-macro-test.adoc
echo
echo "## tracked enterprise macro/preview files"
git ls-files | rg '(^|/)enterprise-macro-test\.adoc$|enterprise-macro|enterprise.*macro|features|xref|asciidoc\.adoc|attributes\.asciidoc|antora.*\.yml$' | sed -n '1,200p'
echo
echo "## search enterprise macro usages in tracked asciidoc/adoc files only"
git ls-files '*.adoc' '*.asciidoc' \
| xargs rg -n 'enterprise:|class="enterprise-feature"|href="#" class="xref page"|xref=manage:tiered-storage\.adoc' \
--glob '*.adoc' --glob '*.asciidoc' || true
echo
echo "## search attributes/config files for enterprise licensing default link"
git ls-files | rg '(^|/)(package\.json|antora\.yml|.*\.yml|.*\.json|.*\.adoc|.*\.asciidoc)$' \
| xargs rg -n 'enterprise-?licensing|licensing\.adoc|tiered-storage|Continuous Data Balancing|Tiered Storage|license|enterprise-feature' \
--glob '*.adoc' --glob '*.asciidoc' --glob '*.yml' --glob '*.json' \
| sed -n '1,240p'Repository: redpanda-data/docs-ui
Length of output: 16745
🌐 Web query:
docs-extensions-and-macros enterprise inline macro Continuous Data Balancing licensing page link
💡 Result:
The query appears to conflate two distinct topics: the Redpanda docs-extensions-and-macros library and the Continuous Data Balancing feature in Redpanda [1][2]. 1. Continuous Data Balancing: This is a Redpanda feature that requires an enterprise license to operate [1]. Detailed information on how to configure this feature, along with links to obtain or purchase a license, can be found on the official Redpanda documentation page for Continuous Data Balancing [1]. 2. docs-extensions-and-macros: This is an open-source library maintained by Redpanda for managing their technical documentation [2]. It includes Antora extensions, AsciiDoc macros, and automation tools used by the documentation team to generate reference content [2][3]. It is not a licensing mechanism for enterprise features [2]. The library repository and its usage documentation are available on GitHub [2][3]. There is no "enterprise inline macro" for licensing Continuous Data Balancing; licensing is handled at the cluster configuration level [1].
Citations:
- 1: https://docs.redpanda.com/docs/platform/manage/cluster-maintenance/continuous-data-balancing/
- 2: https://github.com/redpanda-data/docs-extensions-and-macros
- 3: https://github.com/redpanda-data/docs-extensions-and-macros/blob/main/CLAUDE.md
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "## docs-extensions-and-macros repository status"
git remote -v || true
git ls-remote --tags git@github.com:redpanda-data/docs-extensions-and-macros.git 2>/dev/null || true
git ls-remote --tags https://github.com/redpanda-data/docs-extensions-and-macros.git 2>/dev/null | sed -n '1,120p' || true
echo
echo "## package manifests referencing docs-extensions-and-macros"
cat package.json 2>/dev/null | sed -n '1,220p'
cat package-lock.json 2>/dev/null | rg -n "docs-extensions-and-macros|enterprise" -C 2 || trueRepository: redpanda-data/docs-ui
Length of output: 3220
Use real macro link targets in the fixture.
These href="#" anchors do not represent the generated linked markup; update line 11 to the licensing-page URL for enterprise:Continuous Data Balancing[] and line 19 to the feature xref URL for enterprise:Tiered Storage[xref=manage:tiered-storage.adoc].
📍 Affects 1 file
preview-src/enterprise-macro-test.adoc#L11-L11(this comment)preview-src/enterprise-macro-test.adoc#L19-L19
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@preview-src/enterprise-macro-test.adoc` at line 11, The fixture uses
placeholder href="#" values instead of generated macro targets. In
preview-src/enterprise-macro-test.adoc, update line 11 to the licensing-page URL
produced by enterprise:Continuous Data Balancing[], and update line 19 to the
feature xref URL produced by enterprise:Tiered
Storage[xref=manage:tiered-storage.adoc].

Companion to docs-extensions-and-macros#249 (DOC-887): adds a UI preview page that replicates the exact HTML the new
enterpriseinline macro emits, so theenterprise-featureclass can be developed and styled against real markup.Covers all four output shapes: default (licensing-page link), feature xref, link-disabled plain span, and the
data-enterprise-tooltipvariant for UI-driven tooltips. Includes styling suggestions from the ticket (distinguishing glyph or accent underline, tooltip hover treatment matching glossary terms).The macro ships with a graceful default (native
titletooltip, standard link styling), so this styling work does not block adoption - but this page is where it happens.🤖 Generated with Claude Code