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: Separate properties and references in clientEval #3813

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

Conversation

pKallert
Copy link
Contributor

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:
Bildschirmfoto 2024-06-24 um 18 01 14

@github-actions github-actions bot added the 9.0 label Jun 24, 2024
@pKallert pKallert changed the title Feature/use references in client eval Feature: Separate properties and references in clientEval Jun 24, 2024
@github-actions github-actions bot added the Feature Label to mark the change as feature label Jun 24, 2024
@mhsdesign mhsdesign changed the title Feature: Separate properties and references in clientEval !!! FEATURE: Separate properties and references in clientEval Jun 25, 2024
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.

Nice one, thx @pKallert! 👍 by 👀

@pKallert pKallert requested a review from mhsdesign July 12, 2024 13:03
@mhsdesign
Copy link
Member

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 ^^

Copy link
Member

@mhsdesign mhsdesign left a comment

Choose a reason for hiding this comment

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

image

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

// 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));
}
or similar that relies on 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]);
Copy link
Member

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
9.0 Feature Label to mark the change as feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants