Skip to content

Dataviews: Fix dataview columns width#72969

Merged
ntsekouras merged 4 commits intoWordPress:trunkfrom
rcrdortiz:fix/dataview-column-width
Nov 7, 2025
Merged

Dataviews: Fix dataview columns width#72969
ntsekouras merged 4 commits intoWordPress:trunkfrom
rcrdortiz:fix/dataview-column-width

Conversation

@rcrdortiz
Copy link
Copy Markdown
Contributor

@rcrdortiz rcrdortiz commented Nov 4, 2025

What?

Closes #72774

We've changed how the title column of dataview and other columns are rendered so that the title uses most of the available space. This way, pages with different title lengths will have a consistent layout.

Why?

See the linked issue (the one we're solving) for more information.

How?

Changed CSS classes to allow the title column to use as much available space as needed. The rest of the columns use the minimum space. Added a colgroup for better column intent declaration.

Testing Instructions

  1. Make sure you're on WordPress 6.9
  2. Go to http://localhost:8888/wp-admin/site-editor.php?p=%2Fpage
  3. You should see that the different columns of the dataview are arranged as in the screenshot.

Testing Instructions for Keyboard

Screenshots or screencast

Before After
Screenshot 2025-11-04 at 14 22 17 Screenshot 2025-11-06 at 17 07 51

@rcrdortiz rcrdortiz requested a review from oandregal as a code owner November 4, 2025 13:15
@github-actions
Copy link
Copy Markdown

github-actions bot commented Nov 4, 2025

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.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: rcrdortiz <rcrdortiz@git.wordpress.org>
Co-authored-by: ntsekouras <ntsekouras@git.wordpress.org>
Co-authored-by: jameskoster <jameskoster@git.wordpress.org>
Co-authored-by: oandregal <oandregal@git.wordpress.org>

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

@rcrdortiz
Copy link
Copy Markdown
Contributor Author

rcrdortiz commented Nov 4, 2025

I'm working on making the primary column have a max-width so that we don't get back to having the original issue.
See: #72774 (comment)

@github-project-automation github-project-automation bot moved this to 🔎 Needs Review in WordPress 6.9 Editor Tasks Nov 4, 2025
@t-hamano t-hamano added [Type] Regression Related to a regression in the latest release [Feature] DataViews Work surrounding upgrading and evolving views in the site editor and beyond labels Nov 4, 2025
aria-describedby={ tableNoticeId }
role={ isInfiniteScroll ? 'feed' : undefined }
>
<colgroup>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think this approach with colgroup is nice and we don't have to set styles for each row.

@rcrdortiz rcrdortiz force-pushed the fix/dataview-column-width branch from 2592049 to 48874ff Compare November 6, 2025 09:37
@ntsekouras
Copy link
Copy Markdown
Contributor

ntsekouras commented Nov 6, 2025

@rcrdortiz can you add a changelog entry in dataviews package?

Also we should fix this comment from Jay (it was in my temp PR).

@rcrdortiz
Copy link
Copy Markdown
Contributor Author

@rcrdortiz can you add a changelog entry in dataviews package?

Also we should fix this comment from Jay (it was in my temp PR).

Addressed in the latest commit.

Copy link
Copy Markdown
Contributor

@ntsekouras ntsekouras left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

Let's wait just a tiny bit for @jameskoster to verify the wrapping white-space change and let's land this.

@jameskoster
Copy link
Copy Markdown
Contributor

Seems good now! :)

@ntsekouras
Copy link
Copy Markdown
Contributor

@rcrdortiz please rebase for the changelog conflicts and let's land

@rcrdortiz
Copy link
Copy Markdown
Contributor Author

@rcrdortiz please rebase for the changelog conflicts and let's land

There ya go.

@ntsekouras ntsekouras enabled auto-merge (squash) November 7, 2025 10:29
@ntsekouras ntsekouras merged commit 5db7f24 into WordPress:trunk Nov 7, 2025
34 checks passed
@github-project-automation github-project-automation bot moved this from 🔎 Needs Review to ✅ Done in WordPress 6.9 Editor Tasks Nov 7, 2025
@github-actions github-actions bot added this to the Gutenberg 22.1 milestone Nov 7, 2025
@github-actions
Copy link
Copy Markdown

github-actions bot commented Nov 7, 2025

There was a conflict while trying to cherry-pick the commit to the wp/6.9 branch. Please resolve the conflict manually and create a PR to the wp/6.9 branch.

PRs to wp/6.9 are similar to PRs to trunk, but you should base your PR on the wp/6.9 branch instead of trunk.

# Checkout the wp/6.9 branch instead of trunk.
git checkout wp/6.9

# Create a new branch for your PR.
git checkout -b my-branch

# Cherry-pick the commit.
git cherry-pick 5db7f248cf331fec09572b05ab03cce47a09cb89

# Check which files have conflicts.
git status

# Resolve the conflict...
# Add the resolved files to the staging area.
git status
git add .
git cherry-pick --continue

# Push the branch to the repository
git push origin my-branch

# Create a PR and set the base to the wp/6.9 branch.
# See https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/changing-the-base-branch-of-a-pull-request.

ntsekouras added a commit that referenced this pull request Nov 7, 2025
Co-authored-by: rcrdortiz <rcrdortiz@git.wordpress.org>
Co-authored-by: ntsekouras <ntsekouras@git.wordpress.org>
Co-authored-by: jameskoster <jameskoster@git.wordpress.org>
Co-authored-by: oandregal <oandregal@git.wordpress.org>
@ntsekouras
Copy link
Copy Markdown
Contributor

Opened a PR for the manual backport.

@priethor priethor added Backported to WP Core Pull request that has been successfully merged into WP Core and removed Backport to WP 6.9 Beta/RC labels Nov 8, 2025
ntsekouras added a commit that referenced this pull request Nov 10, 2025
Co-authored-by: rcrdortiz <rcrdortiz@git.wordpress.org>
Co-authored-by: jameskoster <jameskoster@git.wordpress.org>
Co-authored-by: oandregal <oandregal@git.wordpress.org>
Co-authored-by: ntsekouras <ntsekouras@git.wordpress.org>
Co-authored-by: priethor <priethor@git.wordpress.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Backported to WP Core Pull request that has been successfully merged into WP Core [Feature] DataViews Work surrounding upgrading and evolving views in the site editor and beyond [Type] Regression Related to a regression in the latest release

Projects

Development

Successfully merging this pull request may close these issues.

DataViews table layout regression

5 participants