awestruct / web-editor

A web based editor for awestruct projects
8 stars 6 forks source link

Regenerate preview asynchronously #86

Open pmuir opened 10 years ago

pmuir commented 10 years ago

Once the save is complete, return control to the browser immediately. Start the regeneration, and then update it when complete, e.g. using long poll.

wesbos commented 10 years ago

@LightGuard we will need a callback or something when the save has taken place in addition to the current site being regenerated.

LightGuard commented 10 years ago

Why do we need a callback? Could we not add a button that says "View Site Preview"? Or maybe just modify the current "Open Preview" button to

  1. Check if the new window is open
  2. Refresh the /preview/:repo/ URL so the user is back at the top fo the site

Would that work for us?

On Fri, Oct 25, 2013 at 1:11 PM, Wes Bos notifications@github.com wrote:

@LightGuard https://github.com/LightGuard we will need a callback or something when the save has taken place in addition to the current site being regenerated.

— Reply to this email directly or view it on GitHubhttps://github.com/awestruct/web-editor/issues/86#issuecomment-27118104 .

Jason Porter http://en.gravatar.com/lightguardjp

wesbos commented 10 years ago

But doesn't the current save button only come back when the site generation is done?

LightGuard commented 10 years ago

Currently, but we're going to change that.

On Fri, Oct 25, 2013 at 2:44 PM, Wes Bos notifications@github.com wrote:

But doesn't the current save button only come back when the site generation is done?

— Reply to this email directly or view it on GitHubhttps://github.com/awestruct/web-editor/issues/86#issuecomment-27124226 .

Jason Porter http://en.gravatar.com/lightguardjp