Skip to content

Conversation

@ugur-vaadin
Copy link
Contributor

Description

Implements dynamic slot detection for header-content and footer slots, enabling users to pass content directly via slots instead of only through renderers.

Key changes:

  • Add SlotObserver to monitor header-content and footer slots
  • Dynamically set has-header/has-footer attributes based on both renderers AND slotted content presence
  • Smart content detection that ignores empty elements and renderer-created containers
  • Support for mixed usage (renderers + slots simultaneously)

Tests:

  • Add 17 new unit tests for slotted content scenarios
  • Add 8 visual regression tests
  • All existing tests continue to pass (196 total)

Fixes #10339

Type of change

  • Bugfix
  • Feature

Checklist

  • I have read the contribution guide: https://vaadin.com/docs/latest/contributing/pr
  • I have added a description following the guideline.
  • The issue is created in the corresponding repository and I have referenced it.
  • I have added tests to ensure my change is effective and works as intended.
  • New and existing tests are passing locally with my change.
  • I have performed self-review and corrected misspellings.
  • Enhancement / new feature was discussed in a corresponding GitHub issue and Acceptance Criteria were created.

ugur-vaadin and others added 4 commits December 11, 2025 15:38
Implements dynamic slot detection for header-content and footer slots,
enabling users to pass content directly via slots instead of only through
renderers.

Key changes:
- Add SlotObserver to monitor header-content and footer slots
- Dynamically set has-header/has-footer attributes based on both
  renderers AND slotted content presence
- Smart content detection that ignores empty elements and
  renderer-created containers
- Support for mixed usage (renderers + slots simultaneously)

Tests:
- Add 17 new unit tests for slotted content scenarios
- Add 8 visual regression tests
- All existing tests continue to pass (196 total)

Fixes #10339

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
@ugur-vaadin ugur-vaadin marked this pull request as ready for review December 16, 2025 08:06
@sonarqubecloud
Copy link

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.

[dialog] Allow passing content to header / footer slots, set has-header and has-footer

2 participants