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

New faceted search results component #132

Merged
merged 62 commits into from
Oct 13, 2023
Merged

Conversation

ke4
Copy link
Contributor

@ke4 ke4 commented Nov 30, 2022

This new component is going to replace the current scxa-faceted-search-result atlas component.
The current search component loaded all the results into memory and did the search result modification on that sometimes huge data structure. That was not ideal and sometimes we even got a timeout error when the time to return the response was longer than the allowed timeout value of our firewall.

In this change we are using separate endpoints for each of the filter components that was created in our backend previously:

  • marker genes (show only marker genes) - checkbox (group)
  • species (checkbox group)
  • inferred cell type (drop down with multi selection)
  • organism part (drop down with multi selection)

Any changes in the filters triggers to reload/repopulate the values of the other filters and the search result.
I also did a smaller optimisation for limiting the number of REST calls: the currently modified filter component is not going to call its endpoint to reload its value as it is not necessary, because we have them already.

On the backend we are about to start a ticket to make the search result paginated. When that is ready we should make sure that this frontend component could perfectly can communicate with that modified endpoint and can handle the search result, too.

Suggestion for improvement in following the PRs:

@ke4 ke4 added the gene search Gene search related tasks label Nov 30, 2022
@ke4 ke4 self-assigned this Dec 5, 2022
ke4 added 27 commits March 9, 2023 14:24
as the upgraded version (1.3.0) was erred with webpack loader error
TODO: fix this later
Randomise species, cell types and organism parts
TODO: improve the test, clean the code
WIP for the other groups
@ke4 ke4 requested a review from alfonsomunozpomer July 24, 2023 10:49
Copy link
Member

@alfonsomunozpomer alfonsomunozpomer left a comment

Choose a reason for hiding this comment

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

Some style issues and a few opportunities to dry out code. Almost there!

@ke4 ke4 requested a review from alfonsomunozpomer August 10, 2023 10:51
@lingyun1010
Copy link
Contributor

Dropdown menus populate properly but I notice a few points to fix or to improve. Please take a look below.

  • Do we need to udpate loading for marker gene and species everytime we select Inferred cell type - ontology labels or organism part. If those options do not change marker gene and species options, I suggest to keep the state rather than fetch
  • Tooltip is not showing anything
  • Gene searc result table header is not sorting properly, it generate errors like this.props.onClick is not a function
  • There is an option null in Inferred cell type - ontology labels dropdown menu, please discuss with bioinformatics if we need to filter it out, either from front-end or back-end.

@ke4
Copy link
Contributor Author

ke4 commented Sep 14, 2023

Replying to @lingyun1010 's latest comment on this PR:

Dropdown menus populate properly but I notice a few points to fix or to improve. Please take a look below.

  • Do we need to udpate loading for marker gene and species everytime we select Inferred cell type - ontology labels or organism part. If those options do not change marker gene and species options, I suggest to keep the state rather than fetch

We earlier discussed how to refresh each filers in the filter side bar with Nancy and I implemented that way.
Also: If you select a cell type or organism part that belongs only to 1 species then we have to update the species list, the same stands for marker gene. So, not refreshing is not an option AFAIK.

  • Tooltip is not showing anything

Thanks for spotting this. I fixed it. I did it differently than in the original implementation to self contain the tooltip component. It looks cleaner.

  • Gene searc result table header is not sorting properly, it generate errors like this.props.onClick is not a function

Thanks for spotting this. I removed all the sorting related code from the demo page as we decided not to have sorting at all in the new version. We are going to add it if the users require it for some reason.

  • There is an option null in Inferred cell type - ontology labels dropdown menu, please discuss with bioinformatics if we need to filter it out, either from front-end or back-end.

This is not a bug in the UI. The UI only shows the values that it gets from the backend. It is the backend's responsibility to filter out any invalid value if it needs to be. I am going to discuss it with the data prod team.

Copy link
Member

@alfonsomunozpomer alfonsomunozpomer left a comment

Choose a reason for hiding this comment

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

Good stuff! Two minor corrections and all good.

ke4 and others added 2 commits October 12, 2023 15:16
Co-authored-by: Alfonso Muñoz-Pomer Fuentes <[email protected]>
Co-authored-by: Alfonso Muñoz-Pomer Fuentes <[email protected]>
@ke4 ke4 requested a review from alfonsomunozpomer October 13, 2023 10:00
@ke4 ke4 merged commit 0b98a0f into master Oct 13, 2023
@ke4 ke4 deleted the feature/new_faceted_search_component branch October 13, 2023 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gene search Gene search related tasks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants