Repository navigation
fix(popover): blur translucent popover in chromium - #27484
Merged
Merged
Conversation
|
|
mapsandapps
marked this pull request as ready for review
May 16, 2023 20:49
mapsandapps
marked this pull request as draft
May 16, 2023 21:42
mapsandapps
marked this pull request as ready for review
May 16, 2023 23:50
liamdebeasi
approved these changes
May 17, 2023
Contributor
There was a problem hiding this comment.
It looks like the backdrop filter still does not work on the arrow element. The arrow diff is so small that I'd be fine moving forward with this fix as-is since it does noticeably improve the popover experience even without Chrome respecting the backdrop filter on the arrow. However, we should create a tech debt ticket to track this.
Fixing the arrow requires animating the pseudo element instead of the parent element. You can test this by doing the following (hacky code):
- Apply
opacity: 0from.popover-arrow::afterinstead of.popover-arrowinpopover.ios.scss. - Add
pseudoElement: element.classList.contains('popover-arrow') ? '::after' : undefinedto the object passed toelement.animatein theinitializeWebAnimationfunction insrc/utils/animation/animation.ts.
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
May 17, 2023
brandyscarney
pushed a commit
that referenced
this pull request
May 22, 2023
Issue number: Resolves #22176 --------- <!-- Please do not submit updates to dependencies unless it fixes an issue. --> <!-- Please try to limit your pull request to one type (bugfix, feature, etc). Submit multiple pull requests if needed. --> ## What is the current behavior? <!-- Please describe the current behavior that you are modifying. --> Translucent popovers do not get blurred in Chromium ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> - Translucent popover gets blurred in Chromium Note: existing screenshot tests nicely show the change in behavior. ## Does this introduce a breaking change? - [ ] Yes - [x] No <!-- If this introduces a breaking change, please describe the impact and migration path for existing applications below. --> ## Other information Because of the [existing, apparently intentional](https://bugs.chromium.org/p/chromium/issues/detail?id=1148826) behavior in Chromium browsers with `backdrop-filter` and animation, we need to either animate the arrow and content instead of the wrapper or apply the filter to a different element. Here, I've animated the arrow and content instead of the wrapper. The fix only needs to apply in `ios` mode. The translucent option is not supported in `md` mode. <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. --> --------- Co-authored-by: ionitron <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue number: Resolves #22176
What is the current behavior?
Translucent popovers do not get blurred in Chromium
What is the new behavior?
Note: existing screenshot tests nicely show the change in behavior.
Does this introduce a breaking change?
Other information
Because of the existing, apparently intentional behavior in Chromium browsers with
backdrop-filterand animation, we need to either animate the arrow and content instead of the wrapper or apply the filter to a different element. Here, I've animated the arrow and content instead of the wrapper.The fix only needs to apply in
iosmode. The translucent option is not supported inmdmode.