dash icon indicating copy to clipboard operation
dash copied to clipboard

[Feature Request] Make `dcc.Loading` toggle-able attribute for enabled/disabled

Open matt-sd-watson opened this issue 1 year ago • 7 comments

I have created an application where various dcc.Store elements are used to hold user-imported hash tables for images of varying sizes. These images can then be blended together and viewed in a dcc.Graph.

Based on the size and number of images, I would like to be able to wrap these store elements in dcc.Loading components whose visibility/functionality is toggle-able i.e. if the user wishes, he/she can either enable or disable the loading visibility for the stores using a Dash toggle switch. Right now, I don't see an option for this because there is no visibility or enabled attribute for the Loading component. The result is that the visibility for the stores must be set when the app is executed but cannot be dynamically changed within the session. It would be very beneficial to have an attribute for enabled or visible, similar to how some other dash components have, in order to dynamically toggle the visibility of loadings within the app on the fly.

matt-sd-watson avatar Nov 20 '23 18:11 matt-sd-watson

great idea, @matt-sd-watson, thank you. Would you be interested in creating a pull request for this feature?

Coding-with-Adam avatar Nov 22 '23 20:11 Coding-with-Adam

This would be a hugely beneficial feature for our project. In React projects this is super easy, especially with TanQuery 'isLoading' props being available.

JamesKunstle avatar Jan 12 '24 17:01 JamesKunstle

hi @JamesKunstle . It doesn't look like @matt-sd-watson was able to make the PR. Is this something you would like to take a jab at?

Coding-with-Adam avatar Jan 16 '24 20:01 Coding-with-Adam

Yeah @Coding-with-Adam I can give it an effort. Would also love some help triaging #2725 . It's more complicated than this one.

JamesKunstle avatar Jan 17 '24 04:01 JamesKunstle

@JamesKunstle I'm about to do a PR to add some features to dcc.Loading Would you like to collaborate on this project?

AnnMarieW avatar Feb 14 '24 21:02 AnnMarieW

@AnnMarieW Yeah I would love that! I started reading the dash-renderer code and the dcc components code to prepare to make an intelligent PR. @Coding-with-Adam is sharing some resources with me as well, but I would love to work with you!

JamesKunstle avatar Feb 14 '24 21:02 JamesKunstle

Great! I saw you post on the forum recently - I'll send you a PM there

AnnMarieW avatar Feb 14 '24 21:02 AnnMarieW

Closed by #2760

AnnMarieW avatar Jun 03 '24 17:06 AnnMarieW