Skip to content
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

fix(popover): prevent toggletip ref error #17225

Merged
merged 7 commits into from
Sep 5, 2024

Conversation

tay1orjones
Copy link
Member

Reported in slack, this fixes Popover so that it won't incorrectly clone a ToggletipContent child.

The condition was a bit strange and took me a bit to wrap my head around, so I also broke the logic out into something more verbose. I think it helps with readability and being able to more easily understand what's going on there, let me know what you think!

Changelog

New

  • add test to cover the previous failure

Changed

  • update popover child clone logic to not clone ToggletipContent children

Testing / Reviewing

  • Pull this down locally so you can validate there are no console errors in dev.
  • Look at all the toggletip stories and other component stories that use Toggletip, there should be no errors in the console
  • The new test should pass in CI

Copy link

netlify bot commented Aug 20, 2024

Deploy Preview for v11-carbon-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 5827ce6
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/66da16ea9253c50008a2d2d3
😎 Deploy Preview https://deploy-preview-17225--v11-carbon-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Aug 20, 2024

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit 5827ce6
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/66da16eacadbfe000804fc21
😎 Deploy Preview https://deploy-preview-17225--carbon-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

@2nikhiltom 2nikhiltom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No warning in console anymore, and the logic is more readable now 💯

Copy link
Member

@annawen1 annawen1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@tay1orjones tay1orjones added this pull request to the merge queue Sep 4, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Sep 4, 2024
@kennylam kennylam added this pull request to the merge queue Sep 5, 2024
Merged via the queue into carbon-design-system:main with commit 3dc4a27 Sep 5, 2024
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

6 participants