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

allow dialogs within deferred menus #2212

Merged
merged 3 commits into from
Aug 22, 2023

Conversation

keithamus
Copy link
Member

@keithamus keithamus commented Aug 17, 2023

What are you trying to accomplish?

There are instances when one wants to render dialog contents deferred through the ActionMenu. Currently this doesn't work; it's buggy. The current behaviour is that the dialog flashes open, then hides because the ActionMenu itself closes. Re-opening the menu causes the Dialog to appear.

This is of course not ideal. We should enable this pattern to be expressed bug free.

/cc @jdennes

Screenshots

Here's the broken behaviour:

screen-recorder-thu-aug-17-2023-13-37-30.webm

Here it is fixed:

screen-recorder-thu-aug-17-2023-13-36-05.webm

Integration

No

List the issues that this change affects.

An issue hasn't been filed. This was from Slack.

Risk Assessment

  • Low risk the change is small, highly observable, and easily rolled back.
  • Medium risk changes that are isolated, reduced in scope or could impact few users. The change will not impact library availability.
  • High risk changes are those that could impact customers and SLOs, low or no test coverage, low observability, or slow to rollback.

What approach did you choose and why?

Anything you want to highlight for special attention from reviewers?

Accessibility

  • No new axe scan violation - This change does not introduce any new axe scan violations.

Merge checklist

  • Added/updated tests
  • Added/updated documentation
  • Added/updated previews (Lookbook)
  • Tested in Chrome
  • Tested in Firefox
  • Tested in Safari
  • Tested in Edge

Take a look at the What we look for in reviews section of the contributing guidelines for more information on how we review PRs.

@keithamus keithamus requested review from a team and jonrohan August 17, 2023 12:40
@changeset-bot
Copy link

changeset-bot bot commented Aug 17, 2023

🦋 Changeset detected

Latest commit: 5038511

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/view-components Patch

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

@keithamus keithamus temporarily deployed to preview August 17, 2023 12:40 — with GitHub Actions Inactive
@github-actions github-actions bot added the javascript Pull requests that update Javascript code label Aug 17, 2023
Copy link
Contributor

@camertron camertron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow what an interesting use-case! The code looks good, but I'd love to see some system tests for this 👍

@keithamus keithamus self-assigned this Aug 21, 2023
@keithamus
Copy link
Member Author

@camertron added a system test!

@keithamus keithamus requested a review from camertron August 22, 2023 17:31
@keithamus keithamus enabled auto-merge (squash) August 22, 2023 17:33
@keithamus keithamus merged commit 3d0036a into main Aug 22, 2023
@keithamus keithamus deleted the allow-dialogs-within-deferred-menus branch August 22, 2023 17:34
@keithamus keithamus temporarily deployed to preview August 22, 2023 17:34 — with GitHub Actions Inactive
@primer primer bot mentioned this pull request Aug 22, 2023
jonrohan pushed a commit that referenced this pull request Aug 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
javascript Pull requests that update Javascript code patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants