Skip to content

refactor: add hasNodeContent helper for checking node content - #12437

Merged
web-padawan merged 1 commit into
mainfrom
refactor/shared-node-content-check
Aug 14, 2026
Merged

refactor: add hasNodeContent helper for checking node content#12437
web-padawan merged 1 commit into
mainfrom
refactor/shared-node-content-check

Conversation

@tomivirkki

@tomivirkki tomivirkki commented Aug 14, 2026

Copy link
Copy Markdown
Member

Summary

  • SlotChildObserveController decides whether a slotted node has content (an element with children, a defined custom element that may render in its shadow root, or non-empty text) with a private check that other code cannot reuse. The AI field marker in feat: add confidence indicator to AI field marker #12436 needs the same rule to judge a field's helper content, and re-implementing it there risks the two copies drifting apart, as noted in the review comment: feat: add confidence indicator to AI field marker #12436 (comment)
  • The check is now exported as hasNodeContent() from component-base dom-utils, used by the controller and covered with unit tests, so the marker (and any future caller) can share the single definition.

Related to #12436

🤖 Generated with Claude Code

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@vaadin-review-bot vaadin-review-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Nothing to flag — the changes look good.

@tomivirkki
tomivirkki requested a review from web-padawan August 14, 2026 10:14
@web-padawan web-padawan changed the title refactor: share node content check via dom-utils refactor: add hasNodeContent helper for checking node content Aug 14, 2026
@web-padawan
web-padawan merged commit 1d2414c into main Aug 14, 2026
16 checks passed
@web-padawan
web-padawan deleted the refactor/shared-node-content-check branch August 14, 2026 10:40
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.

3 participants