-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EHN Implement the new logo on the loading animation #1546
Merged
maxime-rainville
merged 1 commit into
silverstripe:2
from
creative-commoners:pulls/2/loading-animation
Aug 24, 2023
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
$dash: 750; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've moved this bit from |
||
|
||
.cms-content-loading-overlay { | ||
position: absolute; // z-index doesn't apply properly without that | ||
top: 0; | ||
left: 0; | ||
width: 100%; | ||
height: 100%; | ||
z-index: 9998; | ||
// Further styling by .ui-widget-overlay-light which is usually applied at the same time | ||
} | ||
|
||
.cms-content-loading-spinner { | ||
position: absolute; // z-index doesn't apply properly without that | ||
top: 0; | ||
left: 0; | ||
width: 100%; | ||
height: 100%; | ||
z-index: 9999; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
|
||
.spinner { | ||
width: 3rem; | ||
height: 3rem; | ||
padding: .5rem; | ||
|
||
background-color: $white; | ||
border-radius: $border-radius-sm; | ||
|
||
.ss-loading-screen & { | ||
width: 9rem; | ||
height: 9rem; | ||
background-color: transparent; | ||
} | ||
|
||
&__animation { | ||
width: 100%; | ||
height: 100%; | ||
|
||
&__empty { | ||
fill: transparent; | ||
} | ||
|
||
&__fill-left, | ||
&__fill-right { | ||
fill: none; | ||
stroke: $blue; | ||
stroke-width: 70; | ||
stroke-dasharray: $dash; | ||
transform: translateZ(0); | ||
} | ||
|
||
&__fill-left { | ||
|
||
animation: spinner__animation__keyframes-left 3s infinite cubic-bezier(.445, .05, .55, .95) | ||
forwards; | ||
|
||
@keyframes spinner__animation__keyframes-left { | ||
0% { | ||
stroke-dashoffset: 0; | ||
} | ||
|
||
25% { | ||
stroke-dashoffset: $dash; | ||
} | ||
|
||
50% { | ||
stroke-dashoffset: $dash; | ||
} | ||
|
||
75% { | ||
stroke-dashoffset: $dash*2; | ||
} | ||
|
||
100% { | ||
stroke-dashoffset: $dash*2; | ||
} | ||
} | ||
} | ||
|
||
&__fill-right { | ||
animation: spinner__animation__keyframes-right 3s infinite cubic-bezier(.445, .05, .55, .95) | ||
forwards; | ||
|
||
@keyframes spinner__animation__keyframes-right { | ||
0% { | ||
stroke-dashoffset: $dash*2; | ||
} | ||
|
||
25% { | ||
stroke-dashoffset: $dash*2; | ||
} | ||
|
||
50% { | ||
stroke-dashoffset: $dash; | ||
} | ||
|
||
75% { | ||
stroke-dashoffset: $dash; | ||
} | ||
|
||
100% { | ||
stroke-dashoffset: 0; | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
Binary file not shown.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've decided to throw Safari under the bus here. Basically, forcing us to use absolute URL to find those SVGs introduce a bug where sometime if you've updated the URL with react route or added some extra parameter, the SVG path clipping doesn't work.
Using the IDs directly instead of the full URL seems to mitigate this problem.
Basically, I think that having this work consistently in all other browser is better than adding a hack so that Safari users get it looking at it's best some of the time.
Safari user should still get a reasonable animation in most cases. It just won't have the nice curvy bit. Given that those loading animation are only shown for a fleeting second and are pretty small, I doubt anyone will even notice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Safari will probably look something like this.