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

Search button not working after an initial metadata search #431

Closed
ke4 opened this issue Jul 5, 2024 · 3 comments · Fixed by #446
Closed

Search button not working after an initial metadata search #431

ke4 opened this issue Jul 5, 2024 · 3 comments · Fixed by #446
Assignees
Labels
bug Something isn't working

Comments

@ke4
Copy link
Contributor

ke4 commented Jul 5, 2024

Steps to reproduce:

  1. Go to metadata search and search for 'liver`
  2. Select species: Callithrix jacchus and search term: LIAS (from Symbol list)
  3. Click on the Search button
  4. Select species: Homo sapiens and search term: liver (from Metadata list)
  5. Click on the Search button

Expected behaviour:
You get a result for the selected search term filtered by the selected species.

Actual behaviour:
Search is not triggered.

@lingyun1010
Copy link
Contributor

A more general way to generate the bug, is when we switch from gene search to metadata search, the search button is not working.

@lingyun1010
Copy link
Contributor

lingyun1010 commented Jul 30, 2024

I did a deeper research and some hand-on tests, and found out that, in single-cell, we have gene search result page and cell type wheel result page, where both have gene-search-form component respectively.

However, the metadata search GetMapping controller is directed by search/metadata/liver for example, wheras, gene search GetMapping controller is directed by search?q=liver.

  • The error is generated in this way:
  1. Once we click the metadata search example from the homepage or search a metadata value from the homepage search box, it will direct us to the cell-type-wheel-heatmap result page.
  2. If we search a non-metadata from the cell-type-wheel-heatmap result page, it will direct us to search?, .i.e gene search result page, another component.
  3. However, in gene search result page, the gene search form didn't deal with the metadata search properly, if you make a metadata search, it will direct us, i.e. the URL is search?metadata=liver rather than search/metadata/liver. Therefore, we can't get any cell-type-wheel data from a gene search result page search form.
  • There are two solutions I proposed like below:
  1. Component-level solution:
  • Combine the gene search result page and cell type wheel page into one component, which sharing a single use of gene-search-form component.
  • Unify the controller format for metadata and gene search, either take the term as a PathVariable or RequestParam
  1. Router-level solution:
  • In gene search result page component, add a router for metadata search, redirect to search/metadata/[term]

Due to some historical reasons, we used a different controller mapper for metadata search. Basically, we did not have gene search from in gene search result page or metadata result page before, insteadly, we had two seperate tabs/pages and gene search form only reachable in the homepage. To differenciate two pages on router, we need a new URL format for metadata search result from the gene search result. However, since this is not the case anymore, we don't have to keep two different format anymore. However, if we choose Solution 1 i.e.combine two components together, the fix gonna take a bit longer time and we also need to change the endpoint related codes, for example, search examples and fetch endpoints.

@ke4
Copy link
Contributor Author

ke4 commented Aug 5, 2024

@lingyun1010 I discussed this with Silvie and she agreed that for this release the quicker solution (2nd) would be preferred and we should create a ticket for the 1st solution and add it to our backlog for technical dept.
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants