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

Add ability to highlight regions with click and drag rubberband #3648

Closed
wants to merge 2 commits into from

Conversation

cmdcolin
Copy link
Collaborator

This let's a user click and drag using the rubberband bar a region to highlight one or more regions (by either "Set only this highlight" and "Add to existing highlights")

image

@github-actions github-actions bot added the needs label triage Needs a label to show in changelog (breaking, enhancement, bug, documentation, or internal) label Apr 17, 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 Apr 17, 2023
@codecov
Copy link

codecov bot commented Apr 17, 2023

Codecov Report

Merging #3648 (ca35e78) into main (f318dab) will decrease coverage by 0.04%.
The diff coverage is 16.00%.

@@            Coverage Diff             @@
##             main    #3648      +/-   ##
==========================================
- Coverage   63.07%   63.03%   -0.04%     
==========================================
  Files         877      878       +1     
  Lines       30168    30193      +25     
  Branches     7276     7279       +3     
==========================================
+ Hits        19027    19031       +4     
- Misses      10956    10977      +21     
  Partials      185      185              
Impacted Files Coverage Δ
...rc/LinearGenomeView/components/TracksContainer.tsx 72.00% <ø> (ø)
...s/linear-genome-view/src/LinearGenomeView/model.ts 82.65% <0.00%> (-2.04%) ⬇️
...view/src/LinearGenomeView/components/Highlight.tsx 33.33% <33.33%> (ø)

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@carolinebridge
Copy link
Contributor

Might be cool to add the ability to highlight your bookmarks in different colours / bulk highlight your bookmarks.

I uncovered a little bit of a bug I can recreate with some trial and error (though it did happen the first time I was messing around with this functionality):

  1. Highlight an area at a lower zoom level, and then a second highlight close by
  2. Zoom out so the two highlights are overlapping
  3. Zoom in, and a highlight bar that is permanent and follows you around will now be on the screen

It's pretty minor, refreshing removes it, so might not be a super big concern. Here's a mov of what it looks like:

highlight_bug.mov

@carolinebridge
Copy link
Contributor

Could also consider changing the order of the options around; for some reason I keep clearing all (impulse clicking the first option) when I mean to add to my existing highlights...something like:

  • Add to existing highlights
  • Set as only highlight
  • Clear all highlights

@cmdcolin
Copy link
Collaborator Author

the highlight getting stuck was fixed in ca35e78 (needed to use array index to fully deduplicate the highlight keys)

@cmdcolin
Copy link
Collaborator Author

as long as we are talking about all the ways to get highlights, as there are many...getting highlights from e.g. an adapter like a bed could be useful...was done in jbrowse 1 with the concept of 'bookmarks' which were similar to highlights https://jbrowse.org/docs/url_strings.html#addbookmarks

@cmdcolin
Copy link
Collaborator Author

may try to deliver this type of highlight system as a 'plugin' that incorporates extension points to e.g. extend the lgv model and use #3663

@cmdcolin
Copy link
Collaborator Author

from discussion at weekly ^^

@cmdcolin cmdcolin marked this pull request as draft May 1, 2023 18:15
@cmdcolin
Copy link
Collaborator Author

probably will close for now, will not be merging as is

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.

2 participants