-
Notifications
You must be signed in to change notification settings - Fork 12
refactor(widget): replace spinner with dots-loader + small UI edits #637
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
Merged
Merged
Changes from 17 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
e4ecfd0
replace spinner w/ dots-loader
DarianM 53d41a9
format
DarianM 6ebef30
use renderRoot
DarianM 5f88e39
add small fallback for dots-loader
DarianM eb2c127
move into shared
DarianM 63d1f6a
fix import dots
DarianM 3676dff
update svg; widget home layout; close-btn color
DarianM 773efe5
add conic gradient to widget trigger button
DarianM 1c450e0
nit
DarianM 16564cd
change defaults widget
DarianM e6d3f28
remove opacity for dots-loader
DarianM 049df65
+ opacity
DarianM 93bfcbb
Merge branch 'main' into dots_loader
DarianM 17f0959
format
DarianM 9ca88e1
requested: try another dots animation
DarianM 0ab6413
keep latest animation requested
DarianM 8659040
replace limit support contrst-color w/ oklch
DarianM 5199854
svg optimize
DarianM 2dd9c85
label; svg aria-hidden; click default bubbleup
DarianM e43eccd
oklch resource comment
DarianM 28f52f1
dots loader a11y
DarianM 1f3c802
alternative for prefers-reduced-motion
DarianM e15638b
format
DarianM a3266ce
change the comment
DarianM 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
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| import { LitElement, css, html } from 'lit' | ||
| import { property } from 'lit/decorators.js' | ||
|
|
||
| export class CloseBtn extends LitElement { | ||
| @property({ type: String }) color: string = 'currentColor' | ||
|
|
||
| static styles = css` | ||
| button { | ||
| border: none; | ||
| background: none; | ||
| cursor: pointer; | ||
| padding: 0px; | ||
| border-radius: 8px; | ||
| width: 25px; | ||
| height: 25px; | ||
| aspect-ratio: 1/1; | ||
| } | ||
|
|
||
| button:hover { | ||
| border-radius: 8px; | ||
| background-color: rgba(0, 0, 0, 0.05); | ||
| } | ||
| ` | ||
|
|
||
| render() { | ||
| return html` <button | ||
| aria-label="Close window" | ||
sidvishnoi marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| @click=${() => | ||
| this.dispatchEvent(new CustomEvent('close', { bubbles: true }))} | ||
sidvishnoi marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| > | ||
| <svg viewBox="0 0 20 20" fill="none"> | ||
sidvishnoi marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| <path | ||
| d="M5.33219 15.2575L4.74219 14.6675L9.40885 10.0008L4.74219 5.33414L5.33219 4.74414L9.99885 9.41081L14.6655 4.74414L15.2555 5.33414L10.5889 10.0008L15.2555 14.6675L14.6655 15.2575L9.99885 10.5908L5.33219 15.2575Z" | ||
| fill=${this.color} | ||
| /> | ||
| </svg> | ||
| </button>` | ||
| } | ||
| } | ||
sidvishnoi marked this conversation as resolved.
Show resolved
Hide resolved
|
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| import { LitElement, html, css } from 'lit' | ||
|
|
||
| export class DotsLoader extends LitElement { | ||
| static styles = css` | ||
| :host { | ||
| display: inline-flex; | ||
| gap: 6px; | ||
| align-items: flex-end; | ||
| height: 20px; | ||
| } | ||
|
|
||
| span { | ||
| width: 8px; | ||
| height: 8px; | ||
| border-radius: 50%; | ||
| background-color: oklch(from var(--primary-color) round(1.21 - L) 0 0); | ||
sidvishnoi marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| animation: circles-bounce 500ms infinite ease-in alternate; | ||
sidvishnoi marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
|
|
||
| span:nth-child(2) { | ||
| animation-delay: 150ms; | ||
| } | ||
|
|
||
| span:nth-child(3) { | ||
| animation-delay: 300ms; | ||
| } | ||
|
|
||
| span:nth-child(4) { | ||
| animation-delay: 450ms; | ||
| } | ||
|
|
||
| @keyframes circles-bounce { | ||
| 0% { | ||
| transform: translateY(0); | ||
| } | ||
| 100% { | ||
| transform: translateY(-10px); | ||
| } | ||
| } | ||
| ` | ||
|
|
||
| render() { | ||
| return html`<span></span><span></span><span></span><span></span>` | ||
sidvishnoi marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| } | ||
| } | ||
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.