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

Nested element workflow improvements #16002

Merged

Conversation

brandonkelly
Copy link
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

Copy link

linear bot commented Nov 3, 2024

[ci skip]
@mark-reason
Copy link

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
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

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
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
Member Author

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

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.

2 participants