-
Notifications
You must be signed in to change notification settings - Fork 22
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
Breaking: Deprecate Reach-UI based modal and add Ariakit-based modal #686
Conversation
6bca836
to
4aaff2c
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.
✅ All works as expected
2d6b358
to
d903753
Compare
@scottlovegrove I added a couple more fixes after testing it in Todoist:
Could you please have a quick look at the last few commits and give them a spin in Storybook?
|
39fc615
to
7368b86
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.
Preliminary review, before I get into the new steps in the test plan:
-
The header title is not aligned to the close button:
This only happens in the first story, the one titled "Modal with standard actions footer". So it's most probably a problem with the story, and not with the modal component itself. It probably has to do with how you put this custom menu button in the header. I left a comment in code on what I think may fix this.
-
In the "Stacking modal" story, I suggest changing the nested modal to have a different size than the parent modal initially, so that we can see how a modal is floating in top of the other one. That is, a different height and width setting.
<Modal aria-label="Modal with standard actions footer"> | ||
<ModalHeader> | ||
<Heading level="1">Modal with standard actions footer</Heading> | ||
<Columns> |
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.
I think this fixes the misaligned modal header:
<Columns> | |
<Columns alignY="center"> |
Although, IMO, this extra button should be put in the header button slot, instead of putting it in the title slot. Something along these lines:
<ModalHeader
button={
<Columns space="small">
<Column><CustomButton /></Column>
<Column><ModalCloseButton /></Column>
</Columns>
}
>
<Heading level="1">Modal with standard actions footer</Heading>
</ModalHeader>
7368b86
to
e335b66
Compare
Closes #679
Short description
This re-implements the modal with Ariakit. It tries to match the previous implementation as close as possible, both API and markup wise, so we don't leverage Ariakit's default modal backdrop.
Test plan
Test that all of the previous modal's functionality have been retained in the storybook demos.
Old: http://localhost:6006/?path=/docs/components-modal
New: http://localhost:6006/?path=/story/design-system-modal
aria-hidden
set when the modal is openPR Checklist
npm run validate
and made sure no errors / warnings were shownCHANGELOG.md
package.json
andpackage-lock.json
(npm --no-git-tag-version version <major|minor|patch>
) refnpm run build-all
)Versioning
Major