You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Modifications to the measurements panel display state should modify the URL state accordingly and the measurements panel should set its state on load based on the parameters provided through the URL. This functionality will make the measurements panel behave like the rest of the Auspice panels and allow us to share curated measurement panel views with collaborators and in narratives.
Specific state changes that need parameters include:
selected collection (by collection key)
grouping (e.g., "reference_strain" or "clade_reference")
display mode ("raw" or "mean")
toggle to show overall mean/std
toggle to show thresholds
filters (e.g., reference_strain=A/Stockholm/18/2011 or reference_strain=A/Stockholm/18/2011,A/Wisconsin/67/2005 or serum=TAIWAN/8/2002-MELB)
Design questions
Should measurements-specific URL parameters have a prefix like m_ to distinguish them from other panel parameters and avoid conflicts?
The text was updated successfully, but these errors were encountered:
Braindumping notes for keeping track of what happens in Redux state.
Initial load of a dataset with measurements
changePage calls chooseDisplayComponentFromURL which should return datasetLoader and dispatches action PAGE_CHANGE.
This updates the Redux state general.displayComponent, which triggers a re-render of the MainComponentSwitch.
This renders DatasetLoader the component, which dispatches loadJSONs and another PAGE_CHANGE action to switch to the Main component that displays the dataset.
loadJSONs uses the URL to determine the dataset to fetch then fetches the main dataset JSON and dispatches CLEAN_START action with the state returned from createStateFromQueryOrJSONs.
Within createStateFromQueryOrJSONs, the default measurements state is set by getDefaultMeasurementsState but no measurements controls are set. Other controls are updated with modifyStateViaURLQuery
This is where measurements URL prams should be parsed to modify the measurements state/controls !
Once the clean start action is complete, back in loadJSONs, the sidecar JSONs are fetched and loaded.
loadMeasurements is dispatched and the measurements controls are set to the initial state defined in the measurements JSON.
This is where previously set measurements state from URL params need be used for initial load of the measurements
If any URL params are invalid for the selected collection, then they need to removed.
Changing measurements options should update URL params
All measurements controls are grouped in MeasurementsOptions component, where each option change triggers a different action type:
CHANGE_MEASUREMENTS_COLLECTION
CHANGE_MEASUREMENTS_GROUP_BY
TOGGLE_MEASUREMENTS_THRESHOLD
TOGGLE_MEASUREMENTS_OVERALL_MEAN
CHANGE_MEASUREMENTS_DISPLAY
APPLY_MEASUREMENTS_FILTER
Each action type needs added to changeURLMiddleware to modify the URL params and keep the URL in sync with the measurements options.
Changing the measurements collection will be equivalent to the initial load of the dataset because it needs to check whether the current selected measurements options are valid for the new collection.
Description
Modifications to the measurements panel display state should modify the URL state accordingly and the measurements panel should set its state on load based on the parameters provided through the URL. This functionality will make the measurements panel behave like the rest of the Auspice panels and allow us to share curated measurement panel views with collaborators and in narratives.
Specific state changes that need parameters include:
reference_strain=A/Stockholm/18/2011
orreference_strain=A/Stockholm/18/2011,A/Wisconsin/67/2005
orserum=TAIWAN/8/2002-MELB
)Design questions
m_
to distinguish them from other panel parameters and avoid conflicts?The text was updated successfully, but these errors were encountered: