BoxIO : Fix noduleLayout:section from opposite direction source plugs - #7135
Open
murraystevenson wants to merge 1 commit into
Open
BoxIO : Fix noduleLayout:section from opposite direction source plugs#7135murraystevenson wants to merge 1 commit into
noduleLayout:section from opposite direction source plugs#7135murraystevenson wants to merge 1 commit into
Conversation
`noduleLayout:section` metadata copied from the source plug is only valid when the source plug and the BoxIO's promoted plug are of the same direction. A BoxIn set up from an `out` plug with `noduleLayout:section "bottom"` registered would cause its promoted `in` plug to also appear on the bottom of the Box. This is common with EditScopes as they set up both their BoxIn and BoxOut from the same source plug. We now choose the target of `setupNoduleSectionMetadata()` based on the direction of the source plug, rather than `m_direction`. When they match, the existing behaviour is unchanged. When they don't match, the metadata target is now the promoted plug, overwriting any `noduleLayout:section` metadata copied from the source.
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.
noduleLayout:sectionmetadata copied from the source plug is only valid when the source plug and the BoxIO's promoted plug are of the same direction. A BoxIn set up from anoutplug withnoduleLayout:section "bottom"registered would cause its promotedinplug to also appear on the bottom of the Box. This is common with EditScopes as they set up both their BoxIn and BoxOut from the same source plug.We now choose the target of
setupNoduleSectionMetadata()based on the direction of the source plug, rather thanm_direction. When they match, the existing behaviour is unchanged. When they don't match, the metadata target is now the promoted plug, overwriting anynoduleLayout:sectionmetadata copied from the source.An alternate approach might be to always call
setupNoduleSectionMetadata()for bothoutPlugInternal()andinPlugInternal(), I think that might help ensure the internal plugs better represent the flow of their external equivalents in cases where an EditScope is set up with aninplug on the left and theouton the right (note the current lack of "noduleLayout:section" metadata on the internal BoxIO plugs in the additions to BoxInTest/BoxOutTest). But in the general case that feels like it'd only further proliferate instancenoduleLayout:sectionmetadata registrations unless we only registered instance metadata when it differs from the default...