Make WordPress Core

Opened 15 years ago

Closed 13 years ago

Last modified 13 years ago

#17703 closed enhancement (fixed)

Decrement update count bubbles when you update things

Reported by: mitchoyoshitaka Owned by: koopersmith
Priority: normal Milestone: 3.9
Component: Upgrade/Install Version:
Severity: trivial Keywords: has-patch dev-feedback
Cc: Focuses: administration

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)

17703.2.diff​ (18.8 KB ) - added by mitchoyoshitaka 15 years ago.
Patch v1.1, forgot to add update.dev.js
17703.3.diff​ (7.5 KB ) - added by mitchoyoshitaka 15 years ago.
Patch to fix patchrot, as #17694 landed. Should apply cleanly to trunk.
17703.diff​ (8.5 KB ) - added by mitchoyoshitaka 15 years ago.
Was missing a file
17703-04.patch​ (8.7 KB ) - added by gcorne 13 years ago.
17703-05.patch​ (8.3 KB ) - added by gcorne 13 years ago.

Download all attachments as: .zip

Change History (14)

@mitchoyoshitaka
15 years ago

Patch v1.1, forgot to add update.dev.js

@mitchoyoshitaka
15 years ago

Patch to fix patchrot, as #17694 landed. Should apply cleanly to trunk.

@mitchoyoshitaka
15 years ago

Was missing a file

#2 @mitchoyoshitaka
15 years ago

  • Owner changed from mitchoyoshitaka to koopersmith
  • Status new → reviewing

#3 @nacin
13 years ago

  • Component Administration → Upgrade/Install
  • Focuses administration added

#4 @gcorne
13 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.

#5 @samuelsidler
13 years ago

  • Milestone Awaiting Review → 3.9

#6 follow-up: @gcorne
13 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 @SergeyBiryukov
13 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.

#8 @nacin
13 years ago

  • Resolution → fixed
  • Status reviewing → closed

In 27280:

Decrement update count bubbles as plugins/themes are updated, live.

props gcorne, mitchoyoshitaka.
fixes #17703.

#9 @nacin
13 years ago

In 27281:

Remove title attributes on the fly when [27280] makes them incorrect. see #17703.

Note: See TracTickets for help on using tickets.