Skip to content

Data views grid layout: Make aspect ratio consumer configurable #60891

@jameskoster

Description

@jameskoster

Related: #60630

Currently the preview field in grid layout renders in a hard-coded 1/1 aspect ratio, IE a square. As a default this works reasonably well, but some consumers would appreciate more expression. Pattern and Template previews for instance can be all kinds of lengths... squares don't always offer the best experience. By allowing custom (or auto to begin with) aspect ratios data views can make better use of space.

Current patterns grid with square previews

Screenshot 2024-04-19 at 10 03 38

Patterns grid with auto aspect ratio

Screenshot 2024-04-19 at 10 01 58

User preference

Down the road it might be nice to allow users to customise this display option. Such an affordance would be particularly useful in pages where the preview dimensions can vary significantly, like Media.

aspect

  • Enable data views to set aspect-ratio: auto for preview fields.
  • Add toggle so that users can swap between 1/1 and auto.

Metadata

Metadata

Labels

[Feature] DataViewsWork surrounding upgrading and evolving views in the site editor and beyond[Status] In ProgressTracking issues with work in progress[Type] EnhancementA suggestion for improvement.

Type

No type

Projects

Status

Needs Dev

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions