BUGFIX: Take the retranslation language from the inspected node - #107
Open
gradinarufelix wants to merge 1 commit into
Open
gradinarufelix wants to merge 1 commit into
gradinarufelix wants to merge 1 commit into
Conversation
The view combined the inspected node with the globally active dimension. When the editor switches to a dimension the node does not exist in, the Neos UI marks the new dimension as active before it resolves the document, so node and dimension did not belong together while the create-variant dialog was open, and the reported status belonged to a different variant. Read the dimension space point from the inspected node's address instead, which is already parsed there for the content repository id.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Client-side counterpart of #106 for the Neos 9 line.
Problem
useNodeInfotakes the node from the inspected node but the coordinates from the globally active dimension. The Neos UI marks a newly selected dimension as active before it resolves the document in it, and while the "create variant" dialog is open the inspector still shows the node of the previous dimension. The view then reports the retranslation status of a variant the editor is not looking at, or{}coordinates keep the query disabled.On the Neos 8 line the same mismatch produces a server error, because that controller resolves the node before it checks for a
referenceLanguage(see #106). Here the controller tolerates it, so the symptom is a silently wrong status rather than a failure.Change
Read the dimension space point from the inspected node's address, which the hook already parses for the content repository id, instead of the active dimension. Node, content repository and coordinates then always come from the same address.
The dimension values are passed through as before, so
DimensionSpacePoint::fromArrayingetTranslationMetadataActionreceives the same shape it does today.Verification
Plugin.jsrebuilt with the pinned toolchain (yarn 4.15.0, esbuild 0.25.1); the diff is the change plus minifier symbol churn..github/workflows/build.ymlonly triggers for3.0, so this PR gets no CI run.