plotly / plotly/dash

document how to work with dcc.Loading loading state

Open
#2,164 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

documentation feature P3
Dominant language
Python
Stars
24.4k
Forks
2.3k
Avg merge
2d 7h
Merged PRs (30d)
13

Description

@cdolfi
I'd like to improve how responsive my app feels. At the moment, I trigger a relatively large back-end request with a button that must complete before the graphs on my page, sequentially, enter and exit their respective loading states.

I would like to be able to manually set the is_loading field of the dcc.Loading component when I trigger this large back-end request but after having played with it I can't make this behavior happen.

It would be appreciated if an example could be provided for how to properly interact with this field of the dcc.Loading (and subsequently and nested dcc.*(loading_state={}) options).

Example of the clunky polish of the app that we're working on (Overview page):
https://sandiego-explorer.osci.io/overview

Note that the graphs are blank on the "overview" page until their respective sequential predecessors complete rendering and, I assume, the "is_loading" field is set on update.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the dcc.Loading documentation and the loading_state and is_loading fields described in the issue, then compare the behavior with the linked Overview page. Document a working example for manually coordinating a large back-end request with dcc.Loading, including the nested dcc.* loading_state options. Done means a newcomer can follow the example to control the loading state and avoid sequential blank graphs.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation, frontend
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.