Make WordPress Core

Opened 2 weeks ago

Closed 6 days ago

#64976 closed defect (bug) (fixed)

Admin Style: Plugin links change styles on updates on 7.0

Reported by: antonynz's profile antonynz Owned by: joedolson's profile joedolson
Milestone: 7.0 Priority: normal
Severity: minor Version: trunk
Component: Administration Keywords: admin-reskin has-patch has-screenshots dev-reviewed
Focuses: Cc:

Description

When updating a plugin in 7.0 on the plugins page the plugin links (Activate, Deactivate etc) change to become underlined, with a slightly different colour due to the styles below in wp-admin/css/common.css

.notice a,
.error a,
.updated a {
	color: var(--wp-admin-theme-color-darker-10);
	text-decoration: underline;
}

.notice a:hover,
.error a:hover,
.updated a:hover {
	color: var(--wp-admin-theme-color-darker-20);
}

.notice a:focus,
.error a:focus,
.updated a:focus {
	box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
	outline: 2px solid transparent;
	border-radius: 2px;
}

Looking at this changelog note the styles might be intended to target the notice class/section rather than the main plugin row?

Change History (17)

#1 @audrasjb
2 weeks ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 7.0

#2 @joedolson
2 weeks ago

This is because plugin rows get the class .updated after an update runs, so these styles cover that case.

The added selectors probably need to be div.updated, etc., to prevent applying in miscellaneous other places where the same classes might be used.

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


2 weeks ago
#3

  • Keywords has-patch added; needs-patch removed

Ticket: https://core.trac.wordpress.org/ticket/64976

## Summary
Fixes an issue where plugin action links in the admin interface change styles unexpectedly after updates (targeted for WordPress 7.0).

## Problem
On the Plugins screen, action links (e.g., Activate, Deactivate, Settings) do not consistently retain their intended admin styles after a plugin update. This results in inconsistent UI appearance and deviates from the expected admin design system.

## Solution
This PR ensures that plugin action links consistently use the correct admin styles after updates by aligning them with the updated admin design system and preventing unintended style overrides.

## Changes Included

  • Fixed inconsistent styling of plugin action links after updates
  • Ensured alignment with current WordPress admin color and style guidelines
  • Prevented regression by applying consistent selectors and styles

## Testing Steps

  • Go to Plugins → Installed Plugins
  • Update any plugin
  • Observe the action links (Activate, Deactivate, etc.)
  • Confirm that styles remain consistent before and after the update

## Expected Result
Plugin action links should maintain consistent styling aligned with the WordPress admin UI both before and after plugin updates.

#4 @opurockey
2 weeks ago

We can simply exclude the row from this css effect. Created a PR that resolves the issue.

@opurockey commented on PR #11390:


13 days ago
#5

@rbcorrales , Thanks for the suggestions. I’ve addressed the requested improvements and updated the PR accordingly. Please take another look when you have a moment.

#6 @vgnavada
13 days ago

  • Keywords has-screenshots added

Test Report

Description

This report validates whether the indicated patch works as expected by checking the styling of plugin action links (specifically underline behavior) after updating a plugin.

Patch tested: https://playground.wordpress.net/wordpress.html?pr=11390

Environment

  • WordPress: 7.1-alpha-20260331.074508 (patched)
  • WordPress (baseline): 7.0-RC2-62162 (unpatched)
  • PHP: 8.3.30
  • Server: PHP.wasm (WordPress Playground)
  • Database: WP_SQLite_Driver (Server: 8.0.38 / Client: 3.51.0)
  • Browser: Chrome 146.0.0.0
  • OS: macOS
  • Theme: Twenty Twenty-Five 1.4
  • MU Plugins: None activated
  • Plugins:
    • Hello Dolly (tested by downgrading to an older version and triggering update)

Actual Results

  1. In the unpatched version (7.0-RC2-62162):
    • After updating the Hello Dolly plugin, the "Deactivate" action link displayed an unexpected underline styling.
    • The underline appeared inconsistent with standard admin UI behavior.
  1. In the patched version (7.1-alpha with PR applied):
    • After performing the same steps, the "Deactivate" link no longer shows the underline.
    • Styling appears consistent with expected admin UI behavior.

✅ Issue resolved with patch.

Additional Notes

  • Issue reproduced by downgrading Hello Dolly to an older version and triggering an update.
  • Comparison was done between Playground baseline and PR environment to ensure identical steps.
  • The fix improves consistency in plugin action link styling after updates.

Supplemental Artifacts

Before: https://prnt.sc/_UNbLEgQSatR
After: https://prnt.sc/SXwDu-QlxWRY

This ticket was mentioned in Slack in #core-test by nikunj8866. View the logs.


13 days ago

#8 @gaisma22
12 days ago

Patch Testing Report

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

Environment

  • WordPress: 7.0-beta6-62085-src
  • PHP: 8.3.30
  • Server: nginx/1.29.7
  • Database: MySQL 8.4.8
  • Browser: Brave
  • OS: Ubuntu 24.04
  • Theme: Twenty Twenty-Five 1.4
  • MU Plugins: None
  • Plugins: Hello Dolly (downgraded to 1.0.0 to trigger update)

Steps Taken

  1. Installed Hello Dolly and downgraded version to 1.0.0 to trigger an available update.
  2. Ran the update from Plugins > Installed Plugins.
  3. Observed action links (Activate, Delete) under the plugin row immediately after update completed. Before patch: Links showed unexpected underline and slightly different color.
  4. Applied PR #11390 and rebuilt.
  5. Repeated the same update and observed the links. After patch: No underline. Styling consistent before and after the update.

✅ Patch is solving the problem

Expected Result

Plugin action links should maintain consistent styling
after a plugin update with no underline or color change.

Additional Notes

  1. Bug confirmed on WordPress 7.0-beta6 - after updating Hello Dolly, the Activate and Delete links showed an unexpected underline due to the broad .updated a CSS selector catching the plugin row links.
  2. After the patch, .updated a is replaced with div.updated a, limiting the style to notice divs only. Plugin row links are no longer affected.

Screenshots/Screencast with results

Before Patch:
https://i.ibb.co/RkPdNTgM/before-patch.png

After Patch:
https://i.ibb.co/q34mMXZw/after-patch.png

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


12 days ago

@shailu25 commented on PR #11390:


12 days ago
#10

The plugin action links now maintain consistent styling across the interface.✅

BeforeAfter
https://github.com/user-attachments/assets/6099d405-5d1e-4f62-8e0f-1f411ef82d0dhttps://github.com/user-attachments/assets/975886ee-59bd-401b-b4de-725660d9279b

#11 @joedolson
12 days ago

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

#12 @audrasjb
12 days ago

  • Keywords commit added

The PR looks good to me. Marking it as ready for commit.

Edit: Ah I didn't refresh the page so didn't see that Joe is handling this :)

Last edited 12 days ago by audrasjb (previous) (diff)

@opurockey commented on PR #11390:


11 days ago
#13

All of these conditions should only be applied on div elements; these are intended to target admin notices, and admin notices are always a div. Leaving them this generic could have side effects more broadly.

@joedolson, I’ve addressed the requested changes. Let me know if anything else is needed.

#14 @joedolson
10 days ago

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

In 62200:

Admin: Limit scope of admin notice link design.

The design changes to admin notices links in the admin refresh were applied broadly to .notice, .error, and .updated classes, but these classes are sometimes used outside the context of an admin notice.

Change selectors from .notice a, .error a, .updated a to div.notice a, div.error a, div.updated a.

Props opurockey, audrasjb, vgnavada, gaisma22, shailu25, rbcorrales, joedolson.
Fixes #64976.

#15 @joedolson
10 days ago

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

Re-opening for review to merge to the 7.0 branch.

#16 @audrasjb
9 days ago

  • Keywords dev-reviewed added; dev-feedback removed

The changeset looks good to me. Let's backport this to branch 7.0.

#17 @joedolson
6 days ago

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

In 62211:

Admin: Limit scope of admin notice link design.

The design changes to admin notices links in the admin refresh were applied broadly to .notice, .error, and .updated classes, but these classes are sometimes used outside the context of an admin notice.

Change selectors from .notice a, .error a, .updated a to div.notice a, div.error a, div.updated a.

Reviewed by audrasjb.
Merges [62200] to the 7.0 branch.

Props opurockey, audrasjb, vgnavada, gaisma22, shailu25, rbcorrales, joedolson.
Fixes #64976.

Note: See TracTickets for help on using tickets.