I think that loading states should be something that is built-in (and customizable) through Dash rather than through a complex set of Input/Output callbacks and components.
I think that the loading state should be customizable on a per-element and on a per-app basis. So, you could either add a loading state to the entire app (e.g. grey out the app between updates) or add a loading state to an individual element (e.g. add a loading spinner to a single output element or a single input element).
I’ll start working on this within the next week or so. If anyone has any feedback, requests, opinions or examples to share, please speak up!
One thing that might be tricky is figuring out how preventing the loading state from “flashing” in and out of the UI. Animations might help here. For example, if a callback takes only 100ms or even 500ms, then you might not need to show a loading state (otherwise the loading state could flash in and out really quickly). Do we leave this up to the users to determine when to show the loading state? Or do we just design nice loading states that ease in and out with animations? Or do we time how long the requests take and then only display the loading state if the previous request took less than e.g. 500ms?