You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I like to build my UI based on components, and to show my UI as a single page, rather than stacked output cells (in vertical mode). I'm doing a lot of longer calculations which are triggered by e.g. a run button. When a long calculation takes place, I want to show a status spinner.
The current solution proposed is something like this, assuming the slow function is triggered by a run button:
Besides being very verbose, this method breaks down if we want to control the number of outputs inside our app: each of these cells which use a spinner will have it's own output, meaning we cannot use the vertical display mode in the app run mode, if we to control the layout using the vstack, or hstack methods, based on the UIElement of each returned by each cell. Instead we're forced to use the grid-mode, and place the outputs manually.
Moreover, and more critically, we cannot use this method when we want to place the output on an tab, because a tab requires us to pass the UIElement, which we don't have in this case (we only have the cell output).
Therefore I think, the current implementation is insufficient, for the more advanced user.
Suggested solution
We need a function similar to mo.lazy, let's call it mo.slow, but which gets re-rendered when triggered.
Description
I like to build my UI based on components, and to show my UI as a single page, rather than stacked output cells (in vertical mode). I'm doing a lot of longer calculations which are triggered by e.g. a run button. When a long calculation takes place, I want to show a status spinner.
The current solution proposed is something like this, assuming the slow function is triggered by a run button:
Besides being very verbose, this method breaks down if we want to control the number of outputs inside our app: each of these cells which use a spinner will have it's own output, meaning we cannot use the vertical display mode in the app run mode, if we to control the layout using the vstack, or hstack methods, based on the UIElement of each returned by each cell. Instead we're forced to use the grid-mode, and place the outputs manually.
Moreover, and more critically, we cannot use this method when we want to place the output on an tab, because a tab requires us to pass the UIElement, which we don't have in this case (we only have the cell output).
Therefore I think, the current implementation is insufficient, for the more advanced user.
Suggested solution
We need a function similar to mo.lazy, let's call it mo.slow, but which gets re-rendered when triggered.
e.g.
mo.lazy does the job almost (showing a spinner), but it's purpose is different (delay rendering of ui components).
The function mo.slow could take as arguments what type of status update to show (spinner, bar, wave. etc.)
Alternative
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: