fix(loaders): fix Dot loader for IE11 #936
Merged
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 pull request fixes the
Dot
loader animation in Internet Explorer 11.Detail
It looks like
useCSSSVGAnimation
is unreliable in determining if an SVG can be animated. In both Chrome 86 and Internet Explorer,useCSSSVGAnimation
returns the same result. This is unexpected because Internet Explorer does not support SVG animations.This PR removes
useCSSSVGAnimation
and replaces it with a working SVG animation check. It checks thetransform
property of thesvg
element to determine if SVG can be animated. In modern Chrome, Safari, Firefox, and Edge this check returnstrue
indicating animation is supported. In IE11, the check returnsfalse
indicating the animation is not supported.By using the correct boolean check, the
Dot
loader animates correctly across all browsers that are supported by Garden.Verification Steps
❌ Before:
Dot
loader Storybook example on the production site hereDot
loader does not animate✅ After:
Dot
loader Storybook example on the "View Deployment" site hereDot
loader does animateScreenshots
❌ Before:
![2020-11-16 11 21 22](https://user-images.githubusercontent.com/1811365/99298027-eeb54b80-27fd-11eb-9e5d-277d383cef71.gif)
✅ After:
![2020-11-16 11 19 58](https://user-images.githubusercontent.com/1811365/99298014-ebba5b00-27fd-11eb-9436-379af8000a41.gif)
Checklist
?bedrock
)