-
Notifications
You must be signed in to change notification settings - Fork 2
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
♻️(react) use react aria for select menu + modal updates #323
Conversation
🦋 Changeset detectedLatest commit: bdc44b5 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 |
3c775df
to
aa2d397
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.
When there is not enough space to open the select menu, this one does not open 🤔
CleanShot.2024-05-14.at.16.55.15.mp4
b079f53
to
5eedbe4
Compare
I realized that Canvas in mdx are not inside iframe 👀, so I did some edit + avoid flipping for the overlay. |
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.
Last comment then LGTM ✅
The way the menu of the select was made was causing it to be cropped inside modals, it was due to the fact the menu was nested inside a position relative parent. Now we use react aria to position in full absolute the menu, making it to be correctly displayed inside modals.
Having the position fixed and at the same time overflow auto on the same element was causing absolute children to be cropped. We need to set those two attribute on two different parent for these children to not be cropped. Yes this is weird, this is CSS.
This default behavior was causing lots of troubles when using modals. For instance the Select value were centered, it was also the case for most of consumer's component inside modals, forcing the users to set text-align:left on their side, resulting in additionnal work. Now we use another approach by using a specific div for the content we want centered.
5eedbe4
to
bdc44b5
Compare
No description provided.