Skip to content

Include the extension status explanation and use status derived from extensions if not defined explicitly#2519

Draft
marko-bekhta wants to merge 1 commit into
quarkusio:mainfrom
marko-bekhta:feat/add-extension-status-labels-v2
Draft

Include the extension status explanation and use status derived from extensions if not defined explicitly#2519
marko-bekhta wants to merge 1 commit into
quarkusio:mainfrom
marko-bekhta:feat/add-extension-status-labels-v2

Conversation

@marko-bekhta
Copy link
Copy Markdown
Member

This updated asciidoc extension would inject the status label and explanation next to it, so we wouldn't need to remember to include the extension-status.adoc include and make things a bit more "automated"

A few previews:
image
image

cc: @yrodiere @FroMage @insectengine @rolfedh

@github-actions
Copy link
Copy Markdown

🎊 PR Preview 77cc3bd has been successfully built and deployed to https://quarkus-site-pr-2519-preview.surge.sh

  • Images of blog posts older than 3 months are not available.
  • Newsletters older than 3 months are not available.

@insectengine
Copy link
Copy Markdown
Collaborator

For the guides, I'd say we keep it simple text link.
Screenshot 2026-01-20 at 8 45 10 AM

I also again question not having "stable" visible as a status instead of the invisible default. This way people know and it could prevent confusion.

@marko-bekhta
Copy link
Copy Markdown
Member Author

thanks 🙂, having just a link looks good and we wouldn't need to repeat the text in multiple places 👍🏻 I like that too 🙂

As for the label, you think we shouldn't keep the colour ? (my thinking was that it would be nice to show the user the same "coloured label" they noticed on the search results when they open the guide itself ... but if you think it's better without colors here I'm fine with that 🙂)

About stable ... yeah I agree with you, I just thought that that was the conclusion that we don't show it so I didn't include it... 😔

@FroMage
Copy link
Copy Markdown
Member

FroMage commented Jan 20, 2026

@insectengine the idea with the bright colours was to make sure people would never use this extension by accident without knowing their status. So we need something more visual than just a regular link.

Perhaps it should be a simple link for "stable", and colours and warning and inline text for anything else? This would achieve the "disclaimer" function we want.

Copy link
Copy Markdown
Member

@gsmet gsmet left a comment

Choose a reason for hiding this comment

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

I'm all for this but I think we need to discuss this part a bit. See inline.

Comment on lines +166 to +174

if status.nil? || status.empty?
extension_statuses = doc.attr('extensions', '').split(',')
.map(&:strip)
.reject(&:empty?)
.map { |s| s.gsub(/[.:]/, '-') + '-extension-status' }
.map { |s| doc.attr(s, '') }
status = ['experimental', 'preview', 'deprecated'].find { |s| extension_statuses.include?(s) }
end
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.

This part is a bit dangerous IMO. IIRC, the extensions metadata can be a bit broad as they are used for search.

I wonder if maybe you should only take into account the first one? But then we would have to check the metadata is correct and that the first one is ALWAYS the right one.

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.

The "upstream" part of the docs (quarkusio/quarkus#52100) will always include a definitive status based on the list of extensions per guide, by selecting the "least favourable" status.
I'm not sure how we can fall into this branch if that's the case.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

mmm I remember seeing the guide link in the extension metadata yaml:

https://github.com/quarkusio/quarkus/blob/39f7eb8c51ff55216bf50626efa46362490e7971/extensions/hibernate-search-standalone-elasticsearch/runtime/src/main/resources/META-INF/quarkus-extension.yaml#L13

if we go with that ? meaning if we get the status from that extension's yaml and "assign" it to the guide it mentions, instead of just taking the list of extensions specified in the adoc ( https://github.com/quarkusio/quarkus/blob/39f7eb8c51ff55216bf50626efa46362490e7971/docs/src/main/asciidoc/hibernate-search-standalone-elasticsearch.adoc?plain=1#L12)

so after going through all yamls we'd have a map of <guide, List<extension>> ? would that be a more reliable source ?

(just thinking out loud 🫣 🙂 )

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

another idea I had was to say something like:

this guide mentions extensions that are in the following statuses : ...

and show them in a "table format" with status, and list of extensions in that status

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'm not following the discussion here. What does #52100 do then if not fetch the statuses of all extensions per guide, so it can be used here?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

right, it fetches the statuses of extensions from their yaml files, and then it looks at the :extensions: attribute inside of the adoc file to see which extension statuses to "combine"

:extensions: io.quarkus:quarkus-amazon-lambda

and I was asking if "ignoring" the attribute in the guide (:extensions: ) and instead using the guide link in the extension's yaml:

guide: "https://quarkus.io/guides/hibernate-search-standalone-elasticsearch"

would be better...

I've no idea, maybe that's the same info just in two different places, maybe not 🤷🏻 🫣 🙂

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.

There must be something I don't understand. If quarkusio/quarkus#52100 will correctly set the :extension-status: for every guide, why can't we use it here instead of trying to recompute it?

@insectengine
Copy link
Copy Markdown
Collaborator

@insectengine the idea with the bright colours was to make sure people would never use this extension by accident without knowing their status. So we need something more visual than just a regular link.

Perhaps it should be a simple link for "stable", and colours and warning and inline text for anything else? This would achieve the "disclaimer" function we want.

Agreed. The text can change color for each of the statuses to match the tags in the extensions catalog.

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.

4 participants