-
-
Notifications
You must be signed in to change notification settings - Fork 137
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: Replace usage of Neos.Node.inBackend(node)
#3571
Conversation
Neos.Node.inBackend(node)
with Neos.Backend.isEditMode(request) || Neos.Backend.isPreviewMode(request)
Neos.Node.inBackend(node)
Neos.Node.inBackend(node)
Neos.Node.inBackend(node)
….isEditMode(request) || Neos.Backend.isPreviewMode(request)`
0d7337d
to
57a5bc1
Compare
even if this is more explicit, i wonder if its enough to either A: mostly use |
@mhsdesign i think asking for "are you edit or preview mode" is much more explicit. I also thought about a separate inBackend method that returns (self::isEditMode(request) || self::isPreviewMode()) but abstained for now as i do not like the semantic of inBackend as beeing either edit or preview. BTW: The previous semantic of Neos.Node.inBackend was even worse as it only checked that the node was not live. |
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 was able to test this successfully with #3571.
I included this change over there.
I'm not sure how to go about this. This PR cannot be merged without neos/neos-development-collection#4067 over at neos-development-collection
having been merged first. neos/neos-development-collection#4067 however cannot be merged without further changes in the UI (see: ce395ca).
I would therefore suggest to close this PR in favor of #3571.
Close this here as this needs to be redone. |
Resolves partly neos/neos-development-collection#4396
This pr replaces usage of
Neos.Node.inBackend(node)
which is removed here neos/neos-development-collection#4067 withNeos.Backend.isEditMode(request) || Neos.Backend.isPreviewMode(request)
To verify you can run the ui with the branch neos/neos-development-collection#4067 be aware that the changes to adjust the ui to the separation of the edit and preview endpoints are not part of this pr.