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

filter label is applied twice #3676

Open
chinook25 opened this issue Apr 29, 2024 · 4 comments
Open

filter label is applied twice #3676

chinook25 opened this issue Apr 29, 2024 · 4 comments
Labels
bug Something isn't working directory
Milestone

Comments

@chinook25
Copy link
Contributor

What version of EMX2 are you using (see footer)
v10.61.x

Describe the bug
"Because you searched for" label is applied twice. First before and again after loading the filtered data.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'https://emx2.test.molgenis.org'
  2. Go to a directory demo
  3. select a filter
  4. see the label begin applied
  5. loading spinner appears
  6. filtered data appears with the labels

Expected behavior
Labels are not applied before the data is filtered.

Additional context
Suggest to fix this after changing the filter store to apply filter locally.
This issue is caused by the fact that the directory app uses a lot of watches and computeds to tracks changes in the data. It would be nice to just addorn this info onto the biobanks/collections when filtering or if the filterstore is unchanged make it part of the retrieval functions.

@chinook25 chinook25 added bug Something isn't working directory labels Apr 29, 2024
@chinook25 chinook25 added this to the Directory Sprint 221 milestone Apr 29, 2024
@konstantina-gkp
Copy link
Contributor

I cannot reproduce this issue. The "Because you searched for: " label is visible only in the biobank cards, after the data has been filtered. Can someone else check whether this issue still persists?

@chinook25
Copy link
Contributor Author

Can still see it if you select Material type -> Buffy Coat.
Also notice the Collections available changing into Collections found before the reload.

@dtroelofsprins
Copy link
Contributor

I can also reproduce, but it seems indeed only the Material Types filter.

@chinook25
Copy link
Contributor Author

I can also reproduce, but it seems indeed only the Material Types filter.

It does happen with all of them though, but it just happens very fast, so it's hard to tell :)
The issue here is that Vue uses watchers on the relevant data here, which triggers too often. Fixing this would require us to rethink which data is watched or consider removing the watches in favour of triggering the code of the watcher manually (which would be my preverence).
I do think this issue is not a huge priority though. It doesn't break anything, it's just ugly and more complex than it should be.

@EleanorHyde-UMCG EleanorHyde-UMCG modified the milestones: Sprint 221, Backlog May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working directory
Projects
None yet
Development

No branches or pull requests

4 participants