Repository navigation
Conversation
On the Add Plugins screen, a plugin's dependencies were listed in a `notice notice-alt notice-info inline` block rendered between `.plugin-card-top` and `.plugin-card-bottom`. The block occupied around 100px, and because the cards in a row share a height, one card with dependencies stretched its neighbours. The dependencies are now listed in a single line of text, `Requires:` followed by the dependency names, rendered inside `.plugin-card-top` after the authors line so it inherits the card's text flow and gutters. Each dependency's name is the link to its own details modal, replacing the separate 'More Details' link that duplicated the card's own link. `.plugin-card .notice.plugin-dependencies`, `.plugin-dependency` and `.plugin-dependency-name` are no longer rendered, and their styles are removed. See #66781. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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. |
| * Creates a 'More details' link for the plugin. | ||
| * | ||
| * @since 6.5.0 | ||
| * @since 7.2.0 Added the `$link_text` parameter. |
There was a problem hiding this comment.
Of course, my mistake, thanks for the correction! Done.
Trunk is in the 7.2 release candidate phase, so these changes land in 7.3. 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:
|
Trac ticket: https://core.trac.wordpress.org/ticket/66781
What
On the Add Plugins screen, a plugin's dependencies were listed in a
<div class="plugin-dependencies notice notice-alt notice-info inline">block rendered between.plugin-card-topand.plugin-card-bottom. The block occupied about 100px. Because the cards in a row share a height, one card with dependencies stretched every neighbour in its row.This replaces the notice with a single line of text:
Requires:followed by the dependency names, rendered inside.plugin-card-topafter<p class="authors">, so it inherits the card's normal text flow and gutters.get_more_details_link()keeps itsmore-details-link,thickboxandopen-plugin-details-modalclasses and itsaria-labelanddata-titleattributes; it takes an optional$link_textparameter so the name can be used as the link text.wp_get_list_item_separator().get_dependencies_notice()are updated to the new markup. 13 tests, 20 assertions, passing.Backwards compatibility
.plugin-card .notice.plugin-dependencies,.plugin-dependencyand.plugin-dependency-nameno longer render, and their styles are removed fromlist-tables.css. Plugins may be styling or querying those selectors, and those rules will stop matching. The generic.plugin-card .noticerule is untouched, since other notices on the card use it.Measurements
Measured at 1440px, two cards per row, card width 611px.
.plugin-card-top, 1 dependency.plugin-card-top, 2 dependenciesThe card's text column does grow, by exactly one 20px line per rendered line.
.plugin-card-top'smin-height: 135pxnever absorbs it: across all 36 cards in both searches,.plugin-card-topranged from 175px to 265px, so no card was ever at the min-height with slack to spare. The extra line is not free — it just costs 20px where the notice cost 101px.The row effect is reduced but not eliminated. The neighbouring WooCommerce card (natural height 255px) is still stretched to 318px; 20px of that is the new line and the rest is the dependency card's longer description, which is out of scope here.
Screenshots
Desktop width (1440px), search "woocommerce stripe". The first row has a card with a dependency next to one without, so the shared row height is visible.
Before
After
A card with two dependencies (WCFM Marketplace, search "multivendor marketplace"):
Before
After
Testing instructions
npm run build:dev.woocommerce stripe.Requires: WooCommerceunder the author line.multivendor marketplaceand confirm WCFM Marketplace lists two comma-separated dependencies, each linked.Use of AI Tools
Claude Opus 5.