Ticket #6682 (closed defect: fixed)

Opened 8 months ago

Last modified 5 months ago

Preview link shows an out of date version

Reported by: DanCoulter Assigned to: azaozz
Priority: normal Milestone: 2.6
Component: Administration Version: 2.5
Severity: minor Keywords: has-patch blessed
Cc:

Description

When you click on the preview link, it (obviously) shows the most recently saved version. This version can be a bit out-of-date because the autosave only happens every minute. Having to click "Save", then waiting for the page to refresh, then clicking on the Preview link is a bit counter intuitive. The link can easily be used to trigger the autosave() JS function so that the most up-to-date version is displayed upon preview.

Attachments

autosave-on-preview.patch (0.7 kB) - added by DanCoulter on 04/11/08 15:48:28.
6682.patch (2.3 kB) - added by azaozz on 06/23/08 08:46:51.

Change History

04/11/08 15:43:39 changed by DanCoulter

  • keywords set to has-patch.

04/11/08 15:48:28 changed by DanCoulter

  • attachment autosave-on-preview.patch added.

04/14/08 19:25:05 changed by ryan

  • owner changed from anonymous to ryan.

04/23/08 01:26:44 changed by matt

  • keywords changed from has-patch to has-patch blessed.

04/23/08 02:01:46 changed by ryan

  • milestone changed from 2.7 to 2.6.

The preview often pops up before the autosave completes. We need to wait until autosave completes somehow.

05/02/08 16:10:31 changed by trombonekenny

I like the way Atlassian Confluence Wikis provide previews (you can try it out on their test space at http://confluence.atlassian.com/display/TESTING/Home): they use tabs over the textarea box to choose between a rich text editor, a plain textarea, and a rendered preview. Since it's a javascript function to switch between an editor or a preview (instead of opening a new window,) it can wait for the autosave to complete. IMO, it's a smoother workflow because it keeps everything in one window, it keeps all the editing tools on the screen and only previews the content part (not the full rendered blog page.)

That tabbed/JS behavior should be pretty easy to prototype as a plugin. Maybe I'll take a crack at that soon.

I disagree with the 'minor' severity of the ticket... this is the biggest change I've noticed going to 2.5. Previewing, re-editing, and saving are critical workflows in the way I use WP, and that's a process I want to be efficient and intuitive. I don't think it is anymore with 2.5.1.

06/22/08 20:47:35 changed by ryan

  • owner changed from ryan to azaozz.

06/23/08 08:46:36 changed by azaozz

Changed the above patch to wait for autosave to complete (to enable the buttons again) before showing the preview. Trade off is that the preview window will remain blank until autosave is done, may look as if the server is a bit slow sometimes.

We can show a mini-preview in a tab, however the editor area is quite small compared to the link above, so the preview will not be as good. Another option might be to show it in a ThickBox?, similar to the theme preview.

06/23/08 08:46:51 changed by azaozz

  • attachment 6682.patch added.

06/23/08 16:05:10 changed by ryan

  • status changed from new to closed.
  • resolution set to fixed.

(In [8170]) Autosave when Preview is clicked. Props azaozz and DanCoulter?. fixes #6682