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

TASK: Adjust to changes in Neos removing internal node properties #3735

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

Conversation

kitsunet
Copy link
Member

@kitsunet kitsunet commented Mar 7, 2024

@kitsunet
Copy link
Member Author

kitsunet commented Mar 7, 2024

linting seems again unrelated :/

@kitsunet
Copy link
Member Author

These errors seem unrelated

Copy link
Contributor

@grebaldi grebaldi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @kitsunet,

I ran E2E tests locally and did some manual testing on disabled-state, and hiddenInMenu stuff. Works perfectly 👍

@grebaldi
Copy link
Contributor

Oh, and also: phpstan is green locally

'_hidden' => $node->tags->contain(SubtreeTag::fromString('disabled')),
'_hiddenInIndex' => $node->getProperty('_hiddenInIndex'),
// TODO: we should export this correctly named, but that needs changes throughout the JS code as well.
'_hidden' => $node->tags->withoutInherited()->contain(SubtreeTag::disabled()),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah i see nice fix here ;) this is currently broken as nodes are always shown as explicitly hidden

Comment on lines +185 to +187
// !!! REMEMBER: we are not allowed to use $node anymore,
// because it may have been modified by the commands above.
// Thus, we need to re-fetch it (as a workaround; until we do not need this anymore)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// !!! REMEMBER: we are not allowed to use $node anymore,
// because it may have been modified by the commands above.
// Thus, we need to re-fetch it (as a workaround; until we do not need this anymore)
// We have to refetch the Node after modifications because its a read-only model
// These 'Change' classes have been designed with mutable Neos < 9 Nodes and thus this might seem hacky
// When fully redesigning the Neos Ui php integration this will fixed

Comment on lines +172 to +173
$propertyName === '_nodeType' => $this->handleNodeTypeChange($workspace, $subject, $propertyName),
$propertyName === '_hidden' => $this->handleHiddenPropertyChange($workspace, $subject, $propertyName),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$propertyName === '_nodeType' => $this->handleNodeTypeChange($workspace, $subject, $propertyName),
$propertyName === '_hidden' => $this->handleHiddenPropertyChange($workspace, $subject, $propertyName),
// todo create custom 'changes' for these special cases
// we continue to use the underscore logic in the Neos Ui code base as the JS-client code works this way
$propertyName === '_nodeType' => $this->handleNodeTypeChange($workspace, $subject, $propertyName),
$propertyName === '_hidden' => $this->handleHiddenPropertyChange($workspace, $subject, $propertyName),

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants