-
Notifications
You must be signed in to change notification settings - Fork 122
fix(popover): remove popovercontainer Box wrapper #2011
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
Conversation
🦋 Changeset detectedLatest commit: e852cb9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 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: -21 B (0%) Total Size: 449 kB
ℹ️ View Unchanged
|
2b31ea2
to
c1f3264
Compare
c1f3264
to
804c18f
Compare
✔️ Deploy Preview for paste-docs ready! 🔨 Explore the source changes: c1f3264 🔍 Inspect the deploy log: https://app.netlify.com/sites/paste-docs/deploys/61855adc6334f30007a8e8cb 😎 Browse the preview: https://deploy-preview-2011--paste-docs.netlify.app |
✔️ Deploy Preview for paste-theme-designer ready! 🔨 Explore the source changes: e852cb9 🔍 Inspect the deploy log: https://app.netlify.com/sites/paste-theme-designer/deploys/61895f4d9d710200078d4289 😎 Browse the preview: https://deploy-preview-2011--paste-theme-designer.netlify.app |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit e852cb9:
|
Test summaryRun details
View run in Cypress Dashboard ➡️ This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard |
const popover = state || useNonModalDialogPrimitiveState({gutter, modal: true, placement, ...initialState}); | ||
return ( | ||
<PopoverContext.Provider value={popover}> | ||
<Box ref={ref}>{children}</Box> |
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.
What does removing the ref
here do exactly?
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 our components forward refs, so I think it was just doing what other components do. But this isn't a standard component, it's similar to Theme.Provider and is just a React Context.
Removing or adding ref would ordinarily be a breaking change, but since this isn't a standard component and ref here is arguably useless, and since reporting shows no one is passing ref to this --- it should be harmless to remove and mark as a minor change.
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.
Should be pretty low impact, easy fix
✔️ Deploy Preview for paste-docs ready! 🔨 Explore the source changes: e852cb9 🔍 Inspect the deploy log: https://app.netlify.com/sites/paste-docs/deploys/61895f4d6705d00008b62b0a 😎 Browse the preview: https://deploy-preview-2011--paste-docs.netlify.app |
Fixes #1978 and #2006 and #1870
Removes the wrapping Box in PopoverContainer. PopoverContainer is simply a context provider, like Theme.Provider, and that wrapping Box just added styling issues.