docs: fix invalid since-badge placement and clarify guidance#5713
Merged
Conversation
The since badge is an inline AsciiDoc role and must be immediately followed by a formatted text span (e.g. #...#). Span-less usages render as literal brackets or silently produce no badge. - Correct 7 broken usages (trailing on headings, standalone on own line) - Update CLAUDE.md Version References to document the correct form
Preview DeploymentThis PR has been deployed for preview. URL: https://docs-preview-pr-5713.fly.dev Changed pagesAdded content is highlighted in green; removed content is marked in red on each page.
Built from 318f48b |
Artur-
added a commit
that referenced
this pull request
Jun 23, 2026
The badge just needs a following text span (#...#); it works on headings and in body text. The earlier 'must be first class-bearing element' caveat was a workaround for a dspublisher bug (the version-badge pass attaches the version to the first class-bearing element on the line); that is being fixed at the source in @vaadin/dspublisher instead.
Artur-
enabled auto-merge (squash)
June 25, 2026 06:39
jouni
reviewed
Jun 25, 2026
| ```asciidoc | ||
| // Correct — on a page title or section heading: | ||
| = [since:com.vaadin:vaadin@V25.1]#Slider# | ||
| == [since:com.vaadin:vaadin@V25.2]#Hierarchical Data# |
Member
There was a problem hiding this comment.
The recommended way to annotate a section heading is to place the role/class on the heading instead of a span inside it. For example:
[role="since:com.vaadin:vaadin@V25.2"]
== Focus Selected Item [badge-flow]#Flow#The only exception is the main/top-level heading, which doesn't allow it, so there you need to wrap it in a span.
I won't stop us from unifying everything one way or the other. But it’s not great to keep using both styles for 2nd and 3rd-level sections.
peholmst
pushed a commit
that referenced
this pull request
Jun 26, 2026
…5740) Fixes `since` badges that were authored with invalid AsciiDoc and never rendered. A `since` badge is an inline role that must be immediately followed by a formatted text span (e.g. `#...#`); a span-less badge renders as literal `[since:...]` brackets or silently produces nothing. - Correct 7 broken usages across 7 articles: a badge trailing a heading (`== Title [since:...]`) and badges alone on their own line, rewritten to the span form (`== [since:...]#Title#`, or wrapping a phrase in body text). - Update the CLAUDE.md "Version References" guidance to document the correct form so future docs use it. Co-authored-by: Artur Signell <artur@vaadin.com>
Artur-
added a commit
that referenced
this pull request
Jul 7, 2026
Follow-up to #5713. Per review feedback, section headings (== / ===) should annotate the since badge with a [role="since:..."] attribute on the line above the heading rather than wrapping the title in a #...# span. The span form remains required only on the top-level (=) heading, where the role attribute is not allowed, and for phrases in body text. - Convert the two section headings #5713 had rewritten to span form (optimizing-tests, building-ui) to the role-attribute form. - Update the CLAUDE.md Version References guidance to document both forms and when each applies.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes
sincebadges that were authored with invalid AsciiDoc and neverrendered. A
sincebadge is an inline role that must be immediately followed bya formatted text span (e.g.
#...#); a span-less badge renders as literal[since:...]brackets or silently produces nothing.(
== Title [since:...]) and badges alone on their own line, rewritten to thespan form (
== [since:...]#Title#, or wrapping a phrase in body text).form so future docs use it.
Note: section-heading badges only become visible together with the dspublisher
fix in vaadin/docs-app#537 -- the build attached the version to the wrong
element (a preceding
[classname]macro or the heading anchor) and had no CSSrule for badges in
h2-h6headings. This PR makes the markup correct; #537makes it render.