ebi-gene-expression-group / atlas-components

Front end components of Expression Atlas and Single Cell Expression Atlas
3 stars 3 forks source link

New faceted search results component #132

Closed ke4 closed 8 months ago

ke4 commented 1 year ago

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:

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:

lingyun1010 commented 10 months ago

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

ke4 commented 9 months ago

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.