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

[5.x]: Live Preview behaviour for nested matrix entries is inconsistent, depending on the matrix field's view mode #16039

Closed
realjoshharrison opened this issue Nov 7, 2024 · 3 comments
Labels

Comments

@realjoshharrison
Copy link

What happened?

Description

Changes to a matrix field's nested entries are inconsistently reflected in live preview, depending on a matrix field's view mode.

When the view mode is set to Inline-Editable Blocks, changes to nested entries are reflected in live preview as you would expect.

When a matrix field's view mode is Cards or Element Index, live preview behaves differently, and requires the edited nested entry to be saved (ie published live) to see changes. However they're not really being previewed, as they are now published live, perhaps unexpectedly when the intention was to preview.

If you just click Close on the nested entry instead of Save, a draft is created, but the draft content isn't reflected on the Live Preview either.

As the functionality exists to display nested entries in live preview as per Inline-Editable Blocks, I wondered if it would be possible to extend this to the other two view modes?

Thanks for considering!

Steps to reproduce

  1. Set up an entry with a template for live previewing. Give it a matrix field, with its view mode set to Cards or Element Index.
  2. Edit the entry in live preview, making changes to one of the nested matrix entries.
  3. Changes are not shown on the live preview without saving the nested entry.
  4. Change the matrix field's view mode to Inline-Editable Blocks
  5. Edit again, and observe that changes are visible in live preview without saving.

Expected behavior

Workflow for previewing and publishing content to be consistent, regardless of view mode.

Actual behavior

Changes made in live preview can only be seen when the view mode is Inline-Editable Blocks. Changes need to be saved to preview when the view mode is Cards or Element Index.

Craft CMS version

Craft Solo 5.4.10

PHP version

8.2.22

Operating system and version

Linux 6.10.11-linuxkit

Database type and version

MySQL 8.0.36

Image driver and version

Imagick 3.7.0 (ImageMagick 6.9.11-60)

Installed plugins and versions

  • CKEditor 4.3.1
  • CP Field Inspect 2.0.2
@i-just
Copy link
Contributor

i-just commented Nov 7, 2024

Hi, thanks for getting in touch! This was previously reported in #15713.

We’ve made some improvements to the nested element workflow in 5.5. With those changes, when you save the matrix entry (where the matrix field is in the cards view mode), those changes won’t go live immediately, and the same applies when editing via Live Preview.

That said, we will discuss this further internally.

@realjoshharrison
Copy link
Author

Ah sorry, I misunderstood that other issue as only relating to status fields.

Great to hear there's a planned adjustment! Thanks as ever @i-just 😊

@brandonkelly
Copy link
Member

Craft 5.5.0 is out with the changes in #16002, which drastically improves the Live Preview experience, as @i-just mentioned. Live Preview won’t update as you type within the nested entry slideout, but it will update once you press Save.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants