Make WordPress Core

Opened 22 months ago

Last modified 17 months ago

#57577 new defect (bug)

Admin: Color schema is not applied correctly to beta labels in site editor

Reported by: wildworks's profile wildworks Owned by:
Milestone: Future Release Priority: normal
Severity: minor Version:
Component: Administration Keywords: has-patch has-testing-info changes-requested
Focuses: css Cc:

Description

When the color schema is not the default, the "beta" label assigned to Editor in the Appearance menu does not apply the correct background color.

When you mouse over "Appearance" in the top menu, the background color of the beta label disappears.

Attachments (8)

beta-label.png (14.4 KB) - added by wildworks 22 months ago.
beta label
woocommerce-task-count.png (16.8 KB) - added by sabernhardt 21 months ago.
remaining tasks count in WooCommerce submenu, with Ectoplasm scheme
2023-06-24_15-41-00.png (132.6 KB) - added by oglekler 17 months ago.
2023-06-24_15-40-45.png (99.6 KB) - added by oglekler 17 months ago.
top-level-badge-active.png (21.1 KB) - added by wildworks 17 months ago.
The badge isn't colored when the top-level menu with the badge is active.
top-level-hover.png (43.9 KB) - added by wildworks 17 months ago.
The background color changes when the mouse hovers over a top-level menu that is not active.
sub-level-badge-active.png (25.4 KB) - added by wildworks 17 months ago.
The badge on the submenu within the active top-level menu isn't colored.
sub-level-badge-hover.png (60.3 KB) - added by wildworks 17 months ago.
The badge on the submenu within inactive top-level menus isn't colored.

Download all attachments as: .zip

Change History (22)

@wildworks
22 months ago

beta label

This ticket was mentioned in PR #3938 on WordPress/wordpress-develop by @wildworks.


22 months ago
#1

  • Keywords has-patch added

Trac ticket:

@wildworks commented on PR #3938:


21 months ago
#2

I have confirmed that the "beta" label has been removed.

https://core.trac.wordpress.org/changeset/55281

I would like to close this issue as it no longer occurs.

#3 @wildworks
21 months ago

I have confirmed that the BETA label has been removed.

https://core.trac.wordpress.org/changeset/55281

I would be happy to close the ticket as this issue no longer occurs.

@sabernhardt
21 months ago

remaining tasks count in WooCommerce submenu, with Ectoplasm scheme

#4 @sabernhardt
21 months ago

  • Component changed from General to Administration
  • Focuses css added
  • Keywords 2nd-opinion added

The patch may still be appropriate for any plugins that add a similar note, such as WooCommerce.

#5 @sabernhardt
21 months ago

#57818 was marked as a duplicate.

#6 @wildworks
20 months ago

@sabernhardt
Thank you for the advice.

I also installed the WooCommerce plugin and changed the admin color scheme. I've confirmed that the patch applied the background color to the badge as expected. For this reason, I would like to reopen the PR.

@wildworks commented on PR #3938:


20 months ago
#7

Reopened based on [Reopened based on this comment. this comment].

#8 @sabernhardt
20 months ago

  • Keywords 2nd-opinion removed
  • Milestone changed from Awaiting Review to 6.3

#9 @alvitazwar052
18 months ago

  • Keywords has-testing-info added

Test Report

Environment

  • OS: macOS 12.4
  • Web Server: Nginx
  • PHP: 7.4.33
  • WordPress: 6.3-alpha-55505-src
  • Browser: Chrome
  • Theme: Twenty Twenty-two

Screenshots:

  1. Beta Removed from Appearance: https://prnt.sc/kGyjkMlziGGU
  2. Woocommerce Background Colour badge: https://prnt.sc/ky74vF-dJys9

Notes

  • The Beta is now removed from the appearance tab
  • In WooCommerce submenu, with the Ectoplasm scheme, the remaining task background color still remains

This ticket was mentioned in Slack in #core by chaion07. View the logs.


17 months ago

#11 @oglekler
17 months ago

  • Keywords changes-requested added

I applied a patch and have run build, but the correct color scheme didn't apply to submenu of the currently active parent. Screenshots are above.

#12 @wildworks
17 months ago

Thank you all for the test.

I have looked again at the latest trunk to see what colors are expected when the color schema is changed and what the problem is now. I consider the following four to be unexpectable behaviors:

  • The badge isn't colored when the top-level menu with the badge is active.
  • The background color changes when the mouse hovers over a top-level menu that is not active.
  • The badge on the submenu within the active top-level menu isn't colored.
  • The badge on the submenu within inactive top-level menus isn't colored.

If these behaviors are not what was intended, is it ok to attempt to resolve these issues with this ticket?

@wildworks
17 months ago

The badge isn't colored when the top-level menu with the badge is active.

@wildworks
17 months ago

The background color changes when the mouse hovers over a top-level menu that is not active.

@wildworks
17 months ago

The badge on the submenu within the active top-level menu isn't colored.

@wildworks
17 months ago

The badge on the submenu within inactive top-level menus isn't colored.

#13 @sabernhardt
17 months ago

  • Milestone changed from 6.3 to Future Release
  • Severity changed from normal to minor

Because the patch is not ready yet, I recommend revisiting this later (it can be moved back to 6.3 if desired).

The beta label is removed from Core, and the WooCommerce numbers are correct in the Default color scheme. It still would be good to fix for other color schemes, but maybe not this late in the release cycle.

@wildworks commented on PR #3938:


17 months ago
#14

Update: Based on the results of this test of the core ticket, I have adjusted the badge colors to be the intended badge colors in various cases. The selector is fairly simple, but simply overrides the default following style.

https://github.com/WordPress/wordpress-develop/blob/a44e46b914fca5c58f0ef8cbb7ecfc1169213363/src/wp-admin/css/admin-menu.css#L449-L453

With this change, I have removed the $menu-bubble-current-background variable, which is no longer used anywhere.

I also found a behavior where the background color changes when mousing over an inactive top-level menu if it is not the default theme. However, in this PR, I did not make any changes to the above behavior but focused on the correct badges to be displayed.

## Default Color Scheme

It should be no different than before.

https://github.com/WordPress/wordpress-develop/assets/54422211/996e927f-053e-40c4-adc3-ad445cb66b0a

## Extplasm Color Scheme

https://github.com/WordPress/wordpress-develop/assets/54422211/56b046be-9cec-48bc-a4e6-942f89e2c85d

## Ocean Color Scheme

https://github.com/WordPress/wordpress-develop/assets/54422211/6313cdcc-ba9a-469f-b1ad-da861ad624e7

Note: See TracTickets for help on using tickets.