Skip to content

Add clip spinner type to dcc.Loading - #4015

Open
budescode wants to merge 1 commit into
plotly:devfrom
budescode:add-clip-spinner
Open

budescode wants to merge 1 commit into
plotly:devfrom
budescode:add-clip-spinner

Conversation

@budescode

Copy link
Copy Markdown

Adds clip as a new built in spinner type for dcc.Loading: a ring with a gap that rotates and pulses slightly. Use it with dcc.Loading(type="clip").

dcc.Loading ships 5 built-in types, and none of them is a plain rotating ring, which is the most common loading indicator on the web.

The spinner is a port of ClipLoader from react-spinners (MIT). It follows the same approach as the existing default, dot and circle spinners, which are ports from SpinKit: no new dependency, one self-contained file with inline CSS, and the source credited in a comment.

clip-spinner

Contributor Checklist

  • I have broken down my PR scope into the following TODO tasks
    • Add ClipSpinner.tsx
    • Register clip in Loading.tsx and in the type union in types.ts
    • Add integration test test_ldcp020_loading_component_clip_spinner
  • I have run the tests locally and they passed. (refer to testing section in contributing)
  • I have added tests, or extended existing tests, to cover any new features or bugs fixed in this PR

optionals

  • I have added entry in the CHANGELOG.md
  • If this PR needs a follow-up in dash docs, community thread, I have mentioned the relevant URLS as follows
    • this GitHub #PR number updates the dash docs
    • here is the show and tell thread in Plotly Dash community

@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant