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 an option to the tutorial editors to keep history in the browser. #926

Merged
merged 2 commits into from
Sep 11, 2018

Conversation

manthey
Copy link
Contributor

@manthey manthey commented Sep 10, 2018

If keep=history is in the tutorial's url, in addition to add the source code to the window's location, the back button will return to the previously source code of the tutorial.

I'm finding this is handy when using the editor to try out experimental code, as those experiments are in the browser's history. However, this has been left as an option that has to be explicitly enabled, as if you make many small edits, the history is very long and tedious without a good indicator of when something significant or interesting occurred.

@manthey
Copy link
Contributor Author

manthey commented Sep 10, 2018

@aashish24, @johnkit, @matthewma7 Request for comments: should this be the default behavior of the editor tutorials? Or is it too specialized and shouldn't be merged? Opinions desired.

If `keep=history` is in the tutorial's url, in addition to add the
source code to the window's location, the back button will return to the
previously source code of the tutorial.

I'm finding this is handy when using the editor to try out experimental
code, as those experiments are in the browser's history.  However, this
has been left as an option that has to be explicitly enabled, as if you
make many small edits, the history is very long and tedious without a
good indicator of when something significant or interesting occurred.
@matthewma7
Copy link

This is a feature that I could use myself.
I personally think there are more benifit than drawbacks. and maybe when we think there are too many unimportant small changes being pushed to history, we could a setTimeout.

@manthey
Copy link
Contributor Author

manthey commented Sep 10, 2018

We already debounce updates to an extent to prevent rerunning the tutorials as you are typing, so it probably is fine. If no one else chimes in, I'll make it always push to history.

@manthey manthey requested a review from matthewma7 September 11, 2018 12:08
Copy link

@matthewma7 matthewma7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏

@manthey manthey merged commit 2346bb5 into master Sep 11, 2018
@manthey manthey deleted the tutorial-history branch September 11, 2018 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants