-
-
Notifications
You must be signed in to change notification settings - Fork 135
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: Separate properties and references in clientEval #3813
base: 9.0
Are you sure you want to change the base?
Conversation
FIX: Remove unneeded reference properties Co-authored-by: Marc Henry Schultz <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice one, thx @pKallert! 👍 by 👀
Looks good sofar but ill have to try this out ;) It seems that with the transientValues we still mix properties and references but that seems sensible ^^ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think i found a bug: the neos ui doesnt notice the deletion of a reference property. It will show up again after hitting apply.
this could be related to logic like this
neos-ui/packages/neos-ui-sagas/src/Changes/index.js
Lines 28 to 38 in 60262de
// We immediately optimistically update node properties in state, before sending the persist request | |
const propertyChanges = action.payload.changes | |
.filter(change => change.type === 'Neos.Neos.Ui:Property') | |
.map(change => ({ | |
subject: change.subject, | |
propertyName: change.payload.propertyName, | |
value: change.payload.value | |
})); | |
if (propertyChanges.length > 0) { | |
yield put(actions.CR.Nodes.changeProperty(propertyChanges)); | |
} |
node.properties
@@ -67,8 +67,7 @@ export default class InspectorEditorEnvelope extends PureComponent { | |||
// | |||
// nodeType needs to be read directly from node | |||
// | |||
const sourceValueRaw = id === '_nodeType' ? node?.nodeType : node?.properties?.[id]; | |||
const sourceValue = sourceValueRaw; | |||
const sourceValue = id === '_nodeType' ? node?.nodeType : (node?.references?.[id] ? node?.references?.[id] : node?.properties?.[id]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
its a bit random that the source value is fetched here inside the component and not from the outside ... are there other places like this?
What I did
As discussed in neos/neos-development-collection#5156 references should be available separately in ClientEval
How I did it
I adjusted the logic for loading data for the right sidebar to be separated into properties and references.
depends on #3810
How to verify it
Use ClientEval:console.log(node) in the right to see that references are no longer in the properties array but now their separate item: