| CARVIEW |
Navigation Menu
-
Notifications
You must be signed in to change notification settings - Fork 666
As a Dynamo integrator I want to control where my nodes are located in the library #12848
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
Conversation
it does not stop the types from also showing in addons section and it includes a hack to wait for the library view
new viewextensionmanager constructor
add new tests comment out old tests
| /// </summary> | ||
| public static string GetFullyQualifiedName(NodeSearchElement element) | ||
| { | ||
| if (element.ElementType.HasFlag(ElementTypes.Packaged) && element.ElementType.HasFlag(ElementTypes.BuiltIn)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not add this condition inside the if at line 88 ?
if (element.ElementType.HasFlag(ElementTypes.Packaged))
{
if (element.ElementType.HasFlag(ElementTypes.BuiltIn) {
return string.Format("{0}{1}.{2}", "bltinpkg://", element.FullCategoryName, element.Name);
}
//Use FullCategory and name as read from _customization.xml file
return string.Format("{0}{1}.{2}", "pkg://", element.FullCategoryName, element.Name);
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like using nested if statements if avoidable, if you much prefer your sample code I will make the switch.
|
latest tests finally ran and did not introduce any new regressions! |
sm6srw
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
| { | ||
| //try to combine the layout specs. | ||
| var customizationService = extensionManager.Service<ILibraryViewCustomization>(); | ||
| //TODO if the layoutspec is empty, we're calling this too early, we can retry after x seconds? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you seen this happening?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, but only before when I was calling this code from the ExtensionsManager (before view extensions like libraryjs were loaded)
pinzart90
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Purpose
https://jira.autodesk.com/browse/DYN-3407
For built-in packages Dynamo host product integrators should have a way of modifying the library layout spec so that their packages show up in the main sections of the library, and not the "add-on" section.
This PR does the following:
MergeLayoutSpecsmethod. This method can merge sections and categories of two layout specs objects. It does not merge data, only child elements. For example, it won't combineIncludeInfoorIconUrlof elements, it will only merge their child element collections.pkg/extra/layoutspecs.jsonfile, will trigger a layout spec application request.libraryViewExtensionis loaded , it will handle the request and attempt to merge the two layout specs.BuiltInflag, in addition to thePackagedflag.bltinpkg://as opposed topkg://for normal packages. This is the prefix that should be applied to the paths that integrators put in their layoutspec file.LibraryViewExtension(CEF)as a dep and instead pointed toLibraryViewExtensionMSWebbrowser. Most of the tests for the old library have been commented out as these simply don't make sense or don't compile. It's a bigger task to get these working again, and we'll be tossing the MSWebBrowser implementation soon anyway for WebView2 hopefully.Here is an example of moving the zero touch dynamo samples package into a category named
RevitDeclarations
Check these if you believe they are true
*.resxfilesRelease Notes
Internal API for Dynamo integrators to modify the library layout for their builtin packages.
Reviewers
...