kirby icon indicating copy to clipboard operation
kirby copied to clipboard

List field values in structure preview are not truncated

Open foxacid opened this issue 1 year ago • 2 comments

Description

Structure field previews are usually truncated to save space. There's a regression in V4 causing list fields not to be truncated anymore. Instead all content is displayed.

image

Blueprint:


formats:
  type: structure
  fields:
    image: fields/image
    name:
      type: text
    description:
      type: textarea
    features:
      type: list
    platforms:
      type: text
    preview:
      type: url
    details:
      type: pages
      max: 1
      query: site.childrenAndDrafts

foxacid avatar Nov 29 '23 19:11 foxacid

What would be our expected case here: only show the first bullet item and truncate it with ellipsis?

distantnative avatar Jan 15 '24 19:01 distantnative

My suggestion is would that merge all bullets with comma (via striping html tags each bullet) and then truncate the string as single line:

- First
- Second
- Third
- Fourth

First, Second, Third, Fo..

afbora avatar Jul 04 '24 20:07 afbora