Make WordPress Core

Opened 7 weeks ago

Closed 12 days ago

#64744 closed defect (bug) (fixed)

[Admin reskin] Admin Help still uses old colors

Reported by: fabiankaegy's profile fabiankaegy Owned by: audrasjb's profile audrasjb
Milestone: 7.0 Priority: normal
Severity: normal Version: trunk
Component: Administration Keywords: admin-reskin has-patch has-screenshots dev-feedback
Focuses: ui, css Cc:

Description

The "Help" menu in the admin got missed and still uses the old colors.

Attachments (3)

before-patch.png (61.7 KB) - added by shailu25 6 weeks ago.
Before Patch
after-patch.png (87.7 KB) - added by shailu25 6 weeks ago.
After Patch
help-menu-overflow.png (32.9 KB) - added by wildworks 2 weeks ago.
Help menu with scrollbar

Download all attachments as: .zip

Change History (40)

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


7 weeks ago
#1

  • Keywords has-patch added

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

## Use of AI Tools
none

#2 @ozgursar
6 weeks ago

Patch Testing Report

Patch Tested: https://github.com/WordPress/wordpress-develop/pull/11070

Environment

  • WordPress: 7.0-beta2-61752-src
  • PHP: 8.2.29
  • Server: nginx/1.29.4
  • Database: mysqli (Server: 8.4.7 / Client: mysqlnd 8.2.29)
  • Browser: Chrome 145.0.0.0
  • OS: macOS
  • Theme: Twenty Twenty-Five 1.4
  • MU Plugins: None activated
  • Plugins:
    • Code Snippets 3.9.5
    • Test Reports 1.2.1

Steps taken

  1. Inspect Admin Help menu colors using Dev Tools
  2. Notice active tab with old border-left color of #72aee6
  3. Apply patch
  4. Inspect the element confirm the new border-left color of var(--wp-admin-theme-color)
  5. ✅ Patch is solving the problem

Expected result

  • We expect to see the new CSS variable --wp-admin-theme-color color instead of the old value

Screenshots/Screencast with results

Before
https://i.imgur.com/g9h7DZD.png

After
https://i.imgur.com/eYQQp7c.png

Last edited 6 weeks ago by ozgursar (previous) (diff)

#3 @noruzzaman
6 weeks ago

Test Report

Patch tested: https://github.com/WordPress/wordpress-develop/pull/11070

Environment

  • WordPress: 7.0-beta2-20260226.234351
  • PHP: 7.4.33
  • Server: PHP.wasm
  • Database: WP_SQLite_Driver (Server: 8.0.38 / Client: 3.51.0)
  • Browser: Chrome 145.0.0.0
  • OS: macOS
  • Theme: Twenty Twenty-Five 1.4
  • MU Plugins: None activated
  • Plugins:
    • Test Reports 1.2.1

Steps taken

  1. Inspect Admin Help menu colors using Dev Tools.
  2. Notice active tab with old border-left color of #72aee6.
  3. Apply the patch from 11070.
  4. Compile assets using 'npm run build'.
  5. Inspect the element and confirm the new border-left color of var(--wp-admin-theme-color).

Expected result

  • We expect to see the new CSS variable --wp-admin-theme-color instead of the hardcoded color value.

Actual Results

Patch is solving the problem. The active help tab now correctly uses the admin theme color variable.

Screenshots

Before After
https://i.ibb.co.com/nsWj0QMB/before-tab-menu.png https://i.ibb.co.com/Z6HhY1mC/after-tab-menu.png
Last edited 6 weeks ago by noruzzaman (previous) (diff)

#4 @shailu25
6 weeks ago

Test Report

This Report Validates that the indicated patch address the issue.✅

Patch Tested: https://github.com/WordPress/wordpress-develop/pull/11070

Environment:

WordPress - 7.0-beta2-20260226.234351
OS - Windows
Browser - Chrome
Theme: Twenty Twenty Five
PHP - 7.4.33
Plugin - None

Actual Results:

  • Issue Resolved with Patch ✅

Supplemental Artifacts

  • Attached

@shailu25
6 weeks ago

Before Patch

@shailu25
6 weeks ago

After Patch

#6 @tusharaddweb
6 weeks ago

I’ve applied the patch and tested it on WordPress 7.0 Beta 2. The issue is resolved and everything is working as expected.

Before applying the patch:-
https://prnt.sc/J8WTYBO_nIuC

After applying the patch:-
https://prnt.sc/e33sHAqkmwIw

#7 @audrasjb
6 weeks ago

  • Owner set to audrasjb
  • Status changed from new to accepted

Self assigning for final review.

#8 @audrasjb
6 weeks ago

  • Keywords changes-requested added

Marking this ticket with changes-requested as per Joe's comment in the PR:

The use of transparency on the background colors is leaving a visible border between the selected tab and the help tab content, so I think these colors need to be solid.

@hbhalodia commented on PR #11070:


6 weeks ago
#9

Yes, I agree with the point we need to use solid color which will blended on a white background and results in equivalent hex.

I used AI tool and found the equivalent to be #EFF2FE this hex value. We can use this as a solid color. On adding this it looks good without any visible border.

https://github.com/user-attachments/assets/64619794-15a2-4403-b982-f35984e7e2fb

@amesplant commented on PR #11070:


5 weeks ago
#10

If the user changes their admin color scheme, using the hex value for a background won't work as it would not match the color scheme:
https://github.com/user-attachments/assets/dd021036-ff4e-4637-97a6-5a0822527418

Suggestion would be to use a pseudo-element to "cover" the border:

.contextual-help-tabs .active {
	padding: 0;
	margin: 0 -1px 0 0;
	border-left: 2px solid var(--wp-admin-theme-color);
	background: rgba(var(--wp-admin-theme-color--rgb), 0.08);
	/* box-shadow: 0 2px 0 rgba(0, 0, 0, 0.02), 0 1px 0 rgba(0, 0, 0, 0.02); */
	background: color-mix(in srgb, var(--wp-admin-theme-color) 8%, white);

	&::after {
		content: "";
		position: absolute;
		top: 0;
		right: -1px;
		width: 2px;
		height: 100%;
		background: inherit;
		z-index: 2;
	}
}

https://github.com/user-attachments/assets/ce6e95da-191d-4fb2-9431-ab8cca9474fe

#11 @audrasjb
4 weeks ago

  • Version set to trunk

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


3 weeks ago

@audrasjb commented on PR #11070:


3 weeks ago
#14

Thanks for the feedback and the proposal @amesplant !
I created a new PR with these changes: #11358
Closing this PR in favor of #11358.

@audrasjb commented on PR #11358:


3 weeks ago
#15

This looks good to me.
[Uploading screen-capture (10).webm…]()

#17 @audrasjb
3 weeks ago

  • Keywords dev-feedback has-screenshots added; changes-requested removed

Marking this as waiting for dev-feedback.

This ticket was mentioned in Slack in #core-committers by audrasjb. View the logs.


3 weeks ago

#19 @joedolson
3 weeks ago

  • Keywords dev-reviewed added; dev-feedback removed

@audrasjb 👍

#20 @audrasjb
3 weeks ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 62145:

Admin: Use admin color scheme variable for bar, highlight, and contextual help styles.

This changeset ensures the styles for bar, highlight and contextual help always take into account the admin color scheme settings.

Reviewed by joedolson.
Props fabiankaegy, audrasjb, ozgursar, noruzzaman, shailu25, sandipsinh007, tusharaddweb, hbhalodia, amesplant, joedolson.
Fixes #64744.
See #64308.

#21 follow-up: @wildworks
2 weeks ago

  • Resolution fixed deleted
  • Status changed from closed to reopened
.contextual-help-tabs .active::after {
	content: "";
	position: absolute;
	top: 0;
	right: -1px;
	width: 2px;
	height: 100%;
	background: inherit;
	z-index: 2;
}

This style causes an overflow, resulting in an unintended scrollbar always appearing on Windows OS. What is the purpose of this style in the first place? In my environment, removing these styles does not cause any visual issues.

@wildworks
2 weeks ago

Help menu with scrollbar

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


2 weeks ago
#22

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

## Use of AI Tools

None

## Screenshots

### Before

https://github.com/user-attachments/assets/8c7d7b62-0659-43ec-831d-5ffd1f3d9131

https://github.com/user-attachments/assets/8ed615dc-23cf-4385-9d35-9401ddfc58f1

### After

https://github.com/user-attachments/assets/bea7de68-1b99-4230-b1e8-68e153fa9481

https://github.com/user-attachments/assets/8a1ffa29-1ddc-4794-8fe9-41ece2e302b1

#23 in reply to: ↑ 21 @SergeyBiryukov
2 weeks ago

Replying to wildworks:

.contextual-help-tabs .active::after {
	content: "";
	position: absolute;
	top: 0;
	right: -1px;
	width: 2px;
	height: 100%;
	background: inherit;
	z-index: 2;
}

This style causes an overflow, resulting in an unintended scrollbar always appearing on Windows OS. What is the purpose of this style in the first place? In my environment, removing these styles does not cause any visual issues.

It appears to originate from this comment.

#24 @sabernhardt
2 weeks ago

I think removing the pseudo-element (PR 11396) is correct. It was intended to cover a border for the active help tab, but I do not find the border there in Chrome or Firefox with Windows 11 when I apply the patch.

If some browser does require the pseudo-element:

  1. It is not positioned correctly—in relation to the active tab—because the list item lacks position: relative.
  2. It probably should be hidden for small screens, at the 782px breakpoint.

#25 @audrasjb
2 weeks ago

  • Keywords dev-reviewed removed

Hello and thank you both for reopening the ticket and discussing this issue. No problem we can remove the pseudo element but I don't really get why the border would be ok now without it: when I tested the ticket, the PR using this small hack was the only one where the border was not visible… (I'm running a very classic MacOS/Chrome environment).
By the way we don't want that scrollbar anyway.
I'll try to reproduce the border issue too.

#26 @audrasjb
2 weeks ago

  • Keywords dev-reviewed added

Well I tested the border issue with the exact same config I previously had and I can't reproduce it anymore… let's add a follow-up commit with PR11396 as it fixes the scrollbar issues, simplifies the approach and doesn't seem to introduce any issue.

#27 @mukesh27
2 weeks ago

#64997 was marked as a duplicate.

@huzaifaalmesbah commented on PR #11396:


13 days ago
#28

Looks good to me.
### Before:
https://github.com/user-attachments/assets/eed10afa-0484-4dec-9962-5ef2b1258dde
https://github.com/user-attachments/assets/a8be6e41-6ebc-488a-a966-76c298500a83

### After:
https://github.com/user-attachments/assets/10a842e5-cb25-4f53-95ce-cb236af9ea39
https://github.com/user-attachments/assets/1e177d5e-2b4d-4d7e-95dc-8b26d2eb028a

#29 follow-up: @wildworks
13 days ago

After re-reading this comment, I don't think this pseudo-element is necessary at all. The following CSS is actually what removes the right border of the active tab.

.contextual-help-tabs .active {
    margin: 0 -1px 0 0;
    background: color-mix(in srgb, var(--wp-admin-theme-color) 8%, white);
}

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


13 days ago

#31 in reply to: ↑ 29 @sabernhardt
13 days ago

Yes, using color-mix() fixed the border issue. The pseudo-element was suggested when the background used RGBA.
background: rgba(var(--wp-admin-theme-color--rgb), 0.08);

#32 @audrasjb
13 days ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 62187:

Administration: Prevent horizontal scrollbar in contextual help panel.

In [62145], an ::after CSS rule was added that caused an overflow, resulting in an unintended scrollbar always appearing on Windows OS for example. This changeset removes the related CSS rule which is unnecessary to fix the initial issue.

Follow-up to [62145].

Props wildworks, SergeyBiryukov, sabernhardt, audrasjb, huzaifaalmesbah, mehrazmorshed, mukesh27.
Fixes #64744.

#33 follow-up: @audrasjb
13 days ago

  • Keywords dev-feedback added; dev-reviewed removed
  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopening to consider backporting [62187] to 7.0.

#34 in reply to: ↑ 33 @SergeyBiryukov
13 days ago

Replying to audrasjb:

Reopening to consider backporting [62187] to 7.0.

Should the code from comment:29 be added instead of the removed code?

#35 @wildworks
12 days ago

Reopening to consider backporting [62187] to 7.0.

Approved

Replying to audrasjb:

Reopening to consider backporting [62187] to 7.0.

Should the code from comment:29 be added instead of the removed code?

Since the code from comment:29 already exists, I think we can simply backport [62187] to 7.0.

#36 @audrasjb
12 days ago

@SergeyBiryukov @wildworks yes, I think we can go with [62187] as a follow-up to [62145].

#37 @wildworks
12 days ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 62190:

Administration: Prevent horizontal scrollbar in contextual help panel.

In [62145], an ::after CSS rule was added that caused an overflow, resulting in an unintended scrollbar always appearing on Windows OS for example. This changeset removes the related CSS rule which is unnecessary to fix the initial issue.

Follow-up to [62145].

Reviewed by wildworks, SergeyBiryukov.
Merges [62187] to the 7.0 branch.

Props wildworks, SergeyBiryukov, sabernhardt, audrasjb, huzaifaalmesbah, mehrazmorshed, mukesh27.
Fixes #64744.

Note: See TracTickets for help on using tickets.