Skip to content

Fix: Color schema is not correctly applied to the beta label#3938

Closed
t-hamano wants to merge 3 commits intoWordPress:trunkfrom
t-hamano:57577-color-scheme-beta-label
Closed

Fix: Color schema is not correctly applied to the beta label#3938
t-hamano wants to merge 3 commits intoWordPress:trunkfrom
t-hamano:57577-color-scheme-beta-label

Conversation

@t-hamano
Copy link
Contributor

@t-hamano t-hamano commented Jan 29, 2023

Trac ticket: https://core.trac.wordpress.org/ticket/57577

The site editor has a beta label and the .awaiting-mod class is used to indicate that it is a badge. I think this is the class originally used for the comment badge.

The background color style for this class works correctly if the top menu is given a badge. However, with the advent of the site editor, I believe the use of this badge in the child menu causes unintended behavior.

Therefore, I have updated the selector so that no matter which menu the badge with this class is used in, the background color will be applied correctly. Ideally, we might need a selector for the site editor, but since the beta label should be removed in the future, I have kept the current class name.

Before

before.mp4

After

after.mp4

@t-hamano t-hamano marked this pull request as ready for review January 29, 2023 10:46
@t-hamano
Copy link
Contributor Author

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.

@t-hamano t-hamano closed this Feb 10, 2023
@t-hamano t-hamano reopened this Mar 5, 2023
@t-hamano
Copy link
Contributor Author

t-hamano commented Mar 5, 2023

Reopened based on this comment.

@t-hamano t-hamano force-pushed the 57577-color-scheme-beta-label branch from e46859b to f062c05 Compare June 25, 2023 12:19
@t-hamano
Copy link
Contributor Author

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.

#adminmenu li.current a .awaiting-mod,
#adminmenu li a.wp-has-current-submenu .update-plugins {
background-color: #d63638;
color: #fff;
}

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.

default.mp4

Extplasm Color Scheme

ectoplasm.mp4

Ocean Color Scheme

ocean.mp4

@t-hamano t-hamano closed this by deleting the head repository Feb 13, 2026
@t-hamano
Copy link
Contributor Author

Oh, I re-forked the wordpress-develop repo and it seems all my submitted open PRs were closed 😂 I submitted a new PR that is equivalent to this one. #10924

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant