-
Notifications
You must be signed in to change notification settings - Fork 67
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
LG-4952: Updates Modal component to use dialog element #2579
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: cce69e7 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
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 |
Size Change: -1.93 kB (-0.13%) Total Size: 1.47 MB
ℹ️ View Unchanged
|
…ui into brooke/modal-updates
packages/confirmation-modal/src/ConfirmationModal/ConfirmationModal.spec.tsx
Show resolved
Hide resolved
}, [portalRef]) | ||
|
||
<Modal portalRef={portalRef}> | ||
<Select renderMode="portal" portalContainer={containerState.current}/> |
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.
if we continue using a PortalContextProvider
in Modal.tsx
, it should improve the consumer experience since they won't need to specify portalContainer
in each popover instance that uses renderMode="portal"
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.
Updated to what I think makes sense but let me know
}; | ||
|
||
useEffect(() => { | ||
if (localRef.current != null) { |
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.
nit: could invert and early return for readability
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.
We should definitely add an upgrade guide for this. I think test harnesses in a minor release before this would be helpful too. Codemod wouldn't be bad either; I think that would only involve removing props for contentClassName
and initialFocus
?
`; | ||
|
||
export const modalContentStyle = css` | ||
const dialogContentStyle = (theme: Theme) => css` |
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.
dialog
native styles clip any content that overflows. for the case of popovers that portal or render inline, we may need to override with overflow: visible
Co-authored-by: Stephen Lee <[email protected]>
Co-authored-by: Stephen Lee <[email protected]>
✍️ Proposed changes
🎟 Jira ticket: LG-4952
✅ Checklist
For bug fixes, new features & breaking changes
yarn changeset
and documented my changesFor new components
🧪 How to test changes