neos-development-collection icon indicating copy to clipboard operation
neos-development-collection copied to clipboard

Consistent node type behavior regarding property unset and child node unset

Open mhsdesign opened this issue 2 years ago • 1 comments

As shown here (by the new tests) https://github.com/neos/neos-development-collection/pull/4620 node property unset via ~ does not work but is silently ignored.

Some.NodeType:
  superTypes:
    Some.SuperNodeType: true
  properties:
    inheritedProperty: ~ # noop

instead its only possible to change the type or set it to hidden. A shortcut for this would be:

Some.NodeType:
  superTypes:
    Some.SuperNodeType: true
  properties:
    inheritedProperty: {}

see https://github.com/neos/neos-development-collection/pull/4620#discussion_r1360407119 we are not sure if we like that one can change the type of a property or disable it in the inspector but its possible.


in contraire, unsetting a child node is allowed:

Some.NodeType:
  superTypes:
    Some.SuperNodeType: true
  childNodes:
    main: ~

mhsdesign avatar Nov 10 '23 11:11 mhsdesign

me and @kitsunet discussed in the weekly that unsetting to null should in both cases throw an error.

about changing property types: i guess it would be cool to only allow type narrowing but i guess this is out of scope.

mhsdesign avatar Nov 10 '23 12:11 mhsdesign