Skip to content

Make property tooltips opt-in via prop macro markers - #415

Open
JakeSCahill wants to merge 4 commits into
enterprise-macro-previewfrom
prop-macro-opt-in
Open

Make property tooltips opt-in via prop macro markers#415
JakeSCahill wants to merge 4 commits into
enterprise-macro-previewfrom
prop-macro-opt-in

Conversation

@JakeSCahill

@JakeSCahill JakeSCahill commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

In plain English

Property tooltips used to appear on any inline code that happened to match a property name -- including ordinary words like admin that mean something else on Helm and Kubernetes pages, so readers saw confident, wrong tooltips. From now on, the UI only decorates code that the docs' prop: macro explicitly marked (and the macro verified the name at build time), so a tooltip can be trusted: someone said it's a property, and the build checked. The tooltip's "view full documentation" link now also stays inside whichever doc set the reader is in (cloud pages link to cloud's property pages, not streaming's), and macro text that leaks into tooltip descriptions renders as clean code instead of raw markup. The trade during rollout: tooltips are briefly absent from prose until the companion docs PR lands -- absent, never wrong.

Full explainer: macros/PROPERTY_AND_ENTERPRISE_REFERENCES.adoc in docs-extensions-and-macros#254.

Description

Companion to redpanda-data/docs-extensions-and-macros#254 (the prop: macro). Stacked on #413 — merge that first.

Property tooltips currently decorate every <code> element whose text matches a property name. The published JSON contains 5 separator-free names (admin, brokers, rack, retries, superusers) that are common words in Helm/Kubernetes/Connect contexts — admin gets a Broker-property tooltip where it actually means an audit-logging value in the Helm chart.

19-property-tooltips.js now selects only code[data-property-name] / code.property-ref — the markers the prop: macro emits after validating the name against the same published JSON at build time. The lookup key comes from data-property-name, so display-text overrides keep working. Everything else (tooltip content, enterprise lock styling, touch/keyboard a11y) is unchanged.

The preview test page simulates macro output with pass-through HTML and now includes explicit negative cases: real property names in plain backticks (the old auto-match behavior) must stay undecorated, as must a marked element with an unknown name.

Validation

  • gulp lint clean, preview:build renders 11 marked elements on the test page.
  • Review visually on the deploy preview: /property-tooltips-test — marked names get tooltips (including the dotted and enterprise ones), the "Unmarked property names" section gets none.

Rollout note: tooltips disappear from docs prose until the docs repo runs doc-tools generate migrate-property-refs and registers the macro (companion docs PR does both in one change), so these should merge close together.

@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

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: 86f715b5-a730-4e5f-bd52-455c702aea0d

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

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.

Property tooltips previously decorated every inline code element whose
text matched a property name, so ambiguous words such as admin, brokers,
rack, retries, and superusers picked up tooltips in unrelated contexts
(the admin listener in Helm values, audit-logging settings). Tooltips
now decorate only elements emitted by the prop: AsciiDoc macro (class
property-ref plus data-property-name), which validates names against
the published property JSON at build time.

The lookup name comes from data-property-name, so display text
overrides keep working. The test page simulates macro output with
pass-through HTML and asserts the old false-positive cases stay
undecorated.
…pages

Config properties are published in several components (streaming, cloud,
and sometimes agentic-data-plane and connect), but the tooltip's View
full documentation link hardcoded streaming's URL space, so cloud pages
linked back into streaming.

head-meta now emits a properties-pages-url meta tag resolved through
resolve-resource WITHOUT an explicit component, so it resolves
reference:properties/cluster-properties.adoc in the current page's own
component and version. The tooltip swaps the property's scope into that
URL. Components without property pages omit the tag (and unresolved
preview placeholders are ignored), falling back to the previous
streaming-relative behavior.
Generated property descriptions can contain prop macro calls (the
property extractor now emits them for cross-property references), and
older published JSONs still carry legacy config_ref calls. Both
previously showed as raw macro text inside tooltips. The description
formatter now renders them as code, honoring the prop macro's text=
display override and config_ref's payload.
The properties-pages-url meta resolves a property reference page in the
current page's own component, which legitimately does not exist for
most components (home, labs, connect, search, and older versions with
the flat layout). Those misses produced eight unresolved-resource
warnings per build. A caller that passes fallback= (even an empty one)
declares the resolution optional and handles the miss itself, so the
helper no longer logs for it.
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