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 List /Table layout: Hide preview field #57597

Closed
jameskoster opened this issue Jan 5, 2024 · 7 comments
Closed

Templates List /Table layout: Hide preview field #57597

jameskoster opened this issue Jan 5, 2024 · 7 comments
Labels
[Feature] DataViews Work surrounding upgrading and evolving views in the site editor and beyond Needs Dev Ready for, and needs developer efforts [Type] Enhancement A suggestion for improvement.

Comments

@jameskoster
Copy link
Contributor

jameskoster commented Jan 5, 2024

In the Templates data view the preview thumbnail is only helpful in Grid layout, where it is large enough to communicate a reasonable preview. In List and Table layouts it's simply too small.

Screenshot 2024-01-05 at 14 22 53

Let's hide the preview field in List and Table layout for now.

@jameskoster jameskoster added [Type] Enhancement A suggestion for improvement. Needs Design Needs design efforts. [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
@jameskoster

This comment was marked as outdated.

@jameskoster jameskoster added the Needs Design Feedback Needs general design feedback. label Jan 5, 2024
@jasmussen

This comment was marked as outdated.

@jameskoster

This comment was marked as outdated.

@jasmussen

This comment was marked as outdated.

@jameskoster jameskoster changed the title Templates List layout: Explore alternative preview options Templates List layout: Hide preview thumbnail Jan 9, 2024
@jameskoster jameskoster added Needs Dev Ready for, and needs developer efforts and removed Needs Design Feedback Needs general design feedback. Needs Design Needs design efforts. labels Jan 17, 2024
@jameskoster jameskoster changed the title Templates List layout: Hide preview thumbnail Templates List /Table layout: Hide preview field Jan 17, 2024
@oandregal
Copy link
Member

oandregal commented Jan 17, 2024

Some thoughts about how we could implement this:

  1. In the consumer (Pages, Templates, Patterns):
    1. It may declare a field depending on the view.type. For example, it may declare all fields for grid but omit featured image for tables and list.
    2. It may declare all the fields for all views, but provide different render for each: the grid gets the "preview", but table/list can act as a boolean/string (as in "has featured image" or not).
  2. As part of the DataViews APIs.
    1. We could hide the mediaField from the list and table.
    2. As part of the view.layout, we could have hiddenFields the user cannot make visible.
    3. For list & grid, we do not render any field of type image that is not set as mediaField.

@oandregal
Copy link
Member

Added a new option above:

For list & grid, we do not render any field of type image that is not set as mediaField.

Adding some context. I was thinking about how would we manage a situation in which there were two images:

  • table: just fine, it's another column
  • grid & list: unsure how we'd do it

@jameskoster
Copy link
Contributor Author

As with #58012 I'm a little hesitant about this one now. Linking field availability to layout feels a bit at-odds with the data views concept. Ideally all fields should work in all layouts, and it's up to the user which ones to include or not. In this case, I think we should explore ways to make the template preview work in List layout. I'll open a new issue for this.

@jameskoster jameskoster closed this as not planned Won't fix, can't repro, duplicate, stale Jan 29, 2024
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 Needs Dev Ready for, and needs developer efforts [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

3 participants