#43697 closed enhancement (fixed)
Add theme update counter in admin theme menu item
Reported by: | mukesh27 | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 5.8 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Themes | Keywords: | has-patch has-screenshots needs-testing has-testing-info needs-design-feedback 2nd-opinion |
Focuses: | ui, administration | Cc: |
Description
Add theme update counter in admin theme menu item as we show for plugin menu item.
Attachments (7)
Change History (31)
#6
follow-up:
↓ 19
@
4 years ago
- Focuses ui added
@joyously I think using update-plugins
as class name is not very intuitive, but at the moment correct.
The network menu is using it too:
https://github.com/WordPress/WordPress/blob/b3b8942dfcb451eddb5559b63c1043fce5d9449e/wp-admin/network/menu.php#L65
We could either use it here too or add the class name to the CSS, because at the moment it does not exist:
https://github.com/WordPress/WordPress/search?q=update-themes
@mukesh27 Looking at the patch and the screenshot it shows an inconsistent behavior: The badge is added to the first submenu item instead of the main menu item ("Appearance"), like it is seen for the "Plugins" menu item.
I would vote for using the same design as for Plugins (which is also used in a multisite):
https://github.com/WordPress/WordPress/blob/b3b8942dfcb451eddb5559b63c1043fce5d9449e/wp-admin/network/menu.php#L59-L79
@
4 years ago
Updated patch. Count is added to "appearance" now and is using the correct class names and caps.
#7
@
4 years ago
I am still experiencing a strange behavior. There is a paid theme in my test environment with available update, but the notice "Automatic update is unavailable for this theme."
After leaving the themes.php
page the count is changing from 7 to 6. On all admin pages it stays on 6. Just on update-core.php
it is showing 7 again.
#9
@
4 years ago
- Milestone changed from Awaiting Review to 5.8
- Owner set to SergeyBiryukov
- Status changed from new to reviewing
This ticket was mentioned in Slack in #core-test by boniu91. View the logs.
3 years ago
#12
@
3 years ago
What to test:
- If it displays the notification correctly
- If it's removed after the update
- Check it on the PHP8
- Compare the number with the number inside the Dashboard > Updates
- Check the multisite
- Check the display on mobiles
- Confirm that it works with Paid Themes
This ticket was mentioned in Slack in #core-test by dariak. View the logs.
3 years ago
#14
@
3 years ago
Tested
- MacOS 11.3.1
- Safari 14.1
- WordPress 5.8-alpha-50427-src
- Rolled back GeneratePress free and Twenty Twenty-one to previous versions
- Applied the patch
- The notification now appears on the Appearance menu
- The number of updates matches in:
- Dashboard > Updates
- Appearance
- Horizontal bar
- The notification disappears once I update the themes
This ticket was mentioned in Slack in #core-test by dariak. View the logs.
3 years ago
#16
follow-up:
↓ 17
@
3 years ago
Test feedback:
- MacOS 10.14.6
- Google Chrome 90.0.4430.93
- WordPress 5.8-alpha-50821
- Once I got the patch working I see that the notification is displayed behind Appearance.
- When I update a theme the notification updates too, lowering the number of remaining themes that require an update.
- -
- The number behind Appearance matches the number shown for Dashboard -> Updates.
- -
- Same behaviour as in step 1, 2, and 4. However, I did notice that the placement of the notification bubbles looks slightly different on mobile.
- -
Steps that still require testing:
- Check it on the PHP8
- Check the multisite
- Confirm that it works with Paid Themes
#17
in reply to:
↑ 16
@
3 years ago
Replying to sannevndrmeulen:
Steps that still require testing:
- Check it on the PHP8
- Check the multisite
- Confirm that it works with Paid Themes
Thanks at you all for testing the patch! @francina @sannevndrmeulen
I will try to check this with PHP 8. But as this code is mainly adopted from the network version this should work fine.
Multisite is already showing this badge, because it uses another code. This code just runs on single sites.
The main reason for the needs-testing
tag was my experience with paid themes (see comment above).
It would be great if someone can try to test this patch with a paid theme which needs an update and tries to reproduce the described problem.
#18
@
3 years ago
Check on PHP 8 is positive. Works without problems.
Updates on theme page, theme overview and update core page are working and the count is changed accordingly after update.
#19
in reply to:
↑ 6
;
follow-up:
↓ 21
@
3 years ago
Replying to zodiac1978:
Looking at the patch and the screenshot it shows an inconsistent behavior: The badge is added to the first submenu item instead of the main menu item ("Appearance"), like it is seen for the "Plugins" menu item.
Thanks for the refreshed patch! I think it looks more consistent with the counter next to the "Themes" item though. Otherwise, when it's next to "Appearance", it's not quite clear what it refers to: themes, widgets, menus, etc.
So I would suggest going with the original approach here.
#21
in reply to:
↑ 19
;
follow-up:
↓ 22
@
3 years ago
Replying to SergeyBiryukov:
Thanks for the refreshed patch! I think it looks more consistent with the counter next to the "Themes" item though. Otherwise, when it's next to "Appearance", it's not quite clear what it refers to: themes, widgets, menus, etc.
So I would suggest going with the original approach here.
I would highly recommend to rethink this decision.
- The submenu "Themes" (and therefore the count badge) is just shown if the menu is opened. For a quick visual hint this is not useful IMHO. Showing the badge is meant to provide a visual reminder to update. If not seen, it does not work in this way.
- It is a contradiction to the behavior in the network admin.
- I don't know any case in which there is badge on the other items (widgets, menus, etc.) - if there are in the future, we could add them up to show an overall count on "Appearance" (and not just show waiting theme updates)
#22
in reply to:
↑ 21
;
follow-up:
↓ 24
@
3 years ago
- Keywords dev-feedback removed
Replying to zodiac1978:
It is a contradiction to the behavior in the network admin.
I would say the inconsistency is not necessarily in the counter placement, but rather in that the network admin menu does not have an Appearance item, and has the Themes item at the root level instead. Currently, both menus have the counter next to Themes item, which seems consistent enough to me.
I don't know any case in which there is badge on the other items (widgets, menus, etc.) - if there are in the future, we could add them up to show an overall count on "Appearance" (and not just show waiting theme updates)
As experienced users, we know that under the Appearance menu only themes support updates, but for those who don't have a lot of experience yet, I think it might be confusing as to what the counter next to the Appearance menu item is supposed to mean, and what they are supposed to do to remove it.
I would suggest bringing up the ticket at one of the Design team meetings to see how others feel about the counter placement, and we can iterate on it with more feedback :)
This ticket was mentioned in Slack in #core by sergey. View the logs.
3 years ago
#24
in reply to:
↑ 22
@
3 years ago
- Keywords needs-design-feedback 2nd-opinion added
Replying to SergeyBiryukov:
Replying to zodiac1978:
I would say the inconsistency is not necessarily in the counter placement, but rather in that the network admin menu does not have an Appearance item, and has the Themes item at the root level instead. Currently, both menus have the counter next to Themes item, which seems consistent enough to me.
You are absolutely right. This eliminates point 2. Still thinking about point 1 though ...
As experienced users, we know that under the Appearance menu only themes support updates, but for those who don't have a lot of experience yet, I think it might be confusing as to what the counter next to the Appearance menu item is supposed to mean, and what they are supposed to do to remove it.
Yes, this makes sense, too. And showing the badge on both items seems weird.
I would suggest bringing up the ticket at one of the Design team meetings to see how others feel about the counter placement, and we can iterate on it with more feedback :)
It is not easy for me to attend those meetings. I've added the "needs-design-feedback" and the "2nd-opinion" tag to open the discussion a bit more.
Would be great to get some more voices. Maybe I am overthinking this here 😅
I am totally fine with keeping it on the "Themes" item. Just want to be sure that this decision is based on a good foundation.
Why does your code use the
update-plugins
capability and class name?This used to work. Can you look back at older versions for that code?