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

Improve flow for previewing unsaved pages/posts #3087

Closed
jasmussen opened this issue Oct 20, 2017 · 3 comments
Closed

Improve flow for previewing unsaved pages/posts #3087

jasmussen opened this issue Oct 20, 2017 · 3 comments
Labels
[Type] Enhancement A suggestion for improvement.

Comments

@jasmussen
Copy link
Contributor

Issue Overview

If you load the demo content and press Preview before the content has saved, you get an empty new tab on the URL about:blank, which sits there for a few seconds, and then it redirects you to the preview.

What happens in the background is that as soon as you press preview, we actually do save the content, but we also open the browser tab where the preview will eventually load.

The wait period is a bit jarring, though:

preview

It would be nice if instead of loading about:blank, we could load something else, an intermediate page that says "Preparing your preview" or something. Doesn't have to be complex, can be a completely white page with the text centered.

@jasmussen jasmussen added the [Type] Enhancement A suggestion for improvement. label Oct 20, 2017
@aduth
Copy link
Member

aduth commented Oct 20, 2017

A bit of technical context:

Popup windows can only be opened in response to user interaction. Therefore, we must open the popup as soon as the user clicks Preview, otherwise we won't be permitted to do so later (can't perform the save in the editor first before showing).

The process is:

  1. User clicks Preview
  2. Popup window is opened to blank page
  3. Post is saved
  4. After post finishes saving, blank page is redirected to preview

While we could direct the user to another page, since there'd be a load time associated with this, another option might be to write directly to the blank page with our intermediate messaging.

Demo: https://codepen.io/aduth/pen/jGJaYX

@jack-lewin
Copy link
Contributor

I've started work on this, will try and make a PR tomorrow.

@jack-lewin jack-lewin mentioned this issue Oct 25, 2017
3 tasks
@aduth
Copy link
Member

aduth commented Nov 1, 2017

Considering this as closed by #3157

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

3 participants