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

Make it easier to go from a referenced id to the element it refers to #116

Open
maxrothman opened this issue Nov 9, 2024 · 0 comments
Open
Labels
feature request Wanted new functionality

Comments

@maxrothman
Copy link

Is your feature request related to a problem? Please describe.

When trying to understand an MEI file, I often find myself having to follow id references in attributes (e.g. @plist, @data, @startId, etc.) Currently that requires copying the id, calling up the search feature, pasting into the search box, and hitting enter. Then if I want to go back, I have to scroll around and find my place. This workflow gets the job done, but it's clunky.

Describe the solution you'd like

It would be nice to have a way to find out what element was pointed to by a URI in an attribute without breaking the flow of reading. I could imagine a few different solutions to doing this, but in general I feel like something similar to the "go to definition" feature that many IDEs provide would be a pretty good fit. Some ideas:

  • Clicking on the URI while holding a particular modifier key (like cmd/ctrl) jumps to the referred element. To get back to where you were, some kind of "go back" feature would have be added.
    • This approach is likely the easiest to implement but the UX is kind of clunky
  • cmd/ctrl clicking on the URI pops up a "sub-editor" scrolled to the referred element, similar VSCode's peek feature. A further interaction on that sub-editor (e.g. double-clicking on the line of code) closes the sub-editor and scrolls the editor to the referred element
    • This is probably the hardest to implement but has great UX
  • Hovering the mouse on a URI shows a small popup that shows the referred element plus maybe a little context around it
    • This is probably easier to implement than the sub-editor idea, but the UX suffers some because you can't scroll around and see the context that the referred element occurs in, and especially in MEI documents with a lot of similar-looking elements that context might be critical to understanding what's being pointed at

These are just a handful of approaches I came up with off the top of my head, there very well might be better ones, such as highlighting the referred element with a distinctive color or opening an editor pane scrolled to the referred element (requires #111). My goal is just to get the conversation started on this idea.

@wergo wergo added the feature request Wanted new functionality label Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Wanted new functionality
Projects
None yet
Development

No branches or pull requests

2 participants