Skip to content

fix(app-headless-cms): fix dynamic zone template edit dialog and description overflow - #5564

Merged
Pavel910 merged 1 commit into
release/6.4.7from
fix/dynamic-zone-template-dialog-and-descriptions
Aug 7, 2026
Merged

fix(app-headless-cms): fix dynamic zone template edit dialog and description overflow#5564
Pavel910 merged 1 commit into
release/6.4.7from
fix/dynamic-zone-template-dialog-and-descriptions

Conversation

@Pavel910

@Pavel910 Pavel910 commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Fix: clicking Edit on a collapsed Dynamic Zone template accordion item now opens the edit dialog (previously only worked when the accordion was expanded)
  • Fix: long template descriptions in the "Insert a template" dialog no longer stretch the layout — list view wraps text, grid view clamps to 2 lines

Changes

  • DynamicZone.tsx — lift templateToEdit state here; render TemplateDialog outside the Accordion so it mounts regardless of accordion state
  • DynamicZoneTemplate.tsx — replace internal dialog state with onEditTemplate callback to parent; use defaultOpen instead of open so the accordion stays uncontrolled after parent re-renders
  • TemplateListItem.tsx — remove truncate from description to allow natural text wrapping in list view
  • TemplateGridItem.tsx — add line-clamp-2 to description to keep grid cards uniform

Test plan

  • Open content model editor with a Dynamic Zone field containing multiple templates
  • Collapse all accordion items, click Edit on any template — dialog should open
  • Accordion items expand/collapse normally by clicking the chevron
  • Open "Insert a template" dialog in list view — long descriptions wrap to multiple lines
  • Switch to grid view — long descriptions are clamped to 2 lines with ellipsis

…ription overflow

- Lift TemplateDialog state from DynamicZoneTemplate to DynamicZone parent
  so the edit dialog renders outside the Accordion and opens regardless of
  whether the accordion item is collapsed
- Use defaultOpen instead of open on Accordion.Item to keep it uncontrolled
  after parent re-renders
- Remove truncate from TemplateListItem description to allow text wrapping
  in list view
- Add line-clamp-2 to TemplateGridItem description to limit grid card
  height while still showing meaningful text
@Pavel910
Pavel910 merged commit b083d8c into release/6.4.7 Aug 7, 2026
15 of 16 checks passed
@Pavel910 Pavel910 self-assigned this Aug 7, 2026
@Pavel910 Pavel910 added this to the 6.4.7 milestone Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant