#17703 closed enhancement (fixed)
Decrement update count bubbles when you update things
Reported by: | mitchoyoshitaka | Owned by: | koopersmith |
---|---|---|---|
Milestone: | 3.9 | Priority: | normal |
Severity: | trivial | Version: | |
Component: | Upgrade/Install | Keywords: | has-patch dev-feedback |
Focuses: | administration | Cc: |
Description
This can be done via some JavaScript, including for the bulk updater case, and it looks pretty cool. :) Video attached, as well as a first-pass patch.
Attachments (5)
Change History (14)
#1
@
13 years ago
Here's the video: http://mitcho.com/17703.mov
#2
@
13 years ago
- Owner changed from mitchoyoshitaka to koopersmith
- Status changed from new to reviewing
#3
@
11 years ago
- Component changed from Administration to Upgrade/Install
- Focuses administration added
#4
@
11 years ago
- Keywords dev-feedback added
This seems like a good idea, so I went ahead and created a fresh patch (see 17703-04.patch). The approach is a little different from Mitcho’s. Instead of offsetting the existing counts, an ajax call is triggered that pulls updated counts. For situations where the requests where the upgrades run is in an iframe, window.postMessage
is used to send a message to the parent window that triggers the count updating.
One benefit of using an ajax handler is that it opens the door to refreshing the counts asynchronously at other times so that the status is more current without impacting the response time of admin page loads.
#6
follow-up:
↓ 7
@
11 years ago
After discussing a bit with @nacin, we discussed an alternative approach that forgoes the ajax call to fetch updated data and instead just decrements the existing counts via javascript. Since it is quite unlikely that a install with have over 1,000 plugins, we don't need to worry about localizing the number, which was one of the main reasons for the ajax call.
17703-05.patch is an implementation of this approach. The patch also removes the title attribute for the update count, which I am not 100% sure we want to do, but it was another aspect that we discussed.
#7
in reply to:
↑ 6
@
11 years ago
Replying to gcorne:
The patch also removes the title attribute for the update count, which I am not 100% sure we want to do, but it was another aspect that we discussed.
The pending comment count would still have a title attribute. It seems inconsistent to remove the title just for updates, so I'd suggest keeping it for now.
Patch v1.1, forgot to add update.dev.js