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

Filter all of generated links to include the snapshot UUID if present in the request #47

Closed
westonruter opened this Issue Jun 12, 2016 · 2 comments

Comments

Projects
None yet
2 participants
@westonruter
Copy link
Contributor

westonruter commented Jun 12, 2016

When viewing the frontend of the site, clicking around should preserve the snapshot state as much as possible.

See https://github.com/xwp/wordpress-develop/pull/61/files#diff-4fb8a477f559bdfad2c1e6db6d1c8b06R887

@westonruter

This comment has been minimized.

Copy link
Contributor Author

westonruter commented Jul 22, 2016

As part of this, we should remove all Admin Bar nodes that link the user into the admin. There could be an “Exit Preview” button that just strips out the UUID from the URL. Or whenever clicking an admin bar node that links you away from the preview, there could be a confirm prompt on click to alert them that they are leaving the snapshot preview. If they click cancel, then we could do event.preventDefault().

@westonruter

This comment has been minimized.

Copy link
Contributor Author

westonruter commented Jul 23, 2016

Additionally, we can make use of sessionStorage to capture whether or not the user was in a snapshot frontend preview. If they end up landing on a new URL but didn't explicitly exit the preview, and yet the sessionStorage says that a specific snapshot UUID is being previewed, then there can be a prompt to restore the snapshot state. This would be a failsafe to recover from JS directing a user somewhere when the links aren't filtered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.