Skip to content
This repository has been archived by the owner on Jun 4, 2024. It is now read-only.

Loading class that is the _parent_ of the app container #58

Closed
chriddyp opened this issue Jul 2, 2018 · 2 comments
Closed

Loading class that is the _parent_ of the app container #58

chriddyp opened this issue Jul 2, 2018 · 2 comments

Comments

@chriddyp
Copy link
Member

chriddyp commented Jul 2, 2018

Right now, the ._dash-loading-indicator class is a cousin of the app container. If it was the parent, then you could customize UI in your app.layout that would only appear while a callback is being executed:

app.layout = html.Div(className='display-on-loading', children='Loading')
.display-on-loading {
    display: none;   
}
._dash-loading-indicator  .display-on-loading {
    display: block;
}
@chriddyp
Copy link
Member Author

chriddyp commented Jul 2, 2018

For example, here's some CSS that could display a universe "loading" message at the top of the page:

.saving-indicator {
    width: 80px;
    background-color: #F50091;
    color: rgb(50, 50, 50);
    padding: 5px 5px 10px 10px;
    color: white;
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
    position: absolute;
    left: calc(50% - 40px);
    z-index: 1;
    text-align: center;
    display: none;
}

._dash-loading-callback-parent .saving-indicator {
    display: block;
}

@alexcjohnson
Copy link
Collaborator

I'm assuming this is closed by the loading states API #93 https://community.plot.ly/t/loading-states-and-loading-component/19650 - if there's anything still relevant here please reopen in the dash repo.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants