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

Templates: Hide description field when switching to List layout #57596

Open
jameskoster opened this issue Jan 5, 2024 · 9 comments · May be fixed by #61990
Open

Templates: Hide description field when switching to List layout #57596

jameskoster opened this issue Jan 5, 2024 · 9 comments · May be fixed by #61990
Assignees
Labels
[Feature] DataViews Work surrounding upgrading and evolving views in the site editor and beyond [Status] In Progress Tracking issues with work in progress [Type] Enhancement A suggestion for improvement.

Comments

@jameskoster
Copy link
Contributor

jameskoster commented Jan 5, 2024

Since template descriptions can sometimes be quite long, they are not handled beautifully in data views list layout:

Screenshot 2024-04-16 at 11 50 42

When switching from the default layout (Grid) to List, it might be good to auto-hide the description field.

Original issueIn the template management data view – list layout – the description isn't particularly useful for two main reasons:
  1. Most descriptions are too long to be fully visible
  2. Some templates do not have descriptions at all, resulting in an unhelpful which takes up a lot of vertical space
Screenshot 2024-01-05 at 14 22 53

Removing the description would reduce a lot of noise and save space:

Screenshot 2024-01-05 at 14 24 33

@jameskoster jameskoster added [Type] Enhancement A suggestion for improvement. [Feature] DataViews Work surrounding upgrading and evolving views in the site editor and beyond labels Jan 5, 2024
@jameskoster jameskoster mentioned this issue Jan 5, 2024
37 tasks
@carolinan

This comment was marked as resolved.

@jameskoster
Copy link
Contributor Author

I am not able to see where this vertical layout is used?

Enable the "New admin views" experiment in Gutenberg then navigate to Appearance > Editor > Templates > Manage all templates. From there change the layout to "List" in the view options.

Since this view is optimised for quickly browsing records in a more visual manner, I don't know that the description is required in the list. It can be accessed easily once it's possible to reach the details panel for each record (see #57523).

@jameskoster
Copy link
Contributor Author

I think this is much less of an issue since Grid was made the default layout for templates, but it would be good to auto-hide the description when switching from grid to list layout.

@jameskoster jameskoster changed the title Templates List layout: disable description field Templates: Hide description field when switching to List layout Apr 16, 2024
@jasmussen
Copy link
Contributor

If you can invoke the normalized details panel / inspector in this view, then you'd be able to see the description there.

@jasmussen jasmussen added the Needs Dev Ready for, and needs developer efforts label May 1, 2024
@jameskoster
Copy link
Contributor Author

Yup. You could also manually expose the description in view options if you really need to see it in this layout.

@Souptik2001
Copy link

Hi @jameskoster @jasmussen ,

I have raised a PR for this. Please review at your convenience.

Just adding one point over here -

As you can see in the below video -

  • Suppose the description field is not hidden.
  • And now I switch to the "List" layout and the description field becomes auto-hidden.
  • Now when I switch to any other layout the description field still remains hidden.
  • This is ok right?
Screen.Recording.2024-05-26.at.12.mp4

@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label May 26, 2024
@jameskoster
Copy link
Contributor Author

Suppose the description field is not hidden.
And now I switch to the "List" layout and the description field becomes auto-hidden.
Now when I switch to any other layout the description field still remains hidden.
This is ok right?

This is a good question because it may indicate we need a more fundamental change to get this right.

I'm keen to hear feedback from others but my feeling is that in this example switching from List layout to any other layout should reveal the description again.

What makes sense to me:

  • Data views consumers can specify layout-specific configs for field visibility. E.g. the Templates page might define the description field as visible by default on Table layout, but hidden by default on List and Grid layouts.
  • Any user customisation of field visibility takes priority over the default config.

So as a working example, on the templates page: Switching from Table to List layout would hide the description. Switching back to Table layout would reveal it again. However, if a user toggled the description field off in Table layout, then switched to List layout, then back to Table layout, the description would remain hidden. This seems reasonable to me because the user made an active decision around field visibility, and that should persist for the current session.

What do you think?

@colorful-tones colorful-tones moved this from 📥 Todo to 🔎 Needs Review in WordPress 6.6 Editor Tasks Jun 3, 2024
@colorful-tones colorful-tones removed the Needs Dev Ready for, and needs developer efforts label Jun 3, 2024
@ellatrix
Copy link
Member

This is an enhancement, so punting to WP 6.7.

@ellatrix ellatrix moved this from 🔎 Needs Review to 🐛 Punted to 6.6.1 in WordPress 6.6 Editor Tasks Jun 25, 2024
@ellatrix ellatrix moved this from 🐛 Punted to 6.6.1 to 🏈 Punted to 6.7 in WordPress 6.6 Editor Tasks Jun 25, 2024
@youknowriad
Copy link
Contributor

Yes, it seems to me, the fundamental issue is that we want by default different fields for different layouts and it might not make sense to retain the fields when you switch layouts.

Folks want to retain things like "filters" and "search" but maybe it's not the case for the rest (pagination: arguable, fields)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] DataViews Work surrounding upgrading and evolving views in the site editor and beyond [Status] In Progress Tracking issues with work in progress [Type] Enhancement A suggestion for improvement.
Projects
Status: Needs Dev
Status: 🏈 Punted to 6.7
7 participants