-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New sandcastle title and dirty state tracking #12794
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
Conversation
Thank you for the pull request, @jjspace! ✅ We can confirm we have a CLA on file for you. |
c0ea093
to
6341032
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @jjspace! A few questions and branding-related comments.
return window.confirm( | ||
"You have unsaved changes. Are you sure you want to navigate away from this demo?", | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is totally up-to-par with what we had before, but what do you think of propagating the current sandcastle to local storage or similar?
The goal would to be to persist state, like what happens when you reload a GitHub tab with an in-progress comment. Or maybe a slightly different workflow, like what happens if you leave and come back to https://geojson.io/.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what do you think of propagating the current sandcastle to local storage or similar?
This (or similar) has been requested often and I do really want to find some solution to try and prevent lost work. However I think it should be a separate effort, this PR just tries to match the functionality of the existing sandcastle. This is already on the running task list but further down for lower priority.happy to re-evaluate if you think it's a "must have" before release.
My current thought is not to make it truly persist every page load but offer a "saved state" that we can suggest the user reload like jsfiddle does

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No problem with adjusting this as a subsequent PR.
We should probably link or move this conversation to the issue, which I'll let you organize as you see fit.
But for the sake of keeping it going:
My current thought is not to make it truly persist every page load but offer a "saved state" that we can suggest the user reload like jsfiddle does
Cool, that sounds appropriate to me. That seems very similar to what https://geojson.io/ does, as I linked above and shown below. But let me know if I misunderstood.

@ggetz no updates yet but I responded to all your comments if you wanna take another look. |
@jjspace Responded above. Hopefully that's enough to move forward. But, if not, let me know and we can chat further. |
Thanks @ggetz, I like your suggestions. The title has been simplified to This should be ready for another look, please merge if happy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Working great! Thanks @jjspace!
Description
*
to the page titleMerge after #12755 as this is based on the UI work in there
Issue number and link
Part of #12566
Testing plan
npm run dev
in the sandcastle package ornpm run build-sandcastle
andnpm start
from the project root*
Author checklist
CONTRIBUTORS.md
CHANGES.md
with a short summary of my change