Fix Progress component#145
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #145 +/- ##
==========================================
+ Coverage 92.53% 93.57% +1.03%
==========================================
Files 90 91 +1
Lines 1594 1665 +71
Branches 243 262 +19
==========================================
+ Hits 1475 1558 +83
+ Misses 99 91 -8
+ Partials 20 16 -4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
The implementation, especially the tests look overly complicated to me for what we want to achieve (display a progress indicator). But that may be due to my limited time.
I was not able to grasp what is done in pendingProgress.ts and what is actually tested in invokeCallbacks.test.ts.
And is the user supposed to set the visible flag? Why?
With that extra amount of code to be maintained it makes a lot sense to clearly document what has been developed here.
- Add a developer note (.md) about the current progress implementation
- Add docstrings to explain purpose and logic
- Comment tests
And
- Change name and meaning of property
visibleintohidden.
| size, | ||
| value, | ||
| variant, | ||
| visible = true, |
There was a problem hiding this comment.
visible is actually not a good choice as a component property. Many boolean component properties are optional and their default is therefore "falsy" (e.g. disabled). Hence this property should be called hidden, not visible.
forman
left a comment
There was a problem hiding this comment.
Please adjust the CHANGES.md, see comment, then merge!
|
|
||
| * Added `hidden` support for progress components. Progress indicators can | ||
| now be hidden via `hidden={true}` and are automatically shown while a | ||
| server-side callback with an output such as `Output("progress", "hidden")` |
There was a problem hiding this comment.
Please clarify what "such as" means, because that is a vague.
If it is not exactly Output("progress", "hidden"), how else can it look like?
Must exactly this subset be present? Can they be named differently? Are other outputs still possible?
There was a problem hiding this comment.
I suggest you provide a full example or link into the docs.
Description
This PR fixes the behaviour of progress components by adding
hiddensupport for the components and connecting it to callback execution state.Progress components can now be hidden with
hidden=Trueand shown via callback outputs such as:When a server-side callback declares a progress component’s
hiddenproperty as an output, chartlets now shows that progress indicator immediately while the callback request is pending. Once the callback completes, the normal callback output is applied, typically hiding the progress component again.Changes
visibleto the shared component state model.invokeCallbacks().DEV_NOTES.mdto explain the Progress logic.vega_test.py.Demo Panel
xcube-viewer panels demo
