-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Added max-width to DataView columns #70983
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
Added max-width to DataView columns #70983
Conversation
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 If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @rcrdortiz! In case you missed it, we'd love to have you join us in our Slack community. If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information. |
Looks like you committed your personal |
Did you forget adding the fixes (the actual maxWidths...), I don't see it in the diff? |
It got deleted on my second commit, restored the actual fix. |
Yup, thanks for the tip! |
Let's add a dataviews CHANGELOG entry about this change. :) |
…ata without breaking the line
…te text length without breaking the text
Here is a video with what the Table Layout looks like with the most recent changes: latest-table-layout.mp4 |
I think this is worth a try. |
…use more space when the Table layout view has fewer fields
Okay, I've progressed more, but I'm trying to figure out what the best approach is now. I can keep the nowrap-templates.mp4nowrap-storybook.mp4This here is the main issue with not wrapping text: nowrap-issue.mp4When we wrap text, large tables become somewhat easier to read, and are better suited (marginally) to the available screen's real estate without requiring scrolling as much, and we avoid having long cells. The problem is that wrapping kicks in soon once we have a few fields. Here are some examples: wrap-templates.mp4wrapping-storybook.mp4I think I'm more inclined towards the nowrap approach, but we wouldn't be solving the main issue. If we have cells with large chunks of text, the table will look just as bad as it does now. I'm not sure if the changes I've made to the primary column are a good enough tradeoff. What do you all think? |
What?
We're adding a max-width to DataView columns to avoid having infinite-length columns.
Why?
The UI for Table DataViews looks broken when a field is really large, the text doesn't get split into multiple lines and we need to scroll to the end to see other columns.
How?
We're adding a max-width to the cells in the DataView's Table Layout.
Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast