Skip to content

Nested element workflow improvements#16002

Merged
brandonkelly merged 2 commits into5.5from
feature/cms-1280-nested-entry-workflow-improvements
Nov 4, 2024
Merged

Nested element workflow improvements#16002
brandonkelly merged 2 commits into5.5from
feature/cms-1280-nested-entry-workflow-improvements

Conversation

@brandonkelly
Copy link
Copy Markdown
Member

@brandonkelly brandonkelly commented Nov 3, 2024

Description

When saving a nested element within a Matrix/Addresses field in card view, the changes are now saved to a draft of the owner element, rather than published immediately. The changes won’t actually go live until the owner element is saved. If the draft is discarded, the changes will be discarded too.

Nested element cards that contain unpublished edits identify themselves with a blue modified indicator. (Newly-added nested elements have a similar indicator too, now.)

CleanShot.2024-11-03.at.10.51.00.mp4

This only affects Matrix/Addresses fields in cards view. Decided to keep element index view working as-is, since that view is more obviously dealing with separate elements that aren’t really “part of” the owner element’s content, like card view is.

CKEditor will be updated for consistency with these changes, as well.

Related issues

@linear
Copy link
Copy Markdown

linear Bot commented Nov 3, 2024

[ci skip]
@mark-reason
Copy link
Copy Markdown

I'm still having the same issue on version 5.5.2.

You can see the difference in the following videos. The first has the field set as an inline editable block and the draft changes are reflected in the preview, however in the second video I've got the field set as a card but the changes don't show until I click save at which point they are now published.

Screen.Recording.2024-11-27.at.16.04.08.mov
Screen.Recording.2024-11-27.at.16.07.27.mov

@brandonkelly
Copy link
Copy Markdown
Member Author

@mark-reason It’s expected that Live Preview won’t reflect your changes until you press Save, however the change in 5.5.0 is supposed to be that pressing Save doesn’t actually publish the changes immediately. The only known exception to that is when editing an element type that doesn’t support drafts, like global sets. What is the parent element type you’re editing here?

@mark-reason
Copy link
Copy Markdown

It was a matrix field within an entry type. It definitely looks to be publishing the changes straight away, see the video with graphql query after.

Screen.Recording.2024-11-28.at.15.mp4

@brandonkelly
Copy link
Copy Markdown
Member Author

@mark-reason Doh, looks like it only worked when you open the editor slideout by double-clicking on the card. I never tested going through the “Edit” action menu item.

Fixed for the next release via cf41c5f.

@brandonkelly
Copy link
Copy Markdown
Member Author

@mark-reason Craft 5.5.4 is out with that fix. Thanks again!

@Michael-Paragonn
Copy link
Copy Markdown

Michael-Paragonn commented Apr 10, 2025

@brandonkelly I see you mention both the cards view and the element index view; what about the inline-editable blocks view?
image

(EDIT: Posted a separate issue here)

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.

3 participants