You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a dialog is critical, we want to prevent closing the dialog (including the keyboard (esc), backdrop, and close button) and hide the close button, since no closing action can be taken from there. In this case, action can only be taken from the buttons in the dialog footer.
Related to #853
Implements critical dialog functionality to prevent closing and hides
the close button for critical dialogs.
- Adds a `critical` property to `bl-dialog` to mark dialogs as critical,
which disables closing through keyboard, backdrop, and close button
interactions.
- Conditionally renders the close button in the dialog header based on
the `critical` property, effectively hiding it for critical dialogs.
- Updates event handling to prevent closing critical dialogs through
escape key presses and outside clicks.
- Includes a new story in `bl-dialog.stories.ts` to demonstrate a
critical dialog with the `critical` property set to `true`.
- Adds tests in `bl-dialog.test.ts` to verify that critical dialogs
cannot be closed through keyboard, backdrop, and close button
interactions, and to ensure the close button is hidden for critical
dialogs.
Describe the problem or use case
If a dialog is critical, we want to prevent closing the dialog (including the keyboard (esc), backdrop, and close button) and hide the close button, since no closing action can be taken from there. In this case, action can only be taken from the buttons in the dialog footer.
design documentation
Proposed solution
No response
Alternatives considered
No response
Additional technical context
No response
The text was updated successfully, but these errors were encountered: