Repository navigation
Administration: Reserve avatar space for custom comment types in the Dashboard Activity widget - #16367
Conversation
…Dashboard Activity widget. The Recent Comments row output the avatar before branching on the comment type, but only the regular comment branch added the `has-avatar` class that the dashboard stylesheet uses to reserve space. Avatars enabled for custom comment types through `get_avatar_comment_types` therefore overlapped the heading. Use one wrapper for both branches and add `has-avatar` only when an avatar is actually rendered. Props willmot. See #66889.
|
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/66889
Summary
_wp_dashboard_recent_comments_row()outputs the avatar before branching on the comment type, but only the regular comment branch added thehas-avatarclass thatdashboard.cssuses to reserve space. Avatars enabled for custom comment types viaget_avatar_comment_typesoverlapped the heading.This uses one wrapper for both branches and adds
has-avataronly when an avatar is actually rendered. It follows the diff attached to the ticket by willmot.Testing
Tests_Admin_wpDashboardRecentCommentsRow):has-avatarfor a regular comment and a custom type, absent whenshow_avatarsis off, absent for a pingback. The custom type case fails on trunk and passes with this change.--group ajaxReply/Dashboard tests pass; PHPCS is clean on the changed files.Not checked in a browser: RTL and mobile layout.