Skip to content

feat: style enterprise feature terms and activate their tooltips - #413

Open
JakeSCahill wants to merge 7 commits into
mainfrom
enterprise-macro-preview
Open

feat: style enterprise feature terms and activate their tooltips#413
JakeSCahill wants to merge 7 commits into
mainfrom
enterprise-macro-preview

Conversation

@JakeSCahill

@JakeSCahill JakeSCahill commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Companion to docs-extensions-and-macros#249 (DOC-887): implements the visual treatment for enterprise feature terms so readers learn to recognize license-gated features at a glance.

What this adds

  • Styling (src/css/tooltips.css, alongside the glossary-term rules): a dotted underline in --link-highlight-color matching the glossary affordance, plus a small lock glyph after the term rendered as an SVG mask filled with the same variable, so dark mode adapts automatically.
  • Tooltips (src/js/12-activate-tooltips.js): elements with data-enterprise-tooltip are activated as tippy tooltips with the site's standard config. The macro's default title variant keeps the native browser tooltip, so pages work before and after this UI change.
  • Preview page (preview-src/enterprise-macro-test.adoc): all four macro output shapes as fixtures, with the styling notes describing the implemented treatment.

Verification

Built the UI preview (gulp preview:build, lint passes) and verified in Chrome: dotted underline + lock glyph on all four fixtures in light mode, tippy tooltip rendering on hover for the data-enterprise-tooltip variant, and automatic adaptation in dark mode via the --link-highlight-color override.

🤖 Generated with Claude Code

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.
@netlify

netlify Bot commented Aug 6, 2026

Copy link
Copy Markdown

Deploy Preview for docs-ui ready!

Name Link
🔨 Latest commit d2a6fb1
🔍 Latest deploy log https://app.netlify.com/projects/docs-ui/deploys/6a7793247b17ae00089609ba
😎 Deploy Preview https://deploy-preview-413--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: 26 (🔴 down 4 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
🤖 Make changes Run an agent on this branch

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

@coderabbitai

coderabbitai Bot commented Aug 6, 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 Plus

Run ID: 9ba41edd-41e5-4dd4-ab37-b425ccbe868e

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

Added an AsciiDoc test page for enterprise macro rendering. The page covers default linked output, custom feature xrefs, unlinked output, and the data-enterprise-tooltip variant. It also documents styling guidance for .enterprise-feature indicators and tooltips.

Estimated code review effort: 1 (Trivial) | ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
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.
Title check ✅ Passed The title clearly describes the enterprise feature styling and tooltip behavior covered by the pull request objectives.
Description check ✅ Passed The description explains the enterprise macro preview, styling, tooltip behavior, and verification related to the changeset.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch enterprise-macro-preview

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.

@coderabbitai coderabbitai Bot 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.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 7533ea4 and 1bacecf.

📒 Files selected for processing (1)
  • preview-src/enterprise-macro-test.adoc

Comment thread preview-src/enterprise-macro-test.adoc Outdated
The enterprise inline macro (docs-extensions-and-macros#249, DOC-887)
emits spans with the enterprise-feature class. Style them with the
glossary-style dotted underline plus a small lock glyph, both in
--link-highlight-color so dark mode adapts, and activate tippy on
data-enterprise-tooltip. Verified in the UI preview in light and dark
modes, including tooltip hover.
@JakeSCahill

Copy link
Copy Markdown
Contributor Author

Styling implemented on this branch (was previously markup fixtures only): dotted --link-highlight-color underline matching the glossary affordance, a lock glyph after the term (SVG mask filled with the same variable, so dark mode adapts automatically), and tippy activation for data-enterprise-tooltip. Verified in the built UI preview in Chrome: light mode, dark mode, and tooltip hover all render correctly. The macro's default title variant keeps the native tooltip, so docs pages can adopt the macro before or after this ships.

@JakeSCahill JakeSCahill changed the title preview: add enterprise macro test page feat: style enterprise feature terms and activate their tooltips Aug 7, 2026
Enterprise-only configuration properties now carry the same visual
vocabulary as enterprise feature terms: the lock icon appears inline
after the property name (new is-enterprise-property class, set by the
property tooltip JS) and inside the tooltip's enterprise badge. The
lock SVG moves to a shared --enterprise-lock-icon variable, filled with
--link-highlight-color inline and currentColor in badges so both themes
adapt.
@JakeSCahill

Copy link
Copy Markdown
Contributor Author

Extended the lock treatment to enterprise-only configuration properties, so one icon means "enterprise-gated" everywhere:

  • Inline property references that are enterprise-only (per the property JSON's is_enterprise) get the same lock glyph after the term, via a new is-enterprise-property class set by 19-property-tooltips.js.
  • The property tooltip's ENTERPRISE badge gains the lock before its label, filled with currentColor so the light and dark badge palettes both work.
  • The lock SVG now lives in a shared --enterprise-lock-icon variable in vars.css, consumed by the enterprise macro styling and both property surfaces.

Verified in the built preview: cloud_storage_enabled renders the inline lock while non-enterprise properties stay clean, and the hover tooltip shows CLUSTER / RESTART REQUIRED / 🔒 ENTERPRISE. Lint passes.

The 0.7em inline and 0.8em badge locks were hard to read at body font
sizes.
The variable landed in the html:not([data-theme=dark]) block, so in
dark mode the mask resolved to nothing and the lock rendered as a solid
square. Move it to the theme-independent :root block. Caught while
screenshotting the feature in dark mode.
@JakeSCahill

Copy link
Copy Markdown
Contributor Author

Screenshots of the final treatment (0.9em lock, dark-mode variable fix included). Images live on the pr-413-assets branch, which can be deleted after merge.

Enterprise macro terms, light mode - dotted underline + lock on all four output variants:

Enterprise macro terms in light mode

Tooltip on hover (data-enterprise-tooltip via tippy):

Enterprise tooltip on hover

Dark mode - the lock and underline pick up the dark --link-highlight-color automatically:

Enterprise macro terms in dark mode

Enterprise-only property, dark mode - inline lock on cloud_storage_enabled plus the lock in the tooltip's ENTERPRISE badge:

Enterprise property with tooltip in dark mode

Note the last commit (c7057b6): screenshotting dark mode caught a real bug - the shared lock variable had landed in the light-theme-only :root block, so dark mode rendered solid squares. It now lives in the theme-independent block.

JakeSCahill and others added 2 commits August 8, 2026 19:07
Expands the test page from four basic shapes to the macro's full
surface: default, feature xref, display text override, tooltip
override, links disabled, tooltip disabled, the data-enterprise-tooltip
variant, and an unstyled custom role. Adds stress contexts for the lock
glyph and underline (multiple terms with punctuation, long names
wrapping in narrow containers, list items, table cells, admonitions)
and shows the shared lock on code.is-enterprise-property alongside a
plain code element for comparison.
The enterprise macro fixture replicated the macro's rendered markup but
used href="#" everywhere, so the two sections that demonstrate link
resolution did not show where the macro actually points.

buildEnterpriseContent (macros/enterprise.js:215) links to the feature
page whenever the registry entry resolves an xref and only falls back to
the licensing page when it does not. So the default-output section now
uses Topic Deletion Control, which the registry deliberately leaves
without an xref ("No dedicated feature page"), and the feature-xref
section keeps Tiered Storage. Both hrefs are the published URLs those
resource IDs resolve to.

The remaining sections keep placeholder targets because they vary only
tooltip, role, and link handling; the intro says so.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.

1 participant