Skip to content
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

DataViews grid layout: Long pattern names are cut off #65134

Open
2 tasks done
carolinan opened this issue Sep 7, 2024 · 4 comments · May be fixed by #65200
Open
2 tasks done

DataViews grid layout: Long pattern names are cut off #65134

carolinan opened this issue Sep 7, 2024 · 4 comments · May be fixed by #65200
Assignees
Labels
[Package] DataViews /packages/dataviews [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@carolinan
Copy link
Contributor

Description

Under Appearance > Editor > Patterns, long pattern names are cut off when the grid layout is used. The grid layout is the default.
I expect the full name to be visible.

I have searched but was not able to find an existing issue for this, happy to close this if one is found.

Step-by-step reproduction instructions

Create a new pattern with the name "Blog posts for the right aligned blog".
View the grid layout on the Patterns screen under Appearance > Editor > Patterns.
Confirm if you can see the full name.

Screenshots, screen recording, code snippet

The screenshots show the Patterns screen with the grid layout active.

image
image
image

Environment info

WordPress 6.6.1
Gutenberg current trunk.

Please confirm that you have searched existing issues in the repo.

  • Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

  • Yes
@carolinan carolinan added [Type] Bug An existing feature does not function as intended [Package] DataViews /packages/dataviews labels Sep 7, 2024
@t-hamano
Copy link
Contributor

t-hamano commented Sep 9, 2024

When the text is long, an ellipsis should be displayed as shown below:

image

Therefore, the current display is considered a bug, and it is possible to fix it.

However, I agree that using ellipsis makes long pattern titles hard to read.

@WordPress/gutenberg-design

What do you think about not clipping the text, for example like this:

image

I think it's also possible to limit the title to two lines without showing the entire title.

@jasmussen
Copy link
Contributor

I'd defer to @jameskoster as he's thought quite a lot about this. But one instinct is that two-lines at most, with ellipsis cutoff before three lines, would be okay if it doesn't affect the row as a whole, i.e. so long as the 2nd row of items in the view still lines up horizontally.

@jameskoster
Copy link
Contributor

jameskoster commented Sep 10, 2024

Iirc the titles are truncated to a single line to ensure fields are aligned along the x axis, avoiding this:

Screenshot 2024-09-10 at 13 11 44

I don't have a strong opinion about whether that's more important than the titles being fully visible.

@jasmussen
Copy link
Contributor

I'd tend to think the added legibility might be worth it in this case. Also not a strong opinion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] DataViews /packages/dataviews [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants