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

[Feature Request]: <Adding Critical Dialog Variant to Dialog Component> #853

Open
buseselvi opened this issue May 3, 2024 · 0 comments
Open

Comments

@buseselvi
Copy link
Contributor

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

image

Proposed solution

No response

Alternatives considered

No response

Additional technical context

No response

buseselvi pushed a commit that referenced this issue May 16, 2024
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

2 participants