Flowpack / Flowpack.StructuredEditing

Structured Inline Editing for Neos CMS
GNU General Public License v3.0
25 stars 6 forks source link

Some experiement around a better Raw Content mode #2

Open dfeyer opened 6 years ago

dfeyer commented 6 years ago

For a current project we need to have a better Raw Content mode. I create this issue to follow my experiment, currently no code online. Need to refactor the project the make an decoupled package.

Current situation

Currently Raw Content mode only works for ContentCollection, and need some love to be really usable with advanced node types.

Goals

My current plan are to make it more flexible and convention based (UI, Fusion, ...), backed by a Fusion configuration to render any node types with a huge rendering flexibility, based on what @dimaip did with the StructuredEditing to edit property that are normally only accessible in the Inspector.

The current rendering of a content collection look like:

image

And a more advanced node type render like this:

neosstructurededitinggroupedproperty

Todos

dfeyer commented 6 years ago

image

image

Now the EditorEnveloppe is integrated, looks good

dimaip commented 6 years ago

@dfeyer maybe it makes sense to integrate those editors directly in the raw mode, without putting them into the dropdown?

dfeyer commented 6 years ago

@dfeyer maybe it makes sense to integrate those editors directly in the raw mode, without putting them into the dropdown?

To not loose the message I post on slack earlier. I think it depend for the use case and property type. In this case, maybe replace the pencil button of the EditorEnveloppe, by the action button of the image editor is the way to go. Currently I focus on the prototype of the backend rendering of the Raw Content mode. When that part is done, we can experiment a bit more with custom Editor or more smart UX choices.

I want the Raw Content mode to be fully customized in term of rendering (style, inline help, ...) and the rendering should be full fusion. So I'm a bit against the direct rendering of our Editor inline for this reason. But I full agree the the current duplicate image is awkward

dfeyer commented 6 years ago

Configuration of the rendering

We need a way to make the configuration of the Raw Content rendering easy. I'm currently experimenting with layout configuration in Settings.yaml. I use Ttree.Writer package as an experiment, so the configuration look like this:

Medialib.Core.Party:Document.Person:
  options:
    Ttree:Writer:
      layout:
        default:
          title:
            path: properties.title
          help:
            position: 'after title'
            path: Medialib.Core.Party:Help.Person
          biography:
            path: childNodes.biography
          image:
            path: childNodes.image
          main:
            path: childNodes.main
          birthDate:
            path: properties.birthDate
          birthPlace:
            path: properties.birthPlace
          deathDate:
            path: properties.deathDate
          deathPlace:
            path: properties.deathPlace
          nationality:
            path: properties.birthDate

Requirements

dfeyer commented 6 years ago

Made some progress on the automatic layout, my current experiment are available on the dev-master branch of https://github.com/ttreeagency/Writer

This is currently only tested on a big mono-repo application, and not fully working (only string property can be edited, ...) so a lots of job needs to be done, and I need to think about the UI again, need some improvements.