-
-
Notifications
You must be signed in to change notification settings - Fork 223
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
9.0: Edit Preview Mode Support #4086
Comments
Related Issues
|
At todays Neos 9 weekly we came up with the following suggestions:
|
I thought we discussed that one needs to set the TODO: document why we decided against ...
TODO
|
Hmm after thinking about this again - im sure that passing the edit preview mode somehow to the runtime via #4425 is the correct way, but i have concerns about it being passed as eel helper. First of all anyone actually wanting to understand fusion at a deeper level, will be first confused that the helper A second thing is, that sometimes one wants to pass the ui mode to an eel helper, or as a fusion object property. Now one must actually pass the whole helper (which works but is super strange) or we have to call methods like
To me it makes more sense to name it like a "normal" context variable and dont pretend its an helper. like:
A third thing would be how to use the RuntimeFactory. In the case of having a nested helper one needs to created a nested array: $this->runtimeFactory->createFromConfiguration(
$fusionConfiguration,
FusionDefaultContextVariables::fromArray(["Neos" => ["UiMode" => $uiModeHelper], "request" => $request])
) it would feel much more natural to just do this: $this->runtimeFactory->createFromConfiguration(
$fusionConfiguration,
FusionDefaultContextVariables::fromArray(["uiMode" => $uiMode, "request" => $request])
) |
@skurfuerst wrote on Slack:
I have the same gut feeling, and re:
That might be confusing indeed, but is IMO just an issue of the overlapping concepts in general.
IMO that mode should never be passed around in the first place to avoid the feeling that this value is allowed to change in other prototype levels etc. So instead of
I would strongly encourage do translate the actual mode to something more contextual relevant, for example:
(please imagine a better example) |
I also think it is weird that the value "UiMode" would appear magically below "Neos" and that this value has state where others default helpers usually do not have that. I remember us doing quite a bit of work to convert q from a magic value to a function that is visible in the settings to be able to explain where this comes from. If we have to change this at a later point migrating from "UiMode.isEdit()" is just as easy to migrate as
We change Maybe we should think more about @cache.context rather than the fusion-runtime context. It is possible we are trying to mount this horse from the wrong side. |
i dont see how a user would expect an eel helper with state as more natural than another context variable. And actually currently "request" is not much expected for fusion users unlike "node", as its also currently just magically present - we just need a documentation of "always there" runtime default context variables like "request" and the upcoming "uiMode".
we could do this but then we would need to unset this at a wrong place (the runtime factory should not know about it, as this would be a
Are you rethinking the approach to make it a "normal" context variable via
But even if we wouldnt have those limitations, @skurfuerst argued, that the "uiMode" would be better of like a variable like "request" which is magically reached backdoors than have it conceptional in the fusion runtime variables (where it could also be unset) |
Fyi initially the To solve this @kitsunet made the 95ad8e1#diff-61be780dafcd0a3d9838012d82db9bd15c74a18ec5cc9fd2ef768ba07307be93L581
aditonally pushing the |
Since nodes have no context in Neos 9 the edit preview mode cannot be decided by asking the node any more. This change renovates the `UserInterfaceMode` and the `UserInterfaceModeService` to use php 8 value objects. The UserInterfaceMode object is then added as globalValue `userInterfaceMode` to the `Neos\Neos\FusionView`. The uses of the following fusion expressions have to be adjusted as follows: - `node.context.live` - `userInterfaceMode.isLive` - `node.context.currentRenderingMode.edit` - `userInterfaceMode.isEditMode` - `node.context.currentRenderingMode.preview` - `userInterfaceMode.isPreviewMode` - `node.context.currentRenderingMode.name` - `userInterfaceMode.name` Resolves: #4086
Since nodes have no context in Neos 9 the edit preview mode cannot be decided by asking the node any more. This change renovates the `UserInterfaceMode` and the `UserInterfaceModeService` to use php 8 value objects. The UserInterfaceMode object is then added as globalValue `userInterfaceMode` to the `Neos\Neos\FusionView`. The uses of the following fusion expressions have to be adjusted as follows: - `node.context.live` - `userInterfaceMode.isLive` - `node.context.currentRenderingMode.edit` - `userInterfaceMode.isEditMode` - `node.context.currentRenderingMode.preview` - `userInterfaceMode.isPreviewMode` - `node.context.currentRenderingMode.name` - `userInterfaceMode.name` Resolves: #4086
Since nodes have no context in Neos 9 the edit preview mode cannot be decided by asking the node any more. This change renovates the `UserInterfaceMode` and the `UserInterfaceModeService` to use php 8 value objects. The UserInterfaceMode object is then added as globalValue `userInterfaceMode` to the `Neos\Neos\FusionView`. The uses of the following fusion expressions have to be adjusted as follows: - `node.context.live` - `userInterfaceMode.isLive` - `node.context.currentRenderingMode.edit` - `userInterfaceMode.isEditMode` - `node.context.currentRenderingMode.preview` - `userInterfaceMode.isPreviewMode` - `node.context.currentRenderingMode.name` - `userInterfaceMode.name` Resolves: #4086
Since nodes have no context in Neos 9 the edit preview mode cannot be decided by asking the node any more. This change renovates the `UserInterfaceMode` and the `UserInterfaceModeService` to use php 8 value objects. The UserInterfaceMode object is then added as globalValue `userInterfaceMode` to the `Neos\Neos\FusionView`. The uses of the following fusion expressions have to be adjusted as follows: - `node.context.live` - `userInterfaceMode.isLive` - `node.context.currentRenderingMode.edit` - `userInterfaceMode.isEditMode` - `node.context.currentRenderingMode.preview` - `userInterfaceMode.isPreviewMode` - `node.context.currentRenderingMode.name` - `userInterfaceMode.name` Resolves: #4086
Since nodes have no context in Neos 9 the edit preview mode cannot be decided by asking the node any more. This change renovates the `UserInterfaceMode` and the `UserInterfaceModeService` to use php 8 value objects. The UserInterfaceMode object is then added as globalValue `userInterfaceMode` to the `Neos\Neos\FusionView`. The uses of the following fusion expressions have to be adjusted as follows: - `node.context.live` - `userInterfaceMode.isLive` - `node.context.currentRenderingMode.edit` - `userInterfaceMode.isEditMode` - `node.context.currentRenderingMode.preview` - `userInterfaceMode.isPreviewMode` - `node.context.currentRenderingMode.name` - `userInterfaceMode.name` Resolves: #4086
Since nodes have no context in Neos 9 the edit preview mode cannot be decided by asking the node any more. This change renovates the `UserInterfaceMode` and the `UserInterfaceModeService` to use php 8 value objects. The UserInterfaceMode object is then added as globalValue `userInterfaceMode` to the `Neos\Neos\FusionView`. The uses of the following fusion expressions have to be adjusted as follows: - `node.context.live` - `userInterfaceMode.live` - `node.context.currentRenderingMode.edit` - `userInterfaceMode.edit` - `node.context.currentRenderingMode.preview` - `userInterfaceMode.preview` - `node.context.currentRenderingMode.name` - `userInterfaceMode.name` Resolves: #4086
Since nodes have no context in Neos 9 the edit preview mode cannot be decided by asking the node any more. This change renovates the `UserInterfaceMode` and the `UserInterfaceModeService` to use php 8 value objects. The UserInterfaceMode object is then added as globalValue `userInterfaceMode` to the `Neos\Neos\FusionView`. The uses of the following fusion expressions have to be adjusted as follows: - `node.context.live` - `userInterfaceMode.live` - `node.context.currentRenderingMode.edit` - `userInterfaceMode.edit` - `node.context.currentRenderingMode.preview` - `userInterfaceMode.preview` - `node.context.currentRenderingMode.name` - `userInterfaceMode.name` Resolves: #4086
Since nodes have no context in Neos 9 the edit preview mode cannot be decided by asking the node any more. This change renovates the `UserInterfaceMode` and the `UserInterfaceModeService` to use php 8 value objects. The UserInterfaceMode object is then added as globalValue `userInterfaceMode` to the `Neos\Neos\FusionView`. The uses of the following fusion expressions have to be adjusted as follows: - `node.context.live` - `userInterfaceMode.live` - `node.context.currentRenderingMode.edit` - `userInterfaceMode.edit` - `node.context.currentRenderingMode.preview` - `userInterfaceMode.preview` - `node.context.currentRenderingMode.name` - `userInterfaceMode.name` Resolves: neos#4086
Since nodes have no context in Neos 9 the edit preview mode cannot be decided by asking the node any more. This change renovates the `UserInterfaceMode` and the `UserInterfaceModeService` to use php 8 value objects. The UserInterfaceMode object is then added as globalValue `userInterfaceMode` to the `Neos\Neos\FusionView`. The uses of the following fusion expressions have to be adjusted as follows: - `node.context.live` - `userInterfaceMode.live` - `node.context.currentRenderingMode.edit` - `userInterfaceMode.edit` - `node.context.currentRenderingMode.preview` - `userInterfaceMode.preview` - `node.context.currentRenderingMode.name` - `userInterfaceMode.name` Resolves: #4086
Since nodes have no context in Neos 9 the edit preview mode cannot be decided by asking the node any more. This change renovates the `UserInterfaceMode` and the `UserInterfaceModeService` to use php 8 value objects. The UserInterfaceMode object is then added as globalValue `userInterfaceMode` to the `Neos\Neos\FusionView`. The uses of the following fusion expressions have to be adjusted as follows: - `node.context.live` - `userInterfaceMode.isLive` - `node.context.currentRenderingMode.edit` - `userInterfaceMode.isEdit` - `node.context.currentRenderingMode.preview` - `userInterfaceMode.isPreview` - `node.context.currentRenderingMode.name` - `userInterfaceMode.name` Resolves: neos#4086
Since nodes have no context in Neos 9 the edit preview mode cannot be decided by asking the node any more. This change renovates the `UserInterfaceMode` and the `UserInterfaceModeService` to use php 8 value objects. The UserInterfaceMode object is then added as globalValue `userInterfaceMode` to the `Neos\Neos\FusionView`. The uses of the following fusion expressions have to be adjusted as follows: - `node.context.live` - `userInterfaceMode.isLive` - `node.context.currentRenderingMode.edit` - `userInterfaceMode.isEdit` - `node.context.currentRenderingMode.preview` - `userInterfaceMode.isPreview` - `node.context.currentRenderingMode.name` - `userInterfaceMode.name` Resolves: #4086
Since nodes have no context in Neos 9 the edit preview mode cannot be decided by asking the node any more. This change renovates the `UserInterfaceMode` and the `UserInterfaceModeService` to use php 8 value objects. The UserInterfaceMode object is then added as globalValue `userInterfaceMode` to the `Neos\Neos\FusionView`. The uses of the following fusion expressions have to be adjusted as follows: - `node.context.live` - `userInterfaceMode.isLive` - `node.context.currentRenderingMode.edit` - `userInterfaceMode.isEdit` - `node.context.currentRenderingMode.preview` - `userInterfaceMode.isPreview` - `node.context.currentRenderingMode.name` - `userInterfaceMode.name` Resolves: #4086
Since nodes have no context in Neos 9 the edit preview mode cannot be decided by asking the node any more. This change renovates the `UserInterfaceMode` and the `UserInterfaceModeService` to use php 8 value objects. The UserInterfaceMode object is then added as globalValue `userInterfaceMode` to the `Neos\Neos\FusionView`. The uses of the following fusion expressions have to be adjusted as follows: - `node.context.live` - `userInterfaceMode.isLive` - `node.context.currentRenderingMode.edit` - `userInterfaceMode.isEdit` - `node.context.currentRenderingMode.preview` - `userInterfaceMode.isPreview` - `node.context.currentRenderingMode.name` - `userInterfaceMode.name` Resolves: #4086
Since nodes have no context in Neos 9 the edit preview mode cannot be decided by asking the node any more. This change renovates the `UserInterfaceMode` and the `UserInterfaceModeService` to use php 8 value objects. The UserInterfaceMode object is then added as globalValue `userInterfaceMode` to the `Neos\Neos\FusionView`. The uses of the following fusion expressions have to be adjusted as follows: - `node.context.live` - `userInterfaceMode.isLive` - `node.context.currentRenderingMode.edit` - `userInterfaceMode.isEdit` - `node.context.currentRenderingMode.preview` - `userInterfaceMode.isPreview` - `node.context.currentRenderingMode.name` - `userInterfaceMode.name` Resolves: neos#4086
Since nodes have no context in Neos 9 the edit preview mode cannot be decided by asking the node any more. This change renovates the `UserInterfaceMode` and the `UserInterfaceModeService` to use php 8 value objects. The UserInterfaceMode object is then added as globalValue `userInterfaceMode` to the `Neos\Neos\FusionView`. The uses of the following fusion expressions have to be adjusted as follows: - `node.context.live` - `!renderingMode.isEdit` - `node.context.currentRenderingMode.edit` - `renderingMode.isEdit` - `node.context.currentRenderingMode.preview` - `renderingMode.isPreview` - `node.context.currentRenderingMode.name` - `renderingMode.name` Resolves: neos#4086
Since nodes have no context in Neos 9 the edit preview mode cannot be decided by asking the node any more. This change renovates the `UserInterfaceMode` and the `UserInterfaceModeService` to use php 8 value objects. The UserInterfaceMode object is then added as globalValue `userInterfaceMode` to the `Neos\Neos\FusionView`. The uses of the following fusion expressions have to be adjusted as follows: - `node.context.live` - `!renderingMode.isEdit` - `node.context.currentRenderingMode.edit` - `renderingMode.isEdit` - `node.context.currentRenderingMode.preview` - `renderingMode.isPreview` - `node.context.currentRenderingMode.name` - `renderingMode.name` Resolves: #4086
Since nodes have no context in Neos 9 the edit preview mode cannot be decided by asking the node any more. This change renovates the `UserInterfaceMode` and the `UserInterfaceModeService` to use php 8 value objects. The UserInterfaceMode object is then added as globalValue `userInterfaceMode` to the `Neos\Neos\FusionView`. The uses of the following fusion expressions have to be adjusted as follows: - `node.context.live` - `!renderingMode.isEdit` - `node.context.currentRenderingMode.edit` - `renderingMode.isEdit` - `node.context.currentRenderingMode.preview` - `renderingMode.isPreview` - `node.context.currentRenderingMode.name` - `renderingMode.name` Resolves: #4086
Since nodes have no context in Neos 9 the edit preview mode cannot be decided by asking the node any more. This change renovates the `UserInterfaceMode` and the `UserInterfaceModeService` to use php 8 value objects. The UserInterfaceMode object is then added as globalValue `userInterfaceMode` to the `Neos\Neos\FusionView`. The uses of the following fusion expressions have to be adjusted as follows: - `node.context.live` - `!renderingMode.isEdit` - `node.context.currentRenderingMode.edit` - `renderingMode.isEdit` - `node.context.currentRenderingMode.preview` - `renderingMode.isPreview` - `node.context.currentRenderingMode.name` - `renderingMode.name` Resolves: #4086
Since nodes have no context in Neos 9 the edit preview mode cannot be decided by asking the node any more. This change renovates the `UserInterfaceMode` and the `UserInterfaceModeService` to use php 8 value objects. The UserInterfaceMode object is then added as globalValue `userInterfaceMode` to the `Neos\Neos\FusionView`. The uses of the following fusion expressions have to be adjusted as follows: - `node.context.live` - `!renderingMode.isEdit` - `node.context.currentRenderingMode.edit` - `renderingMode.isEdit` - `node.context.currentRenderingMode.preview` - `renderingMode.isPreview` - `node.context.currentRenderingMode.name` - `renderingMode.name` Resolves: #4086
Since the nodes have no .context anymore this cannot be used to determine the edit preview mode in neos 9.
PRs:
Neos: FEATURE: Edit preview mode support for Neos 9 #4067Neos-UI: WIP: HACK: 90 edit preview mode support neos-ui#3411Neos-Ui: 2 TASK: Replace usage ofNeos.Node.inBackend(node)
neos-ui#3571renderingMode.isEdit
rector#22See also #4396 for an explanation about why we opted in for removing the workspace based
inBackend
The text was updated successfully, but these errors were encountered: