6893: DYN-6956 symbol nodes should not show in HomeWorkspace context.#15204
6893: DYN-6956 symbol nodes should not show in HomeWorkspace context.#15204mjkkirschner merged 2 commits intoDynamoDS:masterfrom
Conversation
There was a problem hiding this comment.
See the ticket for this pull request: https://jira.autodesk.com/browse/DYN-6893
UI Smoke TestsTest: success. 2 passed, 0 failed. |
| refreshLibraryView(libController); | ||
|
|
||
| //initial state | ||
| libController.setHostContext("home") |
There was a problem hiding this comment.
@Enzo707 think this line needs to be moved to librarie.js->library.html file once you consume the npm package inside Dynamo.
| { | ||
| var type = workspace switch | ||
| { | ||
| HomeWorkspaceModel _ => "home", |
There was a problem hiding this comment.
I see you defined the next line in librarie.js
export type HostingContextType = "home"|"custom"|"none"
What happens if is set to "none"?
There was a problem hiding this comment.
custom and none do nothing special at the moment - library is rendered as before my prs.
| /// <param name="type"></param> | ||
| internal void UpdateContext(string type) | ||
| { | ||
| ExecuteScriptFunctionAsync(browser,"libController.setHostContext", type); |
There was a problem hiding this comment.
Usually we were defining the function in the library.html (like an interface of Dynamo and librarie.js), for example:
function SetContext(type){
libController.setHostContext(type)
}
But I guess this way is better if now everything will be inside the librarie.js component.
There was a problem hiding this comment.
I actually had trouble with that pattern where I found libController was not set correctly, I guess I could figure out how to pass it as a arg to make sure.
There was a problem hiding this comment.
I don't like that we're using ExecuteScriptFunctionAsync for so many interops between c# and javascript. ExecuteScriptFunctionAsync forces you to write the javascript code on the c# side (prone to errors)
There are other ways to interop (post simple messages or hostObjects) We should review the interop approach in a separate task
src/LibraryViewExtensionWebView2/Handlers/NodeItemDataProvider.cs
Outdated
Show resolved
Hide resolved
|
the test failure exists on master already, merging. |
Purpose
relies on:
DynamoDS/librarie.js#228
Dynamo now informs librarieJS of the workspace context, when loadedTypes that have
hiddenInWorkspaceContext == trueare rendered and the context ishome- they are simply not rendered on the JS side.Declarations
Check these if you believe they are true
*.resxfilesRelease Notes
fix a legacy issue where input and output symbol nodes were shown in the HomeWorkspace context even though they are only useful in CustomNodeWorkspaces.
Reviewers
(FILL ME IN) Reviewer 1 (If possible, assign the Reviewer for the PR)
(FILL ME IN, optional) Any additional notes to reviewers or testers.
FYIs
(FILL ME IN, Optional) Names of anyone else you wish to be notified of