fix: Prevent drag handle arrow button flicker on exit animation #3543
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
This change addresses a UX issue where buttons briefly reappeared after their exit animation, causing an unwanted flicker effect (reported in cloudscape-design/board-components#356 (comment)). By retaining the final keyframe state, we create a smoother transition without disrupting the intended hide behavior.
Before this change: When the exit animation completes, the element briefly reverts to its original state before being hidden. This happens because by default, CSS animations reset to their pre-animation state once completed (see MDN docs for animation-fill-mode). The specific animation sequence behavior before this change:
before.mov
The animation sequence after this change:
after.mov
Related links, issue #, if available:
AWSUI-60240How has this been tested?
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.