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 buttons for zooming and panning #1030

Open
thomcsmits opened this issue Jan 10, 2024 · 3 comments
Open

Add buttons for zooming and panning #1030

thomcsmits opened this issue Jan 10, 2024 · 3 comments
Labels
accessibility Accessibility (a11y) related issue enhancement New feature or request

Comments

@thomcsmits
Copy link
Collaborator

(This issue is a small piece in the roadmap to keyboard accessibility)

Implement the ability to navigate in a single track with buttons. E.g., clicking 'move left' will move the view left by a default [x] basepairs, and zoom in will move zoom in a default amount.

image
@thomcsmits thomcsmits added enhancement New feature or request accessibility Accessibility (a11y) related issue labels Jan 10, 2024
@etowahadams
Copy link
Contributor

This looks like it would be useful! Here's a few questions I have that we can address here or when we meet:

  • Do we envision a new option passed into GoslingComponent which will show the buttons?
  • Where should the buttons go? In some central location vs localized to the view they correspond to, etc.
  • Would should the behavior be for a multi-view visualization? You could have multiple sets of buttons or a way to select the view you want the buttons to be responsive to.
  • Should we extend this type of button functionality to brushes as well?

@thomcsmits
Copy link
Collaborator Author

What I am thinking is to link these buttons to an individual track, and eventually, have other buttons to navigate between tracks. We would have to track the level of current focus to be able to navigate between different views and switch to individual tracks within a view.

For a view like such:
image

We would initially select the whole gosling component
image

Where we would have some navigation between the different views including the header
image

And for example this first view
image

Then we can select the first view and go one level deeper
image

Where we can then select the individual tracks
image

And move to the next track
image

So what I think is that this will then also have buttons for

  • left right for components on the same level
  • up down for levels

Brushes only get relevant when we get to this multi-view visualization, and yes, I think then we should also have a button to go to the brush and then both the navigation and zoom buttons for the brush only.

Somehow access this in the same level as the individual tracks
image

Then for the zoom and pan functionality, we would just show the zoom/pan button for the currently selected track.

Initially I was thinking that we would eventually just map these to keyboard combinations and not need the buttons (just for the dev purposes). But it might actually be nice to have this functionality anyway. I think for that it might be nice to have an optional parameter for the GoslingComponent like showButton?: true

@sehilyi
Copy link
Member

sehilyi commented Jan 16, 2024

It looks like this largely overlaps with what I have in mind with #911. I am going to implement an initial implementation and open a PR so that we can discuss using the working demo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility Accessibility (a11y) related issue enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants