fix(popover): restores drop shadow for nested popovers#3965
Conversation
🦋 Changeset detectedLatest commit: b6bad98 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 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 |
|
🚀 Deployed on https://pr-3965--spectrum-css.netlify.app |
File metricsSummaryTotal size: 1.42 MB*
popover
* An ASCII character in UTF-8 is 8 bits or 1 byte. |
2d298d9 to
82fb626
Compare
4da178a to
c6952ec
Compare
c0904af to
96642fa
Compare
marissahuysentruyt
left a comment
There was a problem hiding this comment.
Just putting some of our conversation here for posterity:
I think I agree with you that React's implementation isn't quite what we're looking for. That feels like a much larger refactor, to pull the action menu out of our current markup, just so that it's not part of the "double shadow" thing. If i'm remembering correctly, the shadow on the popover was initially built with filter: drop-shadow(all the drop shadow values..) because we need to incorporate the lil' triangle when popovers have a tip, like the shadow has to follow that weird popover+triangle shape. Otherwise, React's box-shadow doesn't work on it, and doesn't follow the tip shape.
All that being said....if we completely remove that nested popover filter mod, we do end up with double shadows being built. the second screenshot is the nested story on the popover page. This one feels really visible to me- less visible than the one on the action menu in coach mark.
So what if instead, we opt for using box-shadow most of the time, but then move the filter style just to popover-with-tip.
This is a tough one. I'd still want someone from design to take a peek since the box shadow and the filter drop shadow definitely look different 😅 My untrained eyes say the box-shadow actually looks closer to the Figma shadow, but it also feels weird to use box-shadow on some popovers, and filter on others. 🤦♀️
My first thought is to refactor the filter at line 72 to use box-shadow instead. That would give us the comparison for popovers with a tip (using filter) and popovers without the tip (box-shadow)
There was a problem hiding this comment.
Another note for posterity:
The box shadow (pink) renders smaller than the filter: drop-shadow() (green). However, the box shadow looks to match the Figma drop shadow better- this is where I'd need to get with a designer to ask which they like better. The values are identical for X, Y, blur, and color, but:
- the box-shadow and filter: drop-shadow() use different blur algorithms. 🤦♀️
- Apparently, there's also an extra compositing layer with filter: drop-shadow(), which can affect how the blur spreads. 🤦♀️
- Maybe there's some bounding container fudging going on which may make the blur extend further. I wonder if the filter is considering the tip as "part" of bounds, and is pretty much adding 8 extra pixels to the bounding container when it shouldn't really, giving the illusion of a larger, softer drop-shadow.
I had everything in dark mode to try to see the shadows better.
📚 Branch previewPR #3965 has been deployed to Azure Blob Storage: https://spectrumcss.z13.web.core.windows.net/pr-3965/index.html. |
c0ad3eb to
9934091
Compare
9934091 to
18bb2cb
Compare
| @@ -69,12 +74,14 @@ | |||
| border-width: var(--mod-popover-border-width, var(--spectrum-popover-border-width)); | |||
There was a problem hiding this comment.
Custom property --spectrum-popover-border-width not defined
18bb2cb to
e4a5ed4
Compare
marissahuysentruyt
left a comment
There was a problem hiding this comment.
This is looking good to me! I did leave a suggestion for the changeset, since we ended up changing it a little more dramatically that we had initially.
I'm also curious about the stylelint PR comment that --spectrum-popover-border-width is undefined. It was already there during the popover migration, so I'm trying to figure out where that variable went missing...that's a different PR I guess! Thanks for your hard work on this!
a18baa7 to
b6bad98
Compare



Description
CSS-1066Restores drop shadow for nested popovers.
Per design and the coach mark component in our Figma library, nested popovers should have drop shadows enabled.
Screenshots
To-do list