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

Feature: Version 2.x reintroduce disabling nodes (_hidden=true) #55

Open
wants to merge 3 commits into
base: 2.0
Choose a base branch
from

Conversation

mhsdesign
Copy link
Contributor

@mhsdesign mhsdesign commented Jun 7, 2023

With pr the functionality to set internal node properties via _foo property syntax, which was introduced with was reverted. This was done in preparation for the Neos 9 ESCR to be forwards compatible.

The most requested internal property properties._hidden is now available via tags.disabled.
- The idea of tags is back-ported from Neos 9 where the Node will be tagged as disabled or possibly a custom value. See SubtreeTags. Naturally Neos 8.3 can only support the disabled/hidden case and thus other values will throw an exception.
- The name shift from hidden to disabled was done to adjust to the naming of the new ESCR. See explanation.

This is WIP as the naming of using hidden vs disabled is not 100% clear yet. Thats why this was omitted from the Version2 release but once we find a solution we will release a new version with support for this.

Discussion: neos/neos-development-collection#4312

'Flowpack.NodeTemplates:Content.Disabled':
   superTypes:
     'Neos.Neos:Content': true
   options:
     template:
       tags:
         disabled: true
       properties:
         someProperty: "value"

Regarding the naming of the new option tags. The term is already partly overloaded and could be mistaken but the reasoning was to align it with the new Neos 9 Api. While more explicit we decided against subtreetags as this term is only used in the cr-write-side and thus more low-level and less know by the integrator. The name tags as in Node::$tags (see NodeTags) will be part of the Neos 9 API and hopefully a known and understood concept by the user.

https://github.com/neos/neos-development-collection/blob/f640f70321f6a96837dbea86ce1d11c72368c924/Neos.ContentRepository.Core/Classes/Projection/ContentGraph/Node.php#L128

see also voting: #55 (comment)

@mhsdesign mhsdesign marked this pull request as ready for review June 7, 2023 15:22
@mhsdesign mhsdesign changed the title Feature: Version 2.1 reintroduce hidden or disabled nodes Feature: Version 2.x reintroduce hidden or disabled nodes Jul 4, 2023
@mhsdesign
Copy link
Contributor Author

With the introduction of subtreetags in Neos9 we could also introduce a subtreetags option but as disabled is a core concept we should probably expose it on a higher level:

'Flowpack.NodeTemplates:Content.Hidden':
   superTypes:
     'Neos.Neos:Content': true
   options:
     template:
       disabled: true
       # alternative
       subtreetags:
         disabled: true
       properties:
         someProperty: "value"

@mhsdesign mhsdesign force-pushed the feature/reintroduceHiddenOrDisabledNodes branch from 0f95072 to 9a6933b Compare June 22, 2024 18:08
@mhsdesign mhsdesign changed the title Feature: Version 2.x reintroduce hidden or disabled nodes Feature: Version 2.x reintroduce disabling nodes (_hidden=true) Jun 22, 2024
@mhsdesign mhsdesign force-pushed the feature/reintroduceHiddenOrDisabledNodes branch from 9a6933b to 4ed8487 Compare June 22, 2024 18:12
- introduce $showDisabledNodesInSubgraph in tests to show disabled created nodes
- introduce `NodeMutator::setDisabled`
- updated all snapshots to include `"disabled": false,`
@mhsdesign mhsdesign force-pushed the feature/reintroduceHiddenOrDisabledNodes branch from 4ed8487 to c682516 Compare June 22, 2024 18:21
@mhsdesign
Copy link
Contributor Author

mhsdesign commented Jun 29, 2024

I started a voting in slack regarding the syntax:

option1 1️⃣, first level disabled (no support for custom subtreetags)

'Vendor.Site:Content':
   options:
     template:
       disabled: true
       properties:
         foo: 'bar'

option2 2️⃣, nested tags , to also allow custom SubtreeTags in Neos9

'Vendor.Site:Content':
   options:
     template:
       tags:
         disabled: true
         # blog: true
       properties:
         foo: 'bar'

option3 3️⃣ , allow both tags and disabled: true first level (basically option1 and option2 combined)


we voted with 6 votes for option2 2️⃣

…ee tags and allow `tags.disabled` in Neos 8.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant