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

feat(react): add dialog component #9496

Merged

Conversation

joshblack
Copy link
Contributor

@joshblack joshblack commented Aug 17, 2021

This is the first part of #8826 where we would like to add in an official <Dialog> component to help with building both modal and nonmodal dialog.

This exploration has a storybook story that you can view locally but is currently not enabled in the deployed storybook.

Changelog

New

  • Add unstable Dialog component exploration

Changed

Removed

Testing / Reviewing

  • Pull down the PR locally
  • Run the storybook in packages/react
  • comment out the line in Dialog-story that says includeStories: []
  • Try out the "Dialog Example" story for keyboard interaction and focus management

@netlify
Copy link

netlify bot commented Aug 17, 2021

✔️ Deploy Preview for carbon-react-next ready!

🔨 Explore the source changes: c0b12d7

🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-react-next/deploys/613267b5383ece00081bd05f

😎 Browse the preview: https://deploy-preview-9496--carbon-react-next.netlify.app

@netlify
Copy link

netlify bot commented Aug 17, 2021

✔️ Deploy Preview for carbon-elements ready!

🔨 Explore the source changes: e9c5b7f

🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-elements/deploys/611c33c142c7dc00075dd643

😎 Browse the preview: https://deploy-preview-9496--carbon-elements.netlify.app

@netlify
Copy link

netlify bot commented Aug 17, 2021

✔️ Deploy Preview for carbon-components-react ready!

🔨 Explore the source changes: e9c5b7f

🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-components-react/deploys/611c33c100f42600087398b1

😎 Browse the preview: https://deploy-preview-9496--carbon-components-react.netlify.app/

@netlify
Copy link

netlify bot commented Aug 17, 2021

✔️ Deploy Preview for carbon-elements ready!

🔨 Explore the source changes: c0b12d7

🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-elements/deploys/613267b5d45bf60008ceef06

😎 Browse the preview: https://deploy-preview-9496--carbon-elements.netlify.app

@netlify
Copy link

netlify bot commented Aug 17, 2021

✔️ Deploy Preview for carbon-components-react ready!
Built without sensitive environment variables

🔨 Explore the source changes: c0b12d7

🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-components-react/deploys/613267b525971c0007a7a5f3

😎 Browse the preview: https://deploy-preview-9496--carbon-components-react.netlify.app/

@joshblack joshblack marked this pull request as ready for review September 1, 2021 17:04
@joshblack joshblack requested a review from a team as a code owner September 1, 2021 17:04
Copy link
Member

@sstrubberg sstrubberg left a comment

Choose a reason for hiding this comment

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

Looks great! I had a question about the intended outcome on the attached mp4. When I open multiple dialogs, but close the original, then re-open it, I would expect it to open to where I was last instead of starting from the beginning. Thoughts?

Sep-02-2021.15-55-43.mp4

Copy link
Member

@tw15egan tw15egan left a comment

Choose a reason for hiding this comment

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

Focus trapping working as expected, focus returning to open button after closing and able to continue tabbing, and not seeing any accessibility violations. Nice work! 👍🏻 ✅

@joshblack
Copy link
Contributor Author

@sstrubberg I think it's expected since it's closing all the nested dialogs, effectively. The state isn't being kept and would most likely need to be something we add in on top of this implementation 👀

@sstrubberg sstrubberg enabled auto-merge (squash) September 3, 2021 18:21
@sstrubberg sstrubberg merged commit 3b5a1da into carbon-design-system:main Sep 3, 2021
This was referenced Sep 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants