fix: Apply stacked flashbar feature shadows to correct element#728
Merged
fix: Apply stacked flashbar feature shadows to correct element#728
Conversation
Codecov ReportBase: 93.27% // Head: 93.27% // No change to project coverage 👍
Additional details and impacted files@@ Coverage Diff @@
## main #728 +/- ##
=======================================
Coverage 93.27% 93.27%
=======================================
Files 584 584
Lines 17074 17074
Branches 4703 4703
=======================================
Hits 15926 15926
Misses 1068 1068
Partials 80 80 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
jperals
approved these changes
Feb 8, 2023
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.
Description
The recent shadow updates in #702, unified how we apply shadows in many components, including simplifying the shadow approach in Flashbars. Previously, Flashbars applied shadows on different elements depending on the theme (pseudo element in refresh, directly on the Flash item in classic). However the latest update simplified both themes to use a single approach (pseudo element) (see code diff).
This unintentionally brought a tiny existing bug to light in the unreleased stacked Flashbar feature. More specifically, stacked Flashbars should have a different shadow compared to a normal un-stacked Flashbar shadow. This was the case in classic but not refresh - because shadows previously were applied to separate elements, the shadow was overriding the original shadows in classic (intended), but it was adding them to the default Flashbar shadow in visual refresh resulting in a double shadow (not intended).
This bug was barely noticeable to the human eye due to the large spread of shadows in visual refresh, which is why it did not get caught until now. The refactoring in #702, brought this the same bug that was happening in visual refresh to appear in classic as well, resulting in a double shadow on all stacked Flashbars (in classic and refresh - previously just refresh), and is more noticeable in classic as seen in the screenshots below (albeit still very subtle).
This change also addresses a bug in dark mode visual refresh shadow that was causing it to overlap underlying Flashbars, making them almost invisible.
Screenshots below, each highlighting:
before #702 | after #702 | after #702 with this fix
Related links, issue #, if available: n/a
How has this been tested?
Locally, part of the reason this regression happened in the first place was because there were no tests in place to catch it. These are coming in a separate PR as part of the stacked Flashbar feature release.
Review checklist
The following items are to be evaluated by the author(s) and the reviewer(s).
Correctness
CONTRIBUTING.md.CONTRIBUTING.md.Security
checkSafeUrlfunction.Testing
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.