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

Allow searching the text-index by gene name from the URL bar #4068

Merged
merged 2 commits into from Nov 29, 2023

Conversation

cmdcolin
Copy link
Collaborator

@cmdcolin cmdcolin commented Nov 21, 2023

This adds the ability to search by gene name from the &loc= in the URL bar for launching a linear genome view.

This would not yet work for synteny view because the synteny view still uses just navToLocString which assumes a locstring

Examples

## no search box popup since EDEN is a unique feature
localhost:3000/?config=test_data/volvox/config.json&loc=EDEN&assembly=volvox

## pops up a selection box since there are multiple seg08 features
localhost:3000/?config=test_data/volvox/config.json&loc=seg08&assembly=volvox

note that this may be just a larger issue of search box behavior, but I believe that it might popup if e.g. there are two gene tracks (e.g. ensembl and ncbi) with the same gene name even if they have "the same location"...it's not that bad but it may be undesirable for the URL bar to popup the selection box too much, its better to just jump right into the genome view if possible

this PR is in response to a office hours issue

xref #3149

@github-actions github-actions bot added the needs label triage Needs a label to show in changelog (breaking, enhancement, bug, documentation, or internal) label Nov 21, 2023
@cmdcolin
Copy link
Collaborator Author

one other 'behavior' that may result from this is the search index will auto-popup the track that was hit by the search index, even though it may not have been in the &tracks= list from the URL. hard to say whether that's the right behavior or not

@cmdcolin cmdcolin removed the needs label triage Needs a label to show in changelog (breaking, enhancement, bug, documentation, or internal) label Nov 21, 2023
Copy link

codecov bot commented Nov 21, 2023

Codecov Report

Attention: 10 lines in your changes are missing coverage. Please review.

Comparison is base (5f762ea) 63.19% compared to head (f4a750e) 63.20%.
Report is 2 commits behind head on main.

Files Patch % Lines
...ar-genome-view/src/LaunchLinearGenomeView/index.ts 55.55% 4 Missing ⚠️
plugins/linear-genome-view/src/searchUtils.ts 91.66% 4 Missing ⚠️
...view/src/LinearGenomeView/components/SearchBox.tsx 80.00% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4068   +/-   ##
=======================================
  Coverage   63.19%   63.20%           
=======================================
  Files        1044     1045    +1     
  Lines       30551    30578   +27     
  Branches     7289     7294    +5     
=======================================
+ Hits        19307    19326   +19     
- Misses      11073    11081    +8     
  Partials      171      171           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@github-actions github-actions bot added the needs label triage Needs a label to show in changelog (breaking, enhancement, bug, documentation, or internal) label Nov 21, 2023
@cmdcolin cmdcolin added enhancement New feature or request and removed needs label triage Needs a label to show in changelog (breaking, enhancement, bug, documentation, or internal) labels Nov 21, 2023
@cmdcolin
Copy link
Collaborator Author

I think this should be good to go. There could be e.g. options that are added perhaps to avoid popping up the multi-select (like an "I'm feeling lucky, just go to the first one" type thing) but i think this should help

@cmdcolin cmdcolin merged commit 0b51595 into main Nov 29, 2023
11 checks passed
@cmdcolin cmdcolin deleted the locstring_url branch November 29, 2023 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant