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

Narrative: No filter options in "Explore the data" #1492

Closed
joverlee521 opened this issue Mar 22, 2022 · 0 comments · Fixed by #1493
Closed

Narrative: No filter options in "Explore the data" #1492

joverlee521 opened this issue Mar 22, 2022 · 0 comments · Fixed by #1493
Labels
bug Something isn't working narratives issues / PRs relating to narrative functionality

Comments

@joverlee521
Copy link
Contributor

Navigate to a slide within a narrative, click on "Explore the Data Yourself" and the filter dropdown displays "No Options". If filters are defined in the dataset URL, then only the selected filters are available in the dropdown. The filter options in the footer are also missing, indicating this bug is most likely an issue stemming from the redux store and not the filter dropdown itself.

First noticed the bug in @huddlej 's community narrative for the flu meeting, but I can reproduce the bug in other narratives (e.g. intro to narratives).

@joverlee521 joverlee521 added bug Something isn't working narratives issues / PRs relating to narrative functionality labels Mar 22, 2022
joverlee521 added a commit that referenced this issue Mar 22, 2022
When users change the slide in a narrative, the controls state gets
reset to its default state which updates the filters state to an empty
object. This leads to the bug described in #1492.

This commit extracts the filters creation from `modifyStateViaMetadata`
into its own function so that it can be reused to recreate the filters
when users change the slide within a narrative.

Resolves #1492.
joverlee521 added a commit that referenced this issue Mar 23, 2022
When users change to a slide in a narrative that has the same dataset as
the previous slide, `restoreQueryableStateToDefaults` resets controls
to the _app_ default state which updates the filters state to an empty
object. This leads to the bug described in #1492.

Calling `modifyStateViaMetadata` after `restoreQueryableStateToDefaults`
ensures that all _dataset_ default controls are restored as well.

Resolves #1492.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working narratives issues / PRs relating to narrative functionality
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

1 participant