Skip to content
This repository has been archived by the owner on May 11, 2022. It is now read-only.

Maintain a "history" of Didact tutorials opened so can go "back" #102

Closed
bfitzpat opened this issue Apr 22, 2020 · 7 comments
Closed

Maintain a "history" of Didact tutorials opened so can go "back" #102

bfitzpat opened this issue Apr 22, 2020 · 7 comments
Labels
done Task completed

Comments

@bfitzpat
Copy link
Collaborator

Much like a web browser, we should implement some sort of history that the user can navigate forward and back through. If you open a didact tutorial, which opens a second tutorial, you should have a way "back" to the original tutorial.

This also implies that we keep track of a cache of these different files so we remember their state better. Right now we only cache the last one.

@bfitzpat
Copy link
Collaborator Author

Wondering if having a command that provides a list of the last X didact files visited would be enough. Hit a command, select from the list, and go...

@bfitzpat
Copy link
Collaborator Author

Looks like "history" in a particular editor is tied to Alt+UpArrow and Alt+DownArrow - so maybe that's easier from inside the Didact window itself.

@bfitzpat
Copy link
Collaborator Author

bfitzpat commented Aug 18, 2020

Here's some really early work in progress...

  • simple history tracks didact URIs opened
  • can step forward and back through the history using commands in the palette
  • reloads the uri each time, so state is not persisted behind the scenes
  • keyboard bindings aren't working currently
  • there are issues if you go too far forward or too far back
  • it doesn't persist more than the session

history-demo-18-AUG

@apupier
Copy link
Member

apupier commented Aug 19, 2020

I think we need to tie to the default history navigation of VS Code to avoid implementing our own history cache.

simple history tracks didact URIs opened
keyboard bindings aren't working currently
Looks like "history" in a particular editor is tied to Alt+UpArrow and Alt+DownArrow

I think that the normal keybinding should be used and working. it will allow to have it working by default as expected by VS Code users .

reloads the uri each time, so state is not persisted behind the scenes

this one sounds tricky. I think that implementing it in a second iteration would be fine.

there are issues if you go too far forward or too far back

Which issues? How does it compare to default history navigation behavior?

it doesn't persist more than the session

this sounds a perfectly fine limitation. Relying on default VS Code history might bring the feature for free.

@bfitzpat
Copy link
Collaborator Author

This is VERY early work, so there's still lots of issues. Just trying to get a handle on things.

I think we need to tie to the default history navigation of VS Code to avoid implementing our own history cache.

Yes, probably a good idea. And I would love to, but I was unable to find a good example of exactly how to implement that :)

I think that the normal keybinding should be used and working. it will allow to have it working by default as expected by VS Code users

Yes, I agree - but key binding and the "when" condition at this point are not working for me. Will keep working.

How does it compare to default history navigation behavior?

No clue. I've never used the default history navigation feature. :)

@bfitzpat
Copy link
Collaborator Author

Created PR - #166

image

@bfitzpat
Copy link
Collaborator Author

bfitzpat commented Sep 9, 2020

Initial implementation has been merged - will continue to improve (see #184)

@bfitzpat bfitzpat added the done Task completed label Sep 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
done Task completed
Projects
None yet
Development

No branches or pull requests

2 participants