Skip to content

fix: enable save button when re-ordering components or dynamic zones#25959

Merged
mathildeleg merged 2 commits intodevelopfrom
fix/drag-and-drop-save
Apr 13, 2026
Merged

fix: enable save button when re-ordering components or dynamic zones#25959
mathildeleg merged 2 commits intodevelopfrom
fix/drag-and-drop-save

Conversation

@mathildeleg
Copy link
Copy Markdown
Contributor

@mathildeleg mathildeleg commented Apr 8, 2026

What does it do?

This PR resolves two issues in the Configure the View page:

  1. Re-ordering components or dynamic zones didn't trigger the enabling of the Save button, despite the layout having changed.
  2. Inability to drop an element not full-width as the first row of the layout.

Why is it needed?

When updating the layout of a content-type, by moving a field type Component or Dynamic Zone, the "Save" button was disabled, not allowing users to save their new layout.
BEFORE
https://github.com/user-attachments/assets/f57d9bb0-f340-44a2-a2e2-2370628132d7

AFTER
https://github.com/user-attachments/assets/8b0f1c21-1e96-4a18-870f-bb5fc12b91df

When updating the layout of a content-type, we couldn't drop an element of width smaller than 100% above the first row where the element has the full width, only in the row below.
BEFORE
https://github.com/user-attachments/assets/73ab303a-65bc-4bea-afce-698f001e23fa

AFTER
https://github.com/user-attachments/assets/a4071c9b-e3d7-48a5-9631-a23fc5a273c9

How to test it?

  • Create a content type with at least one component or dynamic zone + a text field.
  • Go to the "Configure the view" page for that component.
  • Drag the component or dynamic zone and drop it in another spot in the layout.
    => The "Save" button should be enabled, allowing you to save your new layout.
  • Create content type with at least two Text fields.
  • Go to the "Configure the view" page for that component.
  • Make the first Text field in the layout full width (100%) and the other 50%.
  • Drag the 50% field and drop it above the 100% field.
  • The layout should now be: 50% field on the first row, 100% on the second row.

Related issue(s)/PR(s)

Fixes #23161
Closes CMS-574

@mathildeleg mathildeleg added this to the 5.42.1 milestone Apr 8, 2026
@mathildeleg mathildeleg requested review from Adzouz and markkaylor April 8, 2026 15:53
@mathildeleg mathildeleg self-assigned this Apr 8, 2026
@mathildeleg mathildeleg added source: core:content-manager Source is core/content-manager package pr: fix This PR is fixing a bug labels Apr 8, 2026
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 8, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
contributor-docs Ready Ready Preview, Comment Apr 9, 2026 1:01pm

Request Review

@trunk-io
Copy link
Copy Markdown

trunk-io Bot commented Apr 8, 2026

Static BadgeStatic BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

@santicros
Copy link
Copy Markdown

Doing some manual testing, it is solving the issue of not being able to save correctly for me :)

Copy link
Copy Markdown
Contributor

@markkaylor markkaylor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, looks good to me. Tested 🎈

@mathildeleg mathildeleg merged commit f2c18e8 into develop Apr 13, 2026
104 of 109 checks passed
@mathildeleg mathildeleg deleted the fix/drag-and-drop-save branch April 13, 2026 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: fix This PR is fixing a bug source: core:content-manager Source is core/content-manager package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Drag&Drop broken in Configure View

3 participants