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 command to freeze navigation map #308

Open
15 tasks
pokey opened this issue Nov 3, 2021 · 0 comments
Open
15 tasks

Add command to freeze navigation map #308

pokey opened this issue Nov 3, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@pokey
Copy link
Member

pokey commented Nov 3, 2021

  • Takes a target, indicating what section of the document to freeze, so can say eg "freeze funk air"
  • Any hats within that region will stay the same until unfrozen / refreshed
  • If new text is added within that region, it will be frozen once its hat is allocated
  • How to handle undo / redo?
  • How to handle deletion? Do we just remove tokens that become empty? (that's what happens to deleted tokens; they become an empty range)
  • When adding decorations, hatTokenMap will pass in a list of frozen tokens
  • addDecorations will use those tokens as start of new hat token map
  • addDecorations will not decorate tokens that are contained within an existing token range. For tokens that partially intersect an existing token, I guess it will decorate the part that is not intersecting the existing token range
  • addDecorations will not use any decorations that are already taken by a frozen token
  • Add command to "refresh" a target area. That will refresh any frozen section containing that target with new hats, but leave the area frozen
  • Add command to "unfreeze" target. That will unfreeze any frozen section containing that target
  • Add command to unfreeze all
  • Add indicator in status bar that there are frozen tokens
  • Decorate the frozen section with subtle blue transparent background color
  • Preserve frozen tokens even when editor goes out of view, so that can be used as basic version of bookmarks

The advantage of this approach over #432 is that it gives something akin to a lightweight bookmark / stable snippet

@pokey pokey added the enhancement New feature or request label Nov 3, 2021
@pokey pokey added this to To do in New modes of interaction via automation Jan 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

1 participant