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

Add hazard type sidebar filter #20

Merged
merged 3 commits into from
Jun 16, 2024
Merged

Conversation

lydiascarf
Copy link
Collaborator

@lydiascarf lydiascarf commented Jun 15, 2024

posting this in case you want to merge it before the workshop! @matamadio

i wasn't sure i understood the motivation behind including all exposure datasets so i just wanted to explain how you could tweak this to work in a couple different ways:

  • if you want to include all exposure datasets when hazard type is selected and have the badge count of each hazard type filter option's reflect this combined number, leave it as is
  • if you want each hazard type filter option's badge count to reflect only the number of datasets with that hazard type, as opposed to that number + all of the exposure datasets, you would just need to remove ,...exposureDatasets from here and rebuild with npm run build
  • if you decide you want to exclude all the exposure datasets when hazard type is selected, just drop dataset.category.includes('Exposure') || from here and rebuild with npm run build

good luck!

@lydiascarf lydiascarf self-assigned this Jun 15, 2024
@lydiascarf lydiascarf changed the title Rdl 0.2 hazard type filter Add hazard type filter Jun 15, 2024
@lydiascarf lydiascarf changed the title Add hazard type filter Add hazard type sidebar filter Jun 15, 2024
@lydiascarf lydiascarf linked an issue Jun 15, 2024 that may be closed by this pull request
@matamadio matamadio merged commit 9752013 into rdl-0.2 Jun 16, 2024
1 check failed
@matamadio
Copy link

matamadio commented Jun 16, 2024

Picked the second option: each hazard type filter option's badge reflects only the number of datasets with that hazard type, as opposed to that number + all of the exposure datasets.
I made the specified edits and forced rebuild, but it seems the filter number still shows the sum of datasets.

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.

Update sidebar filter categories, new branch
2 participants