-
Notifications
You must be signed in to change notification settings - Fork 115
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
do not allow non-modal Alpha::Dialog #2582
Conversation
|
🦋 Changeset detectedLatest commit: 7b56f25 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
a24a207
to
c84bbca
Compare
c84bbca
to
58c0438
Compare
58c0438
to
5552df5
Compare
d18a1e2
to
1d45728
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems cool 😎 We should make sure we test it well before release. Are there any dialogs in dotcom that start in an open state?
A quick search across the codebase says no, I can’t see any instances that do this in dotcom or education. |
Authors: Please fill out this form carefully and completely.
Reviewers: By approving this Pull Request you are approving the code change, as well as its deployment and mitigation plans.
Please read this description carefully. If you feel there is anything unclear or missing, please ask for updates.
What are you trying to accomplish?
Our
Primer::Alpha::Dialog
component should only ever be shown as modal. Today it's possible to make the Dialog initially open by calling.new(open: true)
.While it is certainly contentious to have an initially open Dialog, it is still possible to get the Dialog in a weird state where it's
[open]
as non-modal.This patch ensures that any
[open]:not(:modal)
dialogs are closed and re-opened as modal.Screenshots
See VRT.
Integration
N/A
List the issues that this change affects.
Closes #2581
Risk Assessment
What approach did you choose and why?
Anything you want to highlight for special attention from reviewers?
Accessibility
Merge checklist
Take a look at the What we look for in reviews section of the contributing guidelines for more information on how we review PRs.