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

Improve filter value selection #343

Merged
merged 15 commits into from
Feb 16, 2022
Merged

Improve filter value selection #343

merged 15 commits into from
Feb 16, 2022

Conversation

ptbrowne
Copy link
Collaborator

@ptbrowne ptbrowne commented Feb 11, 2022

Previously when changing a filter in a cascading facets. we would take the first value of each dimension value that was present and this could lead to dead-end, and was slow since each filter could be changed after the filter just before it has been changed. Now the approach is different: when a filter is changed/moved, we try to find an observation with the filter, and if we do not find an observation, we relax the filters 1 by 1 starting from the bottom until we have an observations. This ensures that data is shown after filter have been loaded, and it also tries to keep as much as possible what the user has chosen (= change the bottomost filters first).

fix #327
fix #328

@ptbrowne ptbrowne temporarily deployed to visualize-ad-filter-cho-rflbiv February 11, 2022 15:36 Inactive
@ptbrowne ptbrowne temporarily deployed to visualize-ad-filter-cho-rflbiv February 11, 2022 15:43 Inactive
@ptbrowne ptbrowne temporarily deployed to visualize-ad-filter-cho-rflbiv February 11, 2022 15:57 Inactive
Copy link
Collaborator

@bprusinowski bprusinowski left a comment

Choose a reason for hiding this comment

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

LGTM, had some minor comments 👍

app/configurator/components/chart-configurator.tsx Outdated Show resolved Hide resolved
app/graphql/query-hooks.ts Outdated Show resolved Hide resolved
app/rdf/queries.ts Outdated Show resolved Hide resolved
app/rdf/query-dimension-values.ts Outdated Show resolved Hide resolved
app/rdf/query-dimension-values.ts Show resolved Hide resolved
app/rdf/query-dimension-values.ts Outdated Show resolved Hide resolved
@ptbrowne ptbrowne temporarily deployed to visualize-ad-filter-cho-rflbiv February 14, 2022 16:45 Inactive
@ptbrowne ptbrowne temporarily deployed to visualize-ad-filter-cho-rflbiv February 15, 2022 11:44 Inactive
@ptbrowne ptbrowne temporarily deployed to visualize-ad-filter-cho-rflbiv February 15, 2022 11:48 Inactive
@ptbrowne ptbrowne merged commit 749ed1e into main Feb 16, 2022
@ptbrowne ptbrowne deleted the filter-choice branch February 16, 2022 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cascading Filter does not work with "Swiss PRTR (Test03)" Wrong initial filter selection
2 participants