KEMBAR78
refactor!: move crud confirm dialogs to light DOM by sissbruecker · Pull Request #9783 · vaadin/web-components · GitHub
Skip to content

Conversation

@sissbruecker
Copy link
Contributor

@sissbruecker sissbruecker commented Jul 21, 2025

Description

Move CRUD confirm dialogs to the light DOM, so that their overlay shadow parts can be targeted with CSS.

Note: Both CRUD and confirm dialog use these same slots: header, cancel-button. Targeting the CRUD header for example requires using vaadin-crud > [slot="header"] specifically in order to not target the confirm dialog header. That is already the recommended selector in the docs.

Fixes #9708

Type of change

  • Breaking change

@sonarqubecloud
Copy link

newButton = crud.querySelector('[slot=new-button]');
saveButton = crud.querySelector('[slot=save-button]');
cancelButton = crud.querySelector('[slot=cancel-button]');
cancelButton = crud.querySelector(':scope > [slot=cancel-button]');
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Selector looks a bit random without context. Maybe we should make them consistent? There's a lot of them through...


/**
* Override update to render slotted link dialog into light DOM after rendering shadow DOM.
* Override update to render slotted overlays into light DOM after rendering shadow DOM.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed the comment here, missed to do that in the previous PR.

@sissbruecker sissbruecker marked this pull request as ready for review July 21, 2025 11:11
@sissbruecker sissbruecker requested a review from web-padawan July 21, 2025 11:11
@web-padawan web-padawan merged commit 6185525 into main Jul 21, 2025
10 checks passed
@web-padawan web-padawan deleted the refactor/crud-confirm-dialog-light-dom branch July 21, 2025 12:36
@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Vaadin 25.0.0-alpha3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[crud] Move confirm-dialog to the slot to make its overlay stylable globally

3 participants