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

Closed
buseselvi opened this issue May 3, 2024 · 1 comment
Closed

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 buseselvi moved this from Selected to ADR in Baklava Design System May 3, 2024
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.
@ogunb
Copy link
Contributor

ogunb commented Aug 1, 2024

Closed by #870. It will be release on 3.2.0.

@ogunb ogunb closed this as completed Aug 1, 2024
@github-project-automation github-project-automation bot moved this from ADR to Done in Baklava Design System Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

3 participants