[wp-trac] [WordPress Trac] #31819: Shiny updates: more sophisticated locking
WordPress Trac
noreply at wordpress.org
Wed Apr 1 23:23:40 UTC 2015
#31819: Shiny updates: more sophisticated locking
-----------------------------+---------------------------------------------
Reporter: DavidAnderson | Owner: jorbin
Type: enhancement | Status: assigned
Priority: normal | Milestone: 4.2
Component: Upgrade/Install | Version: trunk
Severity: normal | Resolution:
Keywords: shiny-updates | Focuses: ui, javascript, administration
-----------------------------+---------------------------------------------
Comment (by DavidAnderson):
There are obviously a lot of issues involved here. But, for my feedback as
someone trying to interact with this for WP 4.2 (with a very widely
installed plugin), it might help to highlight the two most hack-ish thing
I had to do in order to make my code work again:
1) The only way to detect when a shiny update had finished was for me to
use setInterval() to poll and check wp.updates.updateQueue.length. This
ugliness could be removed by wp.updates.updateSuccess() calling a jQuery
trigger.
2) When an update link is clicked, the previous HTML (the update/more info
links) is lost forever. Shiny updates replaces it with "Updating...". But,
my code pops up a dialog that has a "cancel" option. If they cancel, I
can't bring back the previous HTML without ugliness/pain - e.g. parsing
and saving it all on page load (yuk). It'd be better if shiny updates
would show/hide the HTML instead of simply replacing it.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/31819#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list