auspice icon indicating copy to clipboard operation
auspice copied to clipboard

[tree] button to go back to previous zoom

Open jameshadfield opened this issue 3 years ago • 3 comments

The ability to return to the previous zoom level is useful when exploring trees in detail, especially when combined with the magnifying glass (which zooms out).

A hover info box has been added to convey the functionality of this icon.

The implementation involving multiple trees is conceptually more complicated, as I don't want us to return to the previous zoom state in each tree. (This is similar to the magnifiying glass icon, which zooms out in both trees.) The best solution is probably tree-specific UI. For now, this functionality is only surfaced if we are viewing a single tree.

jameshadfield avatar Sep 21 '21 04:09 jameshadfield

Hmm... very interesting idea. However, I have to admit, I'd prefer it if the browser back button could just be a general purpose UI to go back to previous visualization state (whether it's tree zoom or tree layout or whatever). Although, given that tree zoom is not usually encoded in URL, I see how this is difficult.

I do think that the previous idea of tagging branches in a dataset specific fashion (https://github.com/nextstrain/auspice/issues/1036) could interact well here. However, in the interim I'd support this small "go back" icon.

Also, the hover tooltip is really helpful. It would be nice if this existed for the other top-right panel buttons.

trvrb avatar Sep 21 '21 18:09 trvrb

This is really cool! Love it.

One thing I'm not sure about: should zoom out via lens count as a step that is reversed by the back button? Since it's easy to undo zoom out by just clicking into the branch and it feels that zooming out goes in the same direction as the back button I'd potentially prefer go back to the state where I was before I clicked into a specific branch. Does that make sense? It's a small detail, not very important but maybe others have the same thought.

Also: since it's sometimes quite hard to find the right branch to click into, would it make sense to add a forward button that goes back in to where we started off before clicking the back button? Again, less important than back button but maybe something to think about.

corneliusroemer avatar Sep 21 '21 19:09 corneliusroemer

Any progress here @jameshadfield? Would be cool to have in production :)

corneliusroemer avatar Oct 19 '21 20:10 corneliusroemer