Open FlorianJacta opened 1 year ago
Putting this issue to Medium as a customer (Intermarché) won't use the Scenario Selector as they think it is unusable if there are too many scenarios
Can this be linked to a filtering capability? https://github.com/Avaiga/taipy/issues/1040
It could, but I think what this issue is about, is different
Putting this as Medium priority as Scenario Selectors have filters now.
A new Quest has been launched in @Avaiga’s repo. Merge a PR that solves this issue to loot the Quest and earn your reward.
Some loot has been stashed in this issue to reward the solver!
🗡 Comment @quest-bot embark
to check-in for this Quest and start solving the issue. Other solvers will be notified!
⚔️ When you submit a PR, comment @quest-bot loot #169
to link your PR to this Quest.
Questions? Check out the docs.
Can i work on this?
Yes, you can @eleensmathew. Thank you for your contribution!
Can i get more context and details about this issue?
In a nutshell, this is a way to group scenarios in the scenario selector when they are too many.
The scenario selector becomes too large and hard to navigate with many scenarios or cycles. This feature helps end-users navigate within the list of scenarios.
A new group_by property should be exposed to activate the feature. The property could accept an auto value to let Taipy decide the categories to group the scenarios. Otherwise, a list of possible groups among day, week, month, quarter, and year could be passed. Let’s imagine we have daily scenarios, and the groups provided are year, month, and week. The groups should be organized as follows:
2024
|___April
| |___week 18
| | |___Cycle - 29 April 2024
| | |___ Scenario A
| | |___ Scenario B
| | |___ Scenario C
| |
| |___week 17
| |___week 16
| |___week 15
| |___week 14
|___March
|___February
|___January
|___week 4
|___week 3
|___week 2
|___week 1
|___Cycle - 07/01/2024
|___Cycle - 06/01/2024
|___Cycle - 05/01/2024
|___Cycle - 04/01/2024
| |___ Scenario FOO
| |___ Scenario BAR
| |___ Scenario BAZ
|
|___Cycle - 03/01/2024
|___Cycle - 02/01/2024
|___Cycle - 01/01/2024
2023
|___December
| |___week 52
|___November
Without Cycles, Grouped by Month (and “Year” appears as well for months to be unique)
2024
|___April
| |___ Scenario A
| |___ Scenario B
| |___ Scenario C
|___March
|___February
|___January
2023
|___December
| |___ Scenario X
| |___ Scenario Y
|___November
With auto-on and multiple scenarios per day
2024
|___April
| |___Day 29
| | |___ Scenario A
| | |___ Scenario B
| | |___ Scenario C
| |___Day 28
| |___Day 27
| |___Day 26
|___March
|___February
|___January
2023
|___December
| |___Day 31
| |___Day 30
<| {scenario} | scenario_selector | group_by=auto |>
<| {scenario} | scenario_selector | group_by=cycle |>
<| {scenario} | scenario_selector | group_by=date |>
Thanks so much for this :)
Do you also mind letting me know which files is perhahs relevant to this issue? so I can take a better look into it
@FredLL-Avaiga will be able to help you on this
I guess this would mainly be done on the backend ie taipy\gui_core_context.py [method get_scenarios}(https://github.com/Avaiga/taipy/blob/03b3ff3100361d0306ce3f77c146418fb0888c66/taipy/gui_core/_context.py#L355)
I'm sorry but there's not much documentation, If you feel like adding on that topic, you'll be more than welcome
I made a few code changes that looks like this https://gist.github.com/eleensmathew/a6801e9c97a9196a940a0cd81828416f I am not able to understand the code very well so let me know where I am going wrong @FredLL-Avaiga
does it work ? Can you provide a PR so that we can discuss on the actual code (that we're able to run and test) ? Tx
This issue has been labelled as "🥶Waiting for contributor" because it has been inactive for more than 14 days. If you would like to continue working on this issue, please add another comment or create a PR that links to this issue. If a PR has already been created which refers to this issue, then you should explicitly mention this issue in the relevant PR. Otherwise, you will be unassigned in 14 days. For more information please refer to the contributing guidelines.
This issue has been unassigned automatically because it has been marked as "🥶Waiting for contributor" for more than 14 days with no activity.
Feature Improvement
With many scenarios on a Daily frequency, the Scenario Selector will be very long and hard to navigate. A way to solve this issue would be to group the cycles by weeks, months, and years if needed.
In a nutshell, this is a way to group scenarios in the scenario selector when they are too many.
Motivation
The scenario selector becomes too large and hard to navigate with many scenarios or cycles. This feature helps end-users navigate within the list of scenarios.
Expected behavior
A new group_by property should be exposed to activate the feature. The property could accept an auto value to let Taipy decide the categories to group the scenarios. Otherwise, a list of possible groups among day, week, month, quarter, and year could be passed. Let’s imagine we have daily scenarios, and the groups provided are year, month, and week. The groups should be organized as follows:
Without Cycles, Grouped by Month (and “Year” appears as well for months to be unique)
With auto-on and multiple scenarios per day
Usage