8000 [LANDGRIF-1257]: fixes async state in analysis filters by agnlez · Pull Request #902 · Vizzuality/landgriffon · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[LANDGRIF-1257]: fixes async state in analysis filters #902

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

Merged
merged 5 commits into from
Mar 7, 2023

Conversation

agnlez
Copy link
Member
@agnlez agnlez commented Mar 1, 2023

General description

https://vizzuality.atlassian.net/browse/LANDGRIF-1257

image

  • This PR fixes an async issue with the internal state of the MoreFilters component and the redux state. Previously, removing a filter from the sentence (above the table) would not update the MoreFilters popover correctly, turning into a mismatch between both states.
  • Location Types selector, in analysis, is now filled with options coming from /sourcing-locations/location-types along with scenario params if needed. Also, now other parameters, like suppliers, origins, and materials, affect to the returning location types available (this was a requirement). If a previous selected option is not available in the new list of options, it would be removed from the selection, and keep only the ones available in the new options set.
  • Location types, in analysis, are listed now via /sourcing-locations/location-types?supported=true
  • Added some space between different options in the sentence.
    image
  • Updated size of the arrow (and spacing) of the select to match with the tree-select
    image

TODO:

  • test: ensure the applied filters are reflected in the phrase and vice versa.
  • test: ensure when a filter is removed from the phrase, the popover is also updated to reflect the new selection.
  • test: ensure we are getting location types from /sourcing-locations/location-types endpoint and passing the needed query params according to user selection.
  • test: ensure, when a new list of location types is fetched, previous locations selected available in the new list are there and the ones that aren't are removed so we don't have impossible combinations of filters.

Testing instructions

Test analysis filters behaviour and the metadata sentence

Checklist before merging

  • Branch name / PR includes the related Jira ticket Id.
  • Tests to check core implementation / bug fix added.
  • All checks in Continuous Integration workflow pass.
  • Feature functionally tested by reviewer(s).
  • Code reviewed by reviewer(s).
  • Documentation updated (README, CHANGELOG...) (if required)

@vercel
Copy link
vercel bot commented Mar 1, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
landgriffon-client ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Mar 6, 2023 at 7:54PM (UTC)
1 Ignored Deployment
Name Status Preview Comments Updated
landgriffon-cookie-traceability ⬜️ Ignored (Inspect) Mar 6, 2023 at 7:54PM (UTC)

@agnlez agnlez marked this pull request as draft March 1, 2023 10:43
@barbara-chaves barbara-chaves force-pushed the fix/client/more-filters-location branch from a92cb34 to 2fe0cb6 Compare March 2, 2023 19:06
@barbara-chaves barbara-chaves marked this pull request as ready for review March 3, 2023 08:48
@barbara-chaves barbara-chaves marked this pull request as draft March 3, 2023 09:14
@agnlez agnlez changed the title fixes async state in analysis filters [LANDGRIF-1257]: fixes async state in analysis filters Mar 3, 2023
@davidsingal davidsingal assigned agnlez and unassigned barbara-chaves Mar 6, 2023
@davidsingal davidsingal merged commit 28b62ce into dev Mar 7, 2023
@davidsingal davidsingal deleted the fix/client/more-filters-location branch March 7, 2023 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
4700
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0