Skip to content

Fix mobile list tables 65743 - #12737

Open
joedolson wants to merge 7 commits into
WordPress:trunkfrom
joedolson:fix-mobile-list-tables-65743
Open

Fix mobile list tables 65743#12737
joedolson wants to merge 7 commits into
WordPress:trunkfrom
joedolson:fix-mobile-list-tables-65743

Conversation

@joedolson

Copy link
Copy Markdown
Contributor

Work in progress

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

Use of AI Tools


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

Copilot AI review requested due to automatic review settings July 28, 2026 15:35

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

github-actions Bot commented Jul 28, 2026

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Unlinked Accounts

The following contributors have not linked their GitHub and WordPress.org accounts: @nazmulasif.

Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases.

Core Committers: Use this line as a base for the props when committing in SVN:

Props joedolson, sabernhardt, afragen, afercia.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@joedolson
joedolson marked this pull request as draft July 28, 2026 15:35
@github-actions

Copy link
Copy Markdown

Test using WordPress Playground

The 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

  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

Copilot AI review requested due to automatic review settings July 28, 2026 22:11

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI review requested due to automatic review settings July 28, 2026 22:11

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@joedolson

Copy link
Copy Markdown
Contributor Author

I'm confident there are still things missing here, but it's functional, and ready for review.

This switches the responsive layout to use flex. It will need some polish on padding; I'm somewhat of the opinion that losing the space to the left, under the checkbox, is actually a good thing, as it gives a bit more width for the additional text.

@joedolson
joedolson marked this pull request as ready for review July 28, 2026 22:24
@afragen

afragen commented Jul 29, 2026

Copy link
Copy Markdown
Member

Reviewed in Playground. All issues seem resolved. I'm still getting used to the collapse of space under the checkbox, but I'm OK with it.

border-left: 4px solid var(--wp-admin-theme-color);
}

@media screen and ( width < 782px ) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@media screen and ( width < 782px ) {
@media screen and (max-width: 782px) {

These styles probably belong within the existing max-width media query later in the file, but the query should include 782.

@nazmulasif

Copy link
Copy Markdown

Patch Test Report

Patch - https://patch-diff.githubusercontent.com/raw/WordPress/wordpress-develop/pull/12737.diff

I tested this issue on trunk using WordPress Playground across narrow/mobile viewports.

Testing Results

  • Environment: WordPress Trunk (via WordPress Playground)
  • Page: Plugins

Observations

  • Status: Confirmed reproducible on trunk.
  • Issue: On narrow screens/mobile viewports, the plugin list table column layout breaks down:
    • The plugin description text compresses into an extremely narrow right-hand column and overflows horizontally off-screen.
    • The text gets clipped and unreadable instead of stacking vertically or wrapping properly.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (5)

src/wp-admin/css/list-tables.css:1999

  • This selector now applies the data-colname pseudo-label to the primary column as well, but the primary cell does not get the matching left padding (only sibling cells after the primary do). That can cause the label to overlap the primary cell’s content. Excluding .column-primary restores the intended behavior (label only for secondary cells).
	.wp-list-table tr:not(.inline-edit-row):not(.no-items) td:not(.check-column)::before {

src/wp-admin/css/list-tables.css:1338

  • This media query uses the Media Queries Level 4 range syntax (width < 782px), which is inconsistent with the rest of wp-admin CSS (e.g. @media screen and (max-width: 782px) later in this file) and also excludes the exact 782px breakpoint. Using max-width: 782px keeps the established breakpoint and avoids support/consistency issues.
@media screen and ( width < 782px ) {

src/wp-admin/css/list-tables.css:1963

  • align-content has no effect here because .wp-list-table thead th is a flex item (the tr is the flex container), not a flex container. If the intent is vertical centering within the flex row, align-self is the applicable property.
	.wp-list-table thead th {
		align-content: center;
	}

src/wp-admin/css/list-tables.css:1363

  • Inside this mobile breakpoint, the existing left accent on active plugins is cleared on the check-column cells and moved to tr.active / .plugin-update-tr.active. Borders on tr are not reliably rendered for HTML tables, so the accent can disappear. Keeping the border on the check-column cells matches the existing pattern used elsewhere in this file (e.g. tr.paused ... .check-column).

This issue also appears on line 1999 of the same file.

	.plugins .active th.check-column,
	.plugins .active td.check-column,
	.plugin-update-tr.active td {
		border-left: 4px solid transparent;
	}

src/wp-admin/css/list-tables.css:1978

  • This nth-child(n+3) rule assumes every list table row has a checkbox column + primary column. Core list tables can omit the checkbox column (e.g. WP_Comments_List_Table when $this->checkbox is false), which would prevent the first non-primary details column from stacking full-width when expanded. Targeting non-primary/non-checkbox cells by class is more robust.
	.wp-list-table tr td:nth-child(n+3) {
		flex: 0 1 100%;
	}

@afercia

afercia commented Jul 30, 2026

Copy link
Copy Markdown
Member

Besides @sabernhardt's suggestion, I noticed only a few minor things that I'd consider optional to fix. This PR solves the main issue and looks good. Personally, I'm OK with the removal of the space under the checkbox.

1
The plugin title font size looks slightly bigger on trunk (left) compared to 7.0 (right):

01 plugin title

2
In the post panel, the spacing between the row actions links is slightly different:

02 post expanded

3

The checkbox of the active plugins is no longer horizontally aligned with the other checkboxes:

03 checkbox alignment

4

Pre-existing issue, can be reproduced on 7.0 too: in the Plugins table, the padding of the cell for the checkbox in the table header is different compared to the one for the Posts table. This impacts the alignment of the checkbox with the th text 'Plugin':

04 plugins checkbox cell

Maybe only 3), the horizontal alignment of the active plugins checkbox, is worth fixing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants