#6682 closed defect (bug) (fixed)
Preview link shows an out of date version
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 2.6 | Priority: | normal |
| Severity: | minor | Version: | 2.5 |
| Component: | Administration | Keywords: | has-patch blessed |
| Focuses: | 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 (2)
Change History (14)
#5
@
18 years ago
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.
#7
@
17 years ago
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.
This ticket was mentioned in PR #6683 on WordPress/wordpress-develop by @jonsurrell.
19 months ago
#9
- Add print_script_module_data to WP_Script_Modules
- Use scriptmoduledata filter for Interactivity data
Depends on (includes) #6682.
Trac ticket:
@jonsurrell commented on PR #6683:
18 months ago
#10
@luisherranz @cbravobernal @darerodz I'd love to get an Interactivity API review of this 🙏
@jonsurrell commented on PR #6683:
17 months ago
#11
Suggested commit message:
Interactivity API: Use Script Modules filter for store and config data A dedicated API exists for passing data to Script Modules implemented in changeset [58579]. Use this Core API instead of a custom implementation for Interactivity API to pass data to the client. Props jonsurrell, gziolo, luisherranz, cbravobernal. Fixes #61512.
@Bernhard Reiter commented on PR #6683:
17 months ago
#12
Committed to Core in https://core.trac.wordpress.org/changeset/58729.
The preview often pops up before the autosave completes. We need to wait until autosave completes somehow.