Skip to content

docs: Add usage notes and MDN links to HTML components #21749 - #25490

Merged
mcollovati merged 2 commits into
vaadin:mainfrom
AzazelSensei:docs/html-element-javadoc-21749
Sep 7, 2026
Merged

mcollovati merged 2 commits into
vaadin:mainfrom
AzazelSensei:docs/html-element-javadoc-21749

Conversation

@AzazelSensei

Copy link
Copy Markdown
Contributor

HTML components such as Div, Span and Main only named the tag. I added a short usage note and an MDN link on each, matching the Table family. NativeLabel and the Table types already had that coverage.

Fixes #21749

HTML element classes such as Div, Span and Main only named the tag.
Add a short intended-use sentence and an MDN @see, matching the Table
family. NativeLabel and the Table types already had that coverage.

Fixes vaadin#21749
@mshabarov mshabarov added the Contribution PRs coming from the community or external to the team label Sep 7, 2026
@mshabarov

Copy link
Copy Markdown
Contributor

@claude make a code review

@claude

claude Bot commented Sep 7, 2026 •

Copy link
Copy Markdown

Claude finished @mshabarov's task in 2m 6s —— View job


Code Review — HTML component Javadoc

  • Gather context (read PR diff)
  • Review Javadoc content, MDN links, and formatting
  • Post review

Nice, consistent documentation pass. The usage notes are accurate and concise, and the MDN URLs correctly follow the newer /Web/HTML/Reference/Elements/ structure already used by the Table* family. A few things to address before merge.

🔴 Should fix

DescriptionList.java — unescaped <dt> / <dd> in Javadoc text

 * A list of terms and their descriptions, using Term (<dt>) and Description
 * (<dd>) children.

Every other file in this PR escapes angle brackets (&lt;abbr&gt;, etc.), but here <dt> and <dd> are written as raw HTML. Javadoc parses them as real tags rather than literal text, so:

  • The rendered sentence breaks — <dd> / <dt> are block-level elements and will disrupt the paragraph flow instead of showing the tag names.
  • These tags are only valid inside a <dl>, so -Xdoclint:html (default on JDK 21) will emit "tag not allowed here" warnings, which can fail the Javadoc build depending on config.

Should be &lt;dt&gt; and &lt;dd&gt; to match the rest of the PR:

 * A list of terms and their descriptions, using Term (&lt;dt&gt;) and
 * Description (&lt;dd&gt;) children.

Fix this →

🟡 Minor / consistency

  • @see tag placement. In the new files @see is inserted before @author/@since (e.g. Abbr.java, Div.java). Oracle's recommended block-tag order is @author → @see → @since, and the existing NativeLabel.java places @see after @author. No checkstyle rule enforces this in the repo, so it won't fail the build, but moving @see below @author would match the established convention. Not blocking.

  • Verify the MDN deep link for range. RangeInput.java points to .../Reference/Elements/input/range. Worth a quick check that this resolves (the canonical MDN path historically was Elements/input/range, which is correct) — the other links all target top-level element pages and are fine.

👍 Good

  • The Param.java cleanup removing the duplicated "<param> element for <param> element" phrasing is a nice catch.
  • Cross-references in prose (e.g. Code → Pre, OrderedList ↔ UnorderedList, HtmlObject → Image/IFrame) are helpful and accurate.
  • Trailing-whitespace cleanups in FieldSet.java / RangeInput.java are welcome.

Only the DescriptionList escaping is a real correctness issue; the rest is optional polish.
• docs/html-element-javadoc-21749

@mcollovati mcollovati left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@AzazelSensei thanks for the contribution.
I fixed the DefinitionList docs and verified that the link in RangeInput is correct.
Given that, the PR looks good to me

@mcollovati
mcollovati added this pull request to the merge queue Sep 7, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 7, 2026
@mcollovati
mcollovati added this pull request to the merge queue Sep 7, 2026
Merged via the queue into vaadin:main with commit 5632292 Sep 7, 2026
41 checks passed
vaadin-bot added a commit that referenced this pull request Sep 8, 2026
… (CP: 25.3) (#25538)

This PR cherry-picks changes from the original PR #25490 to branch 25.3.
---
#### Original PR description
> HTML components such as Div, Span and Main only named the tag. I added
a short usage note and an MDN link on each, matching the Table family.
NativeLabel and the Table types already had that coverage.
> 
> Fixes #21749
>

Co-authored-by: Abdullah <[email protected]>
Co-authored-by: Marco Collovati <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cherry-picked-25.3 Contribution PRs coming from the community or external to the team target/25.3

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve javadocs of native HTML element components

4 participants