-
Notifications
You must be signed in to change notification settings - Fork 34
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
[DRAFT]: Divided AA into drought and storm layers #1370
base: feature/add-new-AA-storm
Are you sure you want to change the base?
[DRAFT]: Divided AA into drought and storm layers #1370
Conversation
return; | ||
} | ||
|
||
// Change AA layer in url |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: Changes in this file are wip.
should rework AA layers switch in url, currently not working correctly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
switch between AA in url is now working but date query no longer appear in url after switch
@@ -51,8 +57,10 @@ const POINTER_ID = 'datePointerSelector'; | |||
const calculateStartAndEndDates = (startDate: Date, selectedTab: string) => { | |||
const year = | |||
startDate.getFullYear() - | |||
(selectedTab === 'anticipatory_action' && startDate.getMonth() < 3 ? 1 : 0); | |||
const startMonth = selectedTab === 'anticipatory_action' ? 3 : 0; // April for anticipatory_action, January otherwise | |||
(isAnticipatoryActionLayer(selectedTab) && startDate.getMonth() < 3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I believe this will only apply for the drought AA, since we don't have the same concept of "windows 1 and 2".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, i haven't yet distinguished the content (panel, timeline, etc.), that's what I'm going to do next. that's include logic for window 1 and 2 that I saw in certain parts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The component AnticipatoryActionDroughtPanel
has been cleaned
@@ -3,7 +3,7 @@ import { Provider } from 'react-redux'; | |||
import { BrowserRouter } from 'react-router-dom'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the views (District, Forecast, Hometable, Timeline...) will be different for AA storm so they should probably live under AA Drought? What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we can move it later, I just want to be careful when copying components like this not to carry over extra complexity and avoidable dependence
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, I have not yet touched on the distinction between the view elements specific to each AA. Also i wanted to test if everything was loaded correctly when i switch AA.
I'm going to see what can be put in common for the two AA types, perhaps extracting common parts.
But I understand that the current view elements are specific to AA drought and must be separated from AA storm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have moved the AA drought specific components to AADroughtPanel folder
Build succeeded and deployed at https://prism-1370.surge.sh |
…m:WFP-VAM/prism-app into feat/handle-multiple-AA-layers-and-panels
e3e89d9
to
26dc723
Compare
Description
How to test the feature:
Checklist - did you ...
Test your changes with
REACT_APP_COUNTRY=rbd yarn start
REACT_APP_COUNTRY=cambodia yarn start
REACT_APP_COUNTRY=mozambique yarn start
Screenshot/video of feature: