forked from deephaven/web-client-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix!: CSS based loading spinner (deephaven#1532)
- Swapped our LoadingSpinner implementation with a simpler html / CSS only spinner - Fixes a layout shift after font load caused by `font-size: $iris-panel-icon-font-size` in `.message-icon` of LoadingOverlay - Fixes loading spinner backtracking due to multiple instances of spinners **Regression Tests Performed** - LoadingOverlay - I added a synthetic wait to PluginUtils right after the manifest loading. Loading overlay is now seamless. No layout shift or backtracking Verified the following look as they did before Community - Styleguide indeterminate and progress spinners - Styleguide context menu spinners - Console "Running" spinner - AppMainContainer disconnection spinner - Command history tooltip elapsed spinner - Advanced filter spinner - Column statistics spinner - IrisGridCopyHandler slight adjustment such that spinner + text are centered - PartitionSelectorSearch spinner - Commit button in PendingDataBottomBar - Custom column builder "applying" spinner - Table CSV exporter spinner Enterprise - Enterprise login spinner ``` await new Promise(resolve => { setTimeout(resolve, 2000); }); ``` fixes deephaven#1531 BREAKING CHANGE: Inline LoadingSpinner instances will need to be decorated with `className="loading-spinner-vertical-align"` for vertical alignment to work as before
- Loading branch information
Showing
31 changed files
with
267 additions
and
129 deletions.
There are no files selected for viewing
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
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
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
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
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 |
---|---|---|
@@ -1,6 +1,56 @@ | ||
/* stylelint-disable alpha-value-notation */ | ||
.loading-spinner { | ||
--primary-color: var( | ||
--dh-loading-spinner-primary-color, | ||
var(--dh-accent-color, #4c7dee) | ||
); | ||
--secondary-color: var( | ||
--dh-loading-spinner-secondary-color, | ||
rgba(240, 240, 240, 0.5) | ||
); | ||
--border-width: 1px; | ||
--size: 14px; | ||
|
||
box-sizing: border-box; | ||
display: inline-block; | ||
margin: 0 auto; | ||
width: var(--size); | ||
height: var(--size); | ||
} | ||
|
||
.loading-spinner-large { | ||
font-size: 64px; | ||
.svg-inline--fa { | ||
font-size: inherit; | ||
--border-width: 4px; | ||
--size: 56px; | ||
} | ||
|
||
.loading-spinner-vertical-align { | ||
// The original LoadingSpinner used `.fa-layers` to create the spinner icon. | ||
// This includes a vertical aligment adjustment to center the spinner along | ||
// side of other inline content. Copying this value from the `.fa-layers` | ||
// class to avoid breaking alignment of the new spinner. | ||
vertical-align: -0.125em; | ||
} | ||
|
||
// Spinning circle with colored border and transparent center. Half of the | ||
// circle is the primary color. The other half is the secondary color. | ||
.loading-spinner::after { | ||
animation: loading-spinner-rotate 2s linear infinite; | ||
border: var(--border-width) solid; | ||
border-color: var(--primary-color) var(--primary-color) var(--secondary-color) | ||
var(--secondary-color); | ||
border-radius: 50%; | ||
box-sizing: border-box; | ||
content: ''; | ||
display: inline-block; | ||
width: var(--size); | ||
height: var(--size); | ||
} | ||
|
||
@keyframes loading-spinner-rotate { | ||
0% { | ||
transform: rotate(0deg); | ||
} | ||
100% { | ||
transform: rotate(359deg); | ||
} | ||
} |
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
Oops, something went wrong.