DYN-6956 - symbol nodes should not show in home workspace search/browse UI.#228
Merged
mjkkirschner merged 16 commits intoDynamoDS:masterfrom May 10, 2024
Merged
DYN-6956 - symbol nodes should not show in home workspace search/browse UI.#228mjkkirschner merged 16 commits intoDynamoDS:masterfrom
mjkkirschner merged 16 commits intoDynamoDS:masterfrom
Conversation
9 tasks
RobertGlobant20
approved these changes
May 9, 2024
Contributor
RobertGlobant20
left a comment
There was a problem hiding this comment.
LGTM with some comments
pinzart90
reviewed
May 10, 2024
pinzart90
reviewed
May 10, 2024
pinzart90
reviewed
May 10, 2024
pinzart90
reviewed
May 10, 2024
pinzart90
reviewed
May 10, 2024
pinzart90
approved these changes
May 10, 2024
Collaborator
pinzart90
left a comment
There was a problem hiding this comment.
COuple of question, then LGTM
|
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.




This PR adds some new state to the
LibraryContainerand some conditional rendering to theLibraryItembased on props from theLoadedTypedata.LibraryContainer.State.HostContextis essentially an enum that can be used from the Dynamo side to let LibrarieJS know what context it's being displayed in (home workspace, custom node workspace etc)LibraryContainer.State.shouldOverideExpandedStatealso controls the rendering behavior of LibraryItems - I found that LibraryItems today use a legacy life cycle hookUNSAFE_onWillRecieveProps- to override state with props - specifically for the expanded state so that when interacting only one library item can be open at a time.This hook also makes it so that when the UI is rendered the currently open item will close. Sometimes this is not desirable like when switching between workspace contexts, so I added some new state which is essentially a mode to control this behavior - currently we turn off the behavior only when switching contexts, so that library items retain their expanded state during the context change render.
LoadedTypes now have
hiddenInWorkspaceContextwhich determines if they are hidden in the home workspace context.I could not figure out how to add a test for this behavior but it seems straight forward for someone familiar with jest/enzyme - I am out of bandwidth and will file a task for it.