Skip to content

fix(Popover): scope popover styles to only influence direct children#14200

Merged
tw15egan merged 5 commits into
carbon-design-system:mainfrom
tw15egan:scope-popover-styles
Jul 28, 2023
Merged

fix(Popover): scope popover styles to only influence direct children#14200
tw15egan merged 5 commits into
carbon-design-system:mainfrom
tw15egan:scope-popover-styles

Conversation

@tw15egan

@tw15egan tw15egan commented Jul 12, 2023

Copy link
Copy Markdown
Contributor

Closes #14195
Refs #13836
Refs #13750

This changes all positioning logic (and some tab-tip specific styles) to only target their direct child. This should prevent issues where IconButton or other components that use a Tooltip or Popover aren't affected by the top-level positioning styles.

Changelog

Changed

  • Instead of using general selectors ( .#{$prefix}--popover--bottom .#{$prefix}--popover-content), I changed it so that they all are scoped e.g. .#{$prefix}--popover--bottom > .#{$prefix}--popover .#{$prefix}--popover-content

Testing / Reviewing

Pull down locally, and try changing the align prop of the IconButton in the test story to each different alignment, and ensure they render correctly. Also ensure there are no regressions for the existing Popover components

@tw15egan tw15egan requested a review from a team as a code owner July 12, 2023 14:08
@tw15egan tw15egan requested review from guidari and tay1orjones July 12, 2023 14:08
@netlify

netlify Bot commented Jul 12, 2023

Copy link
Copy Markdown

Deploy Preview for carbon-components-react ready!

Name Link
🔨 Latest commit f064932
🔍 Latest deploy log https://app.netlify.com/sites/carbon-components-react/deploys/64c2ce9114063d0008055bc6
😎 Deploy Preview https://deploy-preview-14200--carbon-components-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.

@netlify

netlify Bot commented Jul 12, 2023

Copy link
Copy Markdown

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit f064932
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/64c2ce91cc06440008701eb9
😎 Deploy Preview https://deploy-preview-14200--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.

@guidari guidari left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

I just found that Safari has glitch when it comes to the drop-shadow prop. I tried to solve it, but it doesn't look simple, the work around that other devs are saying, would be using box-shadow, but I also couldn't make it work 😅

Anyhow, just FYI @tw15egan. The fixes for the PR looks good. 🚀

Screenshot 2023-07-14 at 10 01 02

@tw15egan

Copy link
Copy Markdown
Contributor Author

@guidari whoa thats super weird, will create a separate issue to track that one. Nice catch 👍🏻

@tw15egan

Copy link
Copy Markdown
Contributor Author

@tay1orjones when you get a chance this just needs one more review

@tay1orjones tay1orjones left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Sorry @tw15egan my bad

@github-actions github-actions Bot enabled auto-merge July 27, 2023 20:08
@github-actions github-actions Bot added this pull request to the merge queue Jul 27, 2023
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Jul 27, 2023
@tw15egan tw15egan added this pull request to the merge queue Jul 28, 2023
Merged via the queue into carbon-design-system:main with commit 734a3be Jul 28, 2023
@tw15egan tw15egan deleted the scope-popover-styles branch July 28, 2023 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Popover with interactive trigger causes tooltip layout issue

3 participants