neos-ui icon indicating copy to clipboard operation
neos-ui copied to clipboard

WIP: Feature: switch to "special edit mode" for single content element

Open mhsdesign opened this issue 3 years ago • 1 comments

Description

This marks ofcouse already a solution to an issue, so its a thread about the implementation. The issue would be: How to make complex content fast editable / suited for the neos backend. Our thesis is, that one should have to switch to the rawContentMode, just to edit one more complex element.

integrate the idea of https://github.com/CarbonPackages/Carbon.CBD thanks to @jonnitto into the Neos Ui

sorry for the name "special mode" but it is special ;) And WIP.

Problems & Solutions:

rawContentMode as fallback for CEs if no custom special rendering defined https://github.com/neos/neos-development-collection/pull/3767 -> needs to be not affected by the general css on the page -> use shadow dom -> but what if a content collection is rendered in rawContentMode and the children in special custom mode (depending on global css?) -> is this possible to switch back to global css context from within a shadow dom maybe slots? -> or do we not need shadow dom and hope that styles dont interfere to much?

-> when out of band rendering contents, they need to signal somehow that they are in special mode? can we hijack the ContentCase with a condition that checks for node.context.editMode == "specialMode" or similar? Note that changing the edit mode is done in the session and not supposed to be on per node basis: see also link

-> children of an upper element that was changed to special content mode should also be rendered in special mode even when reloadIfChanged

-> the option if an element should be editable in special mode should be adjustable by the integrator in the nodeType

mhsdesign avatar Jul 20 '22 10:07 mhsdesign

If the node has the needed props or children, show live view per default. (and show edit button) CleanShot 2022-07-20 at 12 50 42@2x

After the user clicked on the edit button, show editable content (In this case a content collection) Also show the live button. In Carbon.CBD, the window get reloaded on click CleanShot 2022-07-20 at 12 51 34@2x

If not all requirements are met, show an message: CleanShot 2022-07-20 at 12 52 14@2x

jonnitto avatar Jul 20 '22 10:07 jonnitto