Repository navigation
Conversation
The dependency notice in the Add Plugins cards was built as a title row
("Additional plugins are required") followed by one row per dependency,
in a box padded to `15px` instead of the standard notice padding.
Render a single description line instead, "Requires: <plugin name>", with
the dependency's name as the link to its details modal, and let the notice
inherit the standard `.notice` padding of `8px 12px`. The wrapper, the
`.plugin-dependency` and `.plugin-dependency-name` classes, and the
attributes of the details link are unchanged.
This is a net deletion of card-specific CSS: no new rules are added.
See #66781.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
|
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
Trac ticket: https://core.trac.wordpress.org/ticket/66781
The dependency notice in the Add Plugins cards is ~96px tall, and the height is structural rather than padding: a title row (Additional plugins are required) plus one row per dependency, inside a box the card pads to
15pxwhere the standard.noticeuses8px 12px.This keeps the notice and makes it a standard one.
What changed
WP_Plugin_Install_List_Table::get_dependencies_notice()drops the title row and renders a single description line instead, "Requires: WooCommerce", comma-separated for several dependencies, which matches the design system's documented description-only notice. The wording is "Requires", not "Also installs": core does not auto-install dependencies.get_more_details_link()takes an optional link text and keeps its classes and attributes exactly (more-details-link thickbox open-plugin-details-modal,aria-label,data-title).list-tables.csslosespadding: 15pxfrom.plugin-card .notice.plugin-dependencies, so the notice inherits the standard notice padding of8px 12px, and loses the flex-row rules that laid out each dependency as its own row now that the names are inline.margin: auto 20px 20pxis unchanged: that is card layout, not notice styling — 20px is the card's own gutter, matching.plugin-card .plugin-icon { left: 20px }and.plugin-card .action-links { right: 20px }.No CSS is added: the change to
list-tables.cssis a net deletion of 37 lines of card-specific CSS. The.plugin-dependencieswrapper and the.plugin-dependency/.plugin-dependency-nameclasses are kept, since plugins may be styling them — not removing them is the point of this patch. The only class that goes with the deleted title row is.plugin-dependencies-explainer-text, which had no purpose without that row.Notice colour, border and border-radius are untouched; #16129 handles notice paint, on
https://core.trac.wordpress.org/ticket/66781and in a different file.Height
Measured at 1440px, one dependency:
32px saved per card (the notice box and the row it sits in both shrink by the same amount). With two dependencies the saving is larger, 112px → 49px, because the second dependency no longer gets its own row; below roughly 1150px the line wraps to two lines and the notice is 69px.
This reduces the notice's height only. Its alignment with the card's More Details link is already correct but invisible; wordpress-develop#16129 is what makes it visible.
Screenshots
Desktop width, a row where the left card has a dependency and the right card does not.
Before:
After:
Two dependencies, before and after:
Two dependencies wrapping at a narrower window:
With #16129 applied, so the notice has a visible border (not part of this branch):
Testing
npm run build:dev, then Add Plugins → search "woocommerce stripe". WooCommerce Stripe Payment Gateway, WooPayments and Payment Plugins for Stripe all have dependencies; WooCommerce itself does not, so the row shows both states side by side.phpcbfandphpcsare clean on the changed PHP.get_dependencies_notice()assert the markup exactly, so their expectations are updated with the markup: 13 tests, 20 assertions, passing.Use of AI Tools
This patch was written with Claude Code (Claude Opus 5), including the markup and CSS changes, the test updates and the measurements above. All of it was reviewed by hand.