Include the extension status explanation and use status derived from extensions if not defined explicitly#2519
Conversation
…extensions if not defined explicitly
|
🎊 PR Preview 77cc3bd has been successfully built and deployed to https://quarkus-site-pr-2519-preview.surge.sh
|
|
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 |
|
@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. |
gsmet
left a comment
There was a problem hiding this comment.
I'm all for this but I think we need to discuss this part a bit. See inline.
|
|
||
| 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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
mmm I remember seeing the guide link in the extension metadata yaml:
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 🫣 🙂 )
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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"
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 🤷🏻 🫣 🙂
There was a problem hiding this comment.
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?
Agreed. The text can change color for each of the statuses to match the tags in the extensions catalog. |
|
Where are we with this? We've just had a complaint about the statuses being out of sync, and I think this might help that (as well as being generally useful and good): https://stackoverflow.com/questions/79980670/quarkus-aws-lambda-http-in-preview-state |
😭
Me personally somewhere in the undecided/confused area 🙈 🙂. As to why ?! ... My understanding is that:
Now, my confusion comes from:
I'd personally go for "validate and fail" + "show pairs of extension-status" .... but ... 🤷🏻 🙂 |
|
This PR is at risk from the Roq migration. Most site content I can migrate in an automated way. That means any PRs that miss the train can be patched up using the same scripts. However, the plugins needed to be hand-crafted. That work's already been done, so for where we are, I'll either need to redo the plugin work to incorporate this, or this will need to be ported to java after #2683 merges. Since it's been hanging around for a while, and has some open questions, selfishly, I propose we revisit it post-migration. That does mean we shouldn't do any more coding work before the migration. |
|
I'm ok with adding the extension later in ascidoctorj 🙂, |
|
My view is we should be as DRY as possible: the extension metadata is the preferred source of truth for status, and ideally, the only source of truth. So I'd say:
But I'm perhaps making comments that are more relevant to the pre-#2508 world. |
so maybe ..... we have an extension status -- we'll show it on the main page where all the guides are listed and then at the top of the guide... but at the same time we allow for a "status badge" at a section title level where a feature described in that section is tagged as experimental (or whatever other status it is in != stable)? edit: here's an example of how we do it in Search: https://docs.hibernate.org/stable/search/reference/en-US/html_single/#architecture-examples-outbox-polling-elasticsearch |
|
Sounds perfect. |
There was a problem hiding this comment.
Thanks @marko-bekhta — I really like the direction here. The old tooltip was easy to miss (its text never appears on touch devices), and deriving the status from extension metadata removes a whole class of silent failures: nobody has to remember the include, and the banner stays correct when an extension is promoted later. The side-by-side layout in your previews looks clean.
Having caught up on the thread: +1 to listing the extensions with their statuses — your table idea from the January inline discussion, and Holly's "list them all and show the status pairs". For guides that cover several extensions, that answers the reader's real question: which extension is the non-stable one.
My two inline comments are about the text rather than the code — a typo fix, and a copy edit of the explanation wording, aligned with extension-status.adoc — so they should stay relevant for whichever implementation lands after the Roq migration; they are not a request to resume coding now. Glad to help remove the now-redundant extension-status.adoc includes once this work lands in whatever form it takes.
| '<p>The extension(s) discussed here request early feedback to mature the idea.</p><p>There is no guarantee of stability nor long term presence in the platform until the solution matures. Feedback is welcome on our <a href="https://groups.google.com/d/forum/quarkus-dev">mailing list</a> or as issues in our <a href="https://github.com/quarkusio/quarkus/issues">GitHub issue tracker</a></p>.' | ||
| when 'preview' | ||
| 'This extension\'s backward compatibility and presence in the ecosystem is not guaranteed' | ||
| '<p>The backward compatibility and presence in the ecosystem of extension(s) discussed here is not guaranteed.</p><p>Specific improvements might require changing configuration or APIs, and plans to become <em>stable</em> are under way. Feedback is welcome on our <a href="https://groups.google.com/d/forum/quarkus-dev">mailing list</a> or as issues in our <a href="https://github.com/quarkusio/quarkus/issues">GitHub issue tracker</a>.</p>' | ||
| when 'stable' | ||
| 'This extension\'s backward compatibility and presence in the ecosystem are taken very seriously' | ||
| '<p>The backward compatibility and presence in the ecosystem of the extension(s) discussed here are taken very seriously.</p>' | ||
| when 'deprecated' | ||
| 'This extension is likely to be replaced or removed in a future version' | ||
| '<p>The extension(s) discussed here is likely to be replaced or removed in a future version.</p>' |
There was a problem hiding this comment.
Wording suggestion — text-level feedback, so it should carry over to whichever implementation lands after the Roq migration:
- Align the explanation text with
extension-status.adoc(the text readers already see on guides today), with one uniform lead-in pattern: "For X extensions, …". This avoids the "extension(s)" construction, which style guides recommend against, and it stays accurate whether a page discusses one extension or several. - The include's lead-in says "In experimental mode", but these are statuses (that's what the FAQ calls them), and "mode" already means something else in Quarkus (dev mode, native mode).
- Light copy edits along the way: "no guarantee of stability or long-term presence" (after a negative like "no", plain "or" is standard, and "long-term" takes a hyphen before a noun); "are not guaranteed" ("backward compatibility and presence" is two things — the
stabletext already uses "are"); "plans are under way for them to become stable" (it is the extensions that become stable, not the plans); and theexperimentalperiod moves inside</p>— right now it renders below the paragraph, stuck to the FAQ sentence.
The FAQ entry keeps the older wording for now; I can send a small follow-up to align it.
| '<p>The extension(s) discussed here request early feedback to mature the idea.</p><p>There is no guarantee of stability nor long term presence in the platform until the solution matures. Feedback is welcome on our <a href="https://groups.google.com/d/forum/quarkus-dev">mailing list</a> or as issues in our <a href="https://github.com/quarkusio/quarkus/issues">GitHub issue tracker</a></p>.' | |
| when 'preview' | |
| 'This extension\'s backward compatibility and presence in the ecosystem is not guaranteed' | |
| '<p>The backward compatibility and presence in the ecosystem of extension(s) discussed here is not guaranteed.</p><p>Specific improvements might require changing configuration or APIs, and plans to become <em>stable</em> are under way. Feedback is welcome on our <a href="https://groups.google.com/d/forum/quarkus-dev">mailing list</a> or as issues in our <a href="https://github.com/quarkusio/quarkus/issues">GitHub issue tracker</a>.</p>' | |
| when 'stable' | |
| 'This extension\'s backward compatibility and presence in the ecosystem are taken very seriously' | |
| '<p>The backward compatibility and presence in the ecosystem of the extension(s) discussed here are taken very seriously.</p>' | |
| when 'deprecated' | |
| 'This extension is likely to be replaced or removed in a future version' | |
| '<p>The extension(s) discussed here is likely to be replaced or removed in a future version.</p>' | |
| '<p>For <em>experimental</em> extensions, early feedback is requested to mature the idea.</p><p>There is no guarantee of stability or long-term presence in the platform until the solution matures. Feedback is welcome on our <a href="https://groups.google.com/d/forum/quarkus-dev">mailing list</a> or as issues in our <a href="https://github.com/quarkusio/quarkus/issues">GitHub issue tracker</a>.</p>' | |
| when 'preview' | |
| '<p>For <em>preview</em> extensions, backward compatibility and presence in the ecosystem are not guaranteed.</p><p>Specific improvements might require changing configuration or APIs, and plans are under way for them to become <em>stable</em>. Feedback is welcome on our <a href="https://groups.google.com/d/forum/quarkus-dev">mailing list</a> or as issues in our <a href="https://github.com/quarkusio/quarkus/issues">GitHub issue tracker</a>.</p>' | |
| when 'stable' | |
| '<p>For <em>stable</em> extensions, backward compatibility and presence in the ecosystem are taken very seriously.</p>' | |
| when 'deprecated' | |
| '<p><em>Deprecated</em> extensions are likely to be replaced or removed in a future version of Quarkus.</p>' |
| staus_block_html = %(<div class="extension-status">#{label_html}#{explanation_inner_html}</div>) | ||
| label_block = create_pass_block doc, staus_block_html, {} |
There was a problem hiding this comment.
Tiny typo: staus → status.
| staus_block_html = %(<div class="extension-status">#{label_html}#{explanation_inner_html}</div>) | |
| label_block = create_pass_block doc, staus_block_html, {} | |
| status_block_html = %(<div class="extension-status">#{label_html}#{explanation_inner_html}</div>) | |
| label_block = create_pass_block doc, status_block_html, {} |


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.adocinclude and make things a bit more "automated"A few previews:


cc: @yrodiere @FroMage @insectengine @rolfedh