[wp-trac] [WordPress Trac] #51476: When plugins are updating, the adminbar icon should also rotate

WordPress Trac noreply at wordpress.org
Tue Jan 26 20:08:03 UTC 2021


#51476: When plugins are updating, the adminbar icon should also rotate
-------------------------------------+-------------------------------------
 Reporter:  johnjamesjacoby          |       Owner:  SergeyBiryukov
     Type:  enhancement              |      Status:  reviewing
 Priority:  normal                   |   Milestone:  5.7
Component:  Plugins                  |     Version:  4.6
 Severity:  normal                   |  Resolution:
 Keywords:  has-screenshots has-     |     Focuses:  javascript, css, rtl,
  patch commit                       |  administration
-------------------------------------+-------------------------------------

Comment (by SergeyBiryukov):

 Noticed a minor issue with [attachment:"51476.2.diff"]: the placement of
 adding/removing the class is not really consistent.

 In the three functions affected, there are these conditionals:
 {{{
 if ( 'plugins' === pagenow || 'plugins-network' === pagenow ) {
         ...
 } else if ( 'plugin-install' === pagenow || 'plugin-install-network' ===
 pagenow ) {
         ...
 }
 }}}

 In the first function, adding the class happens outside of them, but in
 the other two the class is only removed in the first conditional, so when
 updating a plugin from the Add Plugins screen, the icon just keeps
 spinning forever.

 [attachment:"51476.3.diff"] fixes that. I've also changed the `.updating-
 message` class to `.spin`, since there's no message on the admin bar icon.
 This is also somewhat consistent with the `.spin` class used in auto-
 update toggles.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/51476#comment:22>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list