Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

limel-dialog: if the button slot is empty when the component is created, it will never be shown, even if populated later #2754

Open
adrianschmidt opened this issue Jan 31, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@adrianschmidt
Copy link
Contributor

adrianschmidt commented Jan 31, 2024

Found while helping @simonedeblasio debug, as described in this forum thread (internal link).

Current behavior

Steps to reproduce the behavior:

  1. Create a limel-dialog where no element in the dialog has slot="button".
  2. Give the page time to render, so the dialog is hydrated.
  3. Update the dialog by adding an element that has slot="button" set.

Result: the element with slot="button" is not shown, because the dialog has no footer, and thus no slot to show it in.

Expected behavior

The element with slot="button" should be shown in the dialog's footer. This happens because of

this.showFooter = !!this.host.querySelector('[slot="button"]');
, which we added because Lime Field needed a full screen dialog with no footer, if I recall correctly. I'm guessing this behaviour is no longer needed, so we can probably remove this little quirk, but if we don't, we should document it!

Environment

@adrianschmidt adrianschmidt added the bug Something isn't working label Jan 31, 2024
@github-project-automation github-project-automation bot moved this to All Open Issues in Prioritisation board Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: All Open Issues
Development

No branches or pull requests

1 participant