Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AA: Cleanup LeftPanel loading mechanisms #1393

Open
ericboucher opened this issue Dec 13, 2024 · 5 comments
Open

AA: Cleanup LeftPanel loading mechanisms #1393

ericboucher opened this issue Dec 13, 2024 · 5 comments
Assignees
Labels
enhancement New feature or request triage to be triaged for next action

Comments

@ericboucher
Copy link
Collaborator

ericboucher commented Dec 13, 2024

Cleanup MapView/LeftPanel/index.tsx

Let's cleanup the AA logic and move it inside its respective components for clarity

@ericboucher ericboucher added enhancement New feature or request triage to be triaged for next action labels Dec 13, 2024
@ericboucher ericboucher mentioned this issue Dec 13, 2024
5 tasks
@ericboucher
Copy link
Collaborator Author

I started the branch https://github.com/WFP-VAM/prism-app/tree/aa-layer-load-cleanup to show what I have in mind (not working atm)

@Doniaab
Copy link
Collaborator

Doniaab commented Dec 13, 2024

Nice, i see that you extract the AALogic from leftPanel to a specific hook !

in the meantime i saw that some dates logic specific to drought are still in MapView/DateSelector and utils/layer-utils. I was trying to include AA storm to see if it fix the behavior.
Now it put the right date when i switch AA tab to storm but with this alert :

"No data was found for layer "Anticipatory Action Storm" on 2024-12-31. The closest date 2024-12-13 has been loaded instead.
"

@ericboucher
Copy link
Collaborator Author

ericboucher commented Dec 13, 2024

Did you find where the 2024-12-31. is coming from? I'm suspecting it could be coming from AA Drought.
So probably cleaning up the states between AA Drought and AA Storm would help. Maybe something to do with the getDefaultDate or something like that?

@Doniaab
Copy link
Collaborator

Doniaab commented Dec 13, 2024

Seems to be from a call of useDefaultDate ( not the one in the panel ). I think it's because of the dispatch(updateDateRange({ startDate: undefined }));, it apply a default date at some point

@Doniaab
Copy link
Collaborator

Doniaab commented Dec 13, 2024

i created this branch: https://github.com/WFP-VAM/prism-app/tree/aa-layer-load-suggestion.
switch between AA and load from url/refresh seems to be fixed. But we cant switch to another layer type yet and we have to make working the use of AA hook in drought panel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request triage to be triaged for next action
Projects
None yet
Development

No branches or pull requests

3 participants