Skip to content

Add :applies_to: prop to admonitions - #1961

Merged
reakaleek merged 6 commits into
mainfrom
feature/applies-to-admonitions
Sep 29, 2025
Merged

reakaleek merged 6 commits into
mainfrom
feature/applies-to-admonitions

Conversation

@reakaleek

@reakaleek reakaleek commented Sep 29, 2025 •

Copy link
Copy Markdown
Member

Changes

  • Add :applies_to: prop handling for adminitions
  • Change styling to make it work with applies_to

Screenshot

image

@reakaleek
reakaleek requested review from a team as code owners September 29, 2025 13:08
@reakaleek
reakaleek requested a review from Mpdreamz September 29, 2025 13:08
@reakaleek
reakaleek marked this pull request as draft September 29, 2025 13:11
@github-actions

github-actions Bot commented Sep 29, 2025 •

Copy link
Copy Markdown
Contributor

🔍 Preview links for changed docs

@reakaleek reakaleek self-assigned this Sep 29, 2025
@reakaleek
reakaleek marked this pull request as ready for review September 29, 2025 13:29

@Mpdreamz Mpdreamz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do think the styling of the applies switcher is the exception.

Can discuss later though not blocking the pr.

@florent-leborgne

florent-leborgne commented Sep 29, 2025 •

Copy link
Copy Markdown
Member

Maybe due to the colored nature of admonitions but I do find the extra information less visible (recognizable might be a better word) than I'd like it to be.
I think it'd be nice if this info could still look like a badge

@reakaleek

Copy link
Copy Markdown
Member Author

Maybe due to the colored nature of admonitions but I do find the extra information less visible (recognizable might be a better word) than I'd like it to be. I think it'd be nice if this info could still look like a badge

What would be the expectation for the tooltip or future popover in this case?

@colleenmcginnis

Copy link
Copy Markdown
Contributor

What would be the expectation for the tooltip or future popover in this case?

I'm not a UX designer, but my gut tells me that making the badge interactive in admonitions is less problematic than with tabs/dropdowns because the admonition itself is not interactive.

@florent-leborgne

Copy link
Copy Markdown
Member

^^ What @colleenmcginnis said.
This is something we can rationalize in the future as the cumulative docs initiative will hopefully also lead to output improvements/simplifications in that area.

@reakaleek

reakaleek commented Sep 29, 2025 •

Copy link
Copy Markdown
Member Author

@florent-leborgne @colleenmcginnis @Mpdreamz

updated in c652ce6

(including re-enabled tooltip)

image

@florent-leborgne florent-leborgne left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@shainaraskas

Copy link
Copy Markdown
Member

how would this work for plain admonitions?

I find myself creating notes specifically to call out availability (not notes about functionality specific to a version) e.g.:

::::{admonition} Deprecated in 6.1.

Replaced by [`elasticsearch-certutil`](/reference/elasticsearch/command-line-tools/certutil.md).
::::

would maybe work if the admonition could have an "empty" title and put just the badge there, but it wouldn't really read like a title

@colleenmcginnis

colleenmcginnis commented Sep 29, 2025 •

Copy link
Copy Markdown
Contributor

how would this work for plain admonitions?

This is what it looks like right now (custom title Availability vs no title):

Screenshot 2025-09-29 at 1 03 53 PM

@shainaraskas

Copy link
Copy Markdown
Member

@colleenmcginnis perhaps good enough for now? 🤷

@reakaleek
reakaleek merged commit 95e743d into main Sep 29, 2025
@reakaleek
reakaleek deleted the feature/applies-to-admonitions branch September 29, 2025 22:14
reakaleek added a commit that referenced this pull request Sep 29, 2025
@reakaleek reakaleek mentioned this pull request Sep 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants