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

Clean up measurements Redux states/actions #1881

Merged
merged 12 commits into from
Nov 6, 2024
5 changes: 5 additions & 0 deletions src/actions/recomputeReduxState.js
Original file line number Diff line number Diff line change
Expand Up @@ -923,6 +923,11 @@ export const createStateFromQueryOrJSONs = ({
measurements.collectionToDisplay = collectionToDisplay;
controls = {...controls, ...collectionControls};
query = updatedQuery;
} else {
// Hide measurements panel if loading failed
controls.panelsToDisplay = controls.panelsToDisplay.filter((panel) => panel !== "measurements");
controls.canTogglePanelLayout = hasMultipleGridPanels(controls.panelsToDisplay);
controls.panelLayout = controls.canTogglePanelLayout ? controls.panelLayout : "full";
Comment on lines +926 to +930
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For completeness I'd also suggest removing any measurements queries. (There's no partial measurements state which is nice - it's either the loaded state or the default state.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, good catch! Will do.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added in c03d336

}

/* certain narrative slides prescribe the main panel to simply render narrative-provided markdown content */
Expand Down