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

summary ignored for object in list using types #62

Closed
frankbits opened this issue Oct 10, 2023 · 3 comments
Closed

summary ignored for object in list using types #62

frankbits opened this issue Oct 10, 2023 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@frankbits
Copy link

frankbits commented Oct 10, 2023

- name: "components"
  label: "Components"
  label_singular: "Component"
  widget: list
  collapsed: true
  summary: "{{fields.text}}" //gets used for all types
  types:
  - name: "text"
    label: "Text"
    widget: object
    collapsed: true
    summary: "{{fields.text}}" //gets ignored (regardless of "list-summary")
    fields:
    - { name: "group", label: "Group", widget: "number", default: "0", hint: "Grouping of components" }
    - { name: "top", label: "Top", widget: number, default: "0", hint: "Top-offset (-48 to unset row-gap)" }
    - { name: "column_count", label: "columnCount", widget: number, default: "1", hint: "Number of columns text should be in." }
    - { label: "Text", label_singular: "Text", name: "text", widget: markdown }

I have to show different summaries based on the type of content. (text, image, ...)

@kyoshino
Copy link
Member

I’ve realized that my client’s setup has the same (or similar) issue. It also doesn’t work with the relation widget. (I’m aware of the same issue in Decap/Netlify CMS, though the codebase is totally different.) I’ll rewrite the summary support.

@kyoshino kyoshino self-assigned this Oct 10, 2023
@kyoshino kyoshino added the bug Something isn't working label Oct 10, 2023
@kyoshino
Copy link
Member

kyoshino commented Oct 10, 2023

In this case,

summary: "{{fields.text}}" //gets used for all types

is supposed to be ignored, but

    summary: "{{fields.text}}" //gets ignored (regardless of "list-summary")

has to work properly, just like an example in the Decap doc.

@kyoshino
Copy link
Member

The fix has been deployed. Thanks for your report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants