Replies: 1 comment
-
Agree on all counts +1 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It'd be awesome if Preview was made available in element slideouts.
In lieu of Matrix-in-Matrix, and particularly since slideouts were introduced in Craft 3.7, I've leaned pretty hard into the "entries as nested modular content" approach.
With nested entries and element cards in Craft 5.0, this approach to content modelling is likely only going to become more popular. This means that going forward, a lot more content editing is likely going to happen in slideouts.
Slideouts are great, and everybody loves them. The one thing they're missing, and pretty much the only thing that has been reported to me from clients as a frustration with the slideout AX, is that the slideouts offer no way for authors to preview work in progress.
In Craft 3 and 4, I've generally taken the care to add custom preview targets to all my "faux-nested entries" sections. In reality this has been almost meaningless work, since authors generally interface with this content via slideouts 90% of the time (opening a slideout entry in its dedicated entry page, just to access Preview, makes for a very disjointed workflow; nobody does that).
Adding Preview to slideouts for "bona fide" entries seems pretty straight-forward. If an entry belongs to a section, and that section has URLs and/or preview targets defined, Craft knows what to preview, and adding the "Preview" button at the top of the slideout modal should probably be doable?
Then there's Craft 5, which introduces a core concept of nested entries. From a previewing perspective, these entries are going to be even worse off than my faux-nested entries, since they won't be attached to a section and thus have no way of being previewed at all, outside of closing their slideout and opening the owner element's preview (again, a pretty disjointed workflow) (and, their dedicated edit pages won't have a preview).
I guess the primary problem w/ preview for nested entries is probably "how will Craft know what to render".
Element partial templates could potentially be surfaced as previews for nested entries – i.e. if an entry using an entry type that has a partial template, Craft has something to render for that element and a "preview" rendering that partial template could potentially be exposed.
In reality, I'm not sure if that approach is viable, as element partial templates might not always be developed to render "standalone".
Possibly the better option would be to basically treat entry types (and other field layout providers) as "sections light", adding a "Preview Targets" setting to them. This would enable developers to add previews to nested entries where appropriate and/or needed, with full flexibility in terms of what gets rendered; even making it possible to have multiple different preview targets for a single nested entry (I can think of the use cases for that!). This approach isn't as streamlined as simply rendering an element partial for the preview, and the setting might seem a little bit awkward for entry types specifically created for inline-editable Matrix fields (where preview for nested entries make less sense) – but I'll stop typing now :)
Beta Was this translation helpful? Give feedback.
All reactions