Should Widget.loading
place the obscured widget in a disabled
state while True
?
#3516
Labels
Widget.loading
place the obscured widget in a disabled
state while True
?
#3516
With the new
Widget.loading
reactive, the obscured widget is still enabled and can be interacted with by the user; this could potentially have unintended consequences as the user attempts to navigate an application's UI. To illustrate, take the example in the documentation, but instead place the pause after the job of populating the table (essentially simulating a loading operation where data is coming in in realtime, with each new item of data causing a short pause).If you run this and, while the first
DataTable
is in a loading state, press down a few times, once the loading has finished and theDataTable
is revealed you can see that the cursor has moved.While a mild problem in this example, it could have negative unintended consequences if UI elements being added in the background are more destructive.
It also means that a container in a
loading
state could be adding to the focus chain, with subsequent containers and widgets being visible and interactive, but the focus is "lost" amongst the obscured but focusable widgets.As such, perhaps the widget that is obscured by
loading
beingTrue
should also bedisabled
for the duration, or at the very leastloading
being true should be treated as ifdisabled
isTrue
from a styling and interactivity point of view.The text was updated successfully, but these errors were encountered: