Open petar-qb opened 1 week ago
Updated on: 2024-11-21 12:16:03 UTC Commit: 53d73e56671e944cdc426183a14b5cdfdf0a1d4f
Link: vizro-core/examples/dev/
Link: vizro-core/examples/scratch_dev
This or next PR TODOs (we should decide it):
- [ ] - Support dynamic for the
vm.DatePicker
. (Maybe it's better to wait for the dash persistence bugfix as persistence doesn't work for the vm.DatePicker even on themain
branch)
Definitely not urgent. Let's wait for this and fix https://github.com/plotly/dash/issues/2678 first.
Next PRs:
- [ ] - Enhance the default
selector.value
handling for new users. There are a few cases marked with 🟠in this Issue -> Fix default value for dynamic controls McK-Internal/vizro-internal#1356. There are two inconsistencies listed at the bottom of the Issue description. This TODO points to thesecond
inconsistency.- [ ] - Introduce "Universal Vizro placeholder component" -> Add universal Vizro placeholder component to all dynamic components McK-Internal/vizro-internal#1307
- [ ] - Fix the
multi=False vm.Dropdown
dynamic selector bug when the value is cleared. This will be solved when Vizro universal placeholder component become introduced.
How many of these will still be problems once we fix https://github.com/plotly/dash/issues/2678?
- [ ] - Enable dynamic filter to work with the empty data_frame.
Good idea - let's discuss how this works now and how it should work.
- [ ] - Propagate
data_frame Parameter
default values from themodel_manager
into theDM._multi_load()
that's called from thevm.Filter.pre_build()
. -> PoC can be found in the comment.
Added to the comment there but basically let's leave as a TODO and open a ticket. Not urgent.
- [ ] - Implement "Select ALL" for the multi=True categorical selectors.
Would love to do this soon (like by end of year if possible).
- [ ] - Implement "Select the entire range" for the multi=True numerical selectors.
Not as high priority - let's make a ticket and forget for now.
Open questions:
- How to enable dynamic Parameters? Should we allow, for example, the "options" property of a categorical parameter selector to be a function that dynamically calculates and returns new options?
Good question but I think not super high priority unless we have an immediate use for it.
- How to enable a dynamic filter to be targeted by any predefined action? For example the parameter_action target. Or like this:
update_figures(targets=[”filter_1_id”])
Very good question and presumably required for us to get DFPs to update filters without reloading the page? So this one needs to be worked out soon.
- What exactly is a new way of dash persistence handling we expect (this fix will be implemented by us)?
Let's discuss but I think basically the "common sense" way that we initially expected things to work.
- If we introduce the
data_frame
property for the vm.Filter component, and if thedata_frame Parameters
change the targeting form todata_manager_key.function_argument
, does is mean that our dynamic Filters could be handled in a same way as any other dynamic figure components?
Not sure I understand this, please could you explain?
Basically I think roughly ordered priorities are:
Implement "Select ALL" for the multi=True categorical selectors. https://github.com/McK-Internal/vizro-internal/issues/1342#issue-2618580976
wdyt?
Description
This PR introduces
dynamic
filters for the following selectors (so, all Vizro selectors exceptvm.DatePicker
):vm.Dropdown
,vm.RadioItems
,vm.Checklist
,vm.Slider
andvm.RangeSlider
You can test the feature by altering values in the
scratch_dev/data.yaml
(in the way that's described in the comment) and running thescratch_dev/app.py
.TODOs:
This PR TODOs:
This or next PR TODOs (we should decide it):
vm.DatePicker
. (Maybe it's better to wait for the dash persistence bugfix as persistence doesn't work for the vm.DatePicker even on themain
branch)Next PRs:
selector.value
handling for new users. There are a few cases marked with đźź in this Issue -> https://github.com/McK-Internal/vizro-internal/issues/1356. There are two inconsistencies listed at the bottom of the Issue description. This TODO points to thesecond
inconsistency.multi=False vm.Dropdown
dynamic selector bug when the value is cleared. This will be solved when Vizro universal placeholder component become introduced.data_frame Parameter
default values from themodel_manager
into theDM._multi_load()
that's called from thevm.Filter.pre_build()
. -> PoC can be found in the comment.References:
Open questions:
update_figures(targets=[”filter_1_id”])
data_frame
property for the vm.Filter component, and if thedata_frame Parameters
change the targeting form todata_manager_key.function_argument
, does is mean that our dynamic Filters could be handled in a same way as any other dynamic figure components?Notice
[x] I acknowledge and agree that, by checking this box and clicking "Submit Pull Request":