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

Xstate fixes #63

Merged
merged 15 commits into from
Nov 28, 2024
Merged

Xstate fixes #63

merged 15 commits into from
Nov 28, 2024

Conversation

spaceo
Copy link
Contributor

@spaceo spaceo commented Nov 28, 2024

Link to issue

https://reload.atlassian.net/browse/DDFBRA-130

Description

This PR adresses the behaviour that changed after the transition to use Xstate in searching/filtering.
Things being handled:

  • The skeleton screen on load more
  • The behaviour around deleting last character in the search field (which was actually working as intended, but I agree in an oddly manner 😆 )
  • The weird issue about FBI sending one kind of facet names from service and expecting another as input (lix -> lixRange)
  • Changing the way filters where toggled and detected as being active (that was not handled after the inital xstate introduction)
  • Allowing the end user to type and filter while requests are ongoing

@ThomasGross ThomasGross self-requested a review November 28, 2024 08:24
This makes sure that we can use the fully advantage of the query client
cache.
We do not need the implemented behaviour. Eg.: We should not search when
search string is deleted.
Since the refactoring of the search state handling to Xstate these
functions are no more needed
For some reason they are diffrent. Eg. lix => lixRange
Lix -> lixRange is the main problem.
This PR fixes the problem by translating the filter right after the
facets have been fecthed. The translated facet name lives through the
rest of the life cycle and is being sent to the next requests.
By adding the events in the state tree under the "filteringAndSearching"
state.
Since the filters are handled in the state machine
Copy link
Contributor

@ThomasGross ThomasGross left a comment

Choose a reason for hiding this comment

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

Looks good 🥳

Copy link
Contributor

Choose a reason for hiding this comment

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

Very nice with some test on the facets!

@spaceo spaceo merged commit eb2cf25 into main Nov 28, 2024
9 checks passed
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.

3 participants