Conversation
🦋 Changeset detectedLatest commit: 973ebab 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 |
|
👋 Hi, this pull request contains changes to the source code that github/github depends on. If you are GitHub staff, we recommend testing these changes with github/github using the integration workflow. Thanks! |
| "type": "SystemStyleObject" | ||
| }, | ||
| { | ||
| "name": "data-responsive", |
There was a problem hiding this comment.
Note for reviewer: I'm basically opening up an API to make Overlay responsive (fullscreen on narrow screens)
Should we call this responsiveVariant instead to make it feel more official? Or keep it subtle for now?
It only supports one value "fullscreen" and Overlay does not have variant so it does follow our object variant pattern 🤔 { narrow: 'fullscreen', regular: 'auto', wide: 'auto' } feels a bit odd.
Especially because Overlay is usually used by another component that passes it position props like top and left like AnchoredOverlay
There was a problem hiding this comment.
I don't feel strongly either way, I don't see why not make it public though 👀
| max-width: calc(100vw - 2rem); | ||
| } | ||
|
|
||
| &:where([data-variant='fullscreen']) { |
There was a problem hiding this comment.
Note for reviewer: Overlay's css module is in GA, so we don't need this css in sx anymore
There was a problem hiding this comment.
I think let's keep this for now just in case, in theory the ga FF could still be turned off at any moment? The team can remove this when they remove the FF entirely from this component 🙏
There was a problem hiding this comment.
I thought we weren't adding adding css for new features? Based on #5761 (comment)
I recently added this css in #5759, so thought I'll clean it up as well. yay/nay?
There was a problem hiding this comment.
yeah I think the issue here is the styles won't be added at all because if FF is not enabled the Overlay classname will not be added so these styles will never make it in (why you need that FF on that other test), the correct way of adding new features without sx styling is to always have it go to css modules, for example if you created a separate class and added it to both (enabled, not enabled) implementations
size-limit report 📦
|
| margin: 0; | ||
| border-radius: unset; | ||
| &:where([data-responsive='fullscreen']) { | ||
| @media screen and (--viewportRange-narrow) { |
There was a problem hiding this comment.
Note for reviewer: I changed full screen to only be a responsive thing instead of variant you can apply whenever. data-variant → data-responsive
| 'aria-describedby': subtitle ? subtitleId : undefined, | ||
| ...(variant === 'modal' | ||
| ? { | ||
| /* override AnchoredOverlay position */ |
There was a problem hiding this comment.
Note for reviewer: This is where all the shame lies. We are still using an AnchoredOverlay, but then we override it's position by directly passing top, left, etc to overlayProps going down
There was a problem hiding this comment.
I'd rather us have branching on the container component instead of doing this, as it semantically is much harder to understand. I think it's fine for now, but definitely worth improving.
There was a problem hiding this comment.
^ @hectahertz do we have an idea on the effort to do branching off the get go? I agree with you and we do have a bit of leeway time-wise with this, wondering if we can get it in 👀
|
🔴 golden-jobs completed with status |
|
This should be complete now, refer to my commit history for all the changes and features added. Visuals and behavior for the radio buttons on the single select modal variant: Screen.Recording.2025-04-03.at.17.24.37.mov |
99baabd to
973ebab
Compare
francinelucca
left a comment
There was a problem hiding this comment.
Some small suggestion/requests on the codebase. I wasn't able to test the UI since there's not a deployment available yet. I think you need to solve the merge conflicts @hectahertz
|
Continued in #5883 |
Note
Current status:
mainis failing integration tests, so need to run integration tests again once that is cleared upNote: This PR does not include radio icons for single selection in a modal
Features:
Adding
variant=modaldoes 3 thingsonCancela required proponCancelShortcut
We are still using
AnchoredOverlayunderneath. But, forvariant=modal, we override its position by directly passingtop,left, etc. tooverlayPropsgoing down to the OverlayThe ideal super clean solution would have been to refactor SelectPanel and conditionally use
useAnchoredPositioninstead of AnchoredOverlay for variant=anchored. Something I did attempt in #5230 earlier but had to revert.This shortcut is easier to implement and touches less surface area.
Rollout strategy
Testing & Reviewing
Merge checklist