As a Dynamo integrator I want to control where my nodes are located in the library#12848
Merged
mjkkirschner merged 11 commits intoDynamoDS:masterfrom May 6, 2022
Merged
As a Dynamo integrator I want to control where my nodes are located in the library#12848mjkkirschner merged 11 commits intoDynamoDS:masterfrom
mjkkirschner merged 11 commits intoDynamoDS:masterfrom
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
pinzart90
reviewed
May 3, 2022
| /// </summary> | ||
| public static string GetFullyQualifiedName(NodeSearchElement element) | ||
| { | ||
| if (element.ElementType.HasFlag(ElementTypes.Packaged) && element.ElementType.HasFlag(ElementTypes.BuiltIn)) |
Contributor
There was a problem hiding this comment.
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);
}
Member
Author
There was a problem hiding this comment.
I don't like using nested if statements if avoidable, if you much prefer your sample code I will make the switch.
Member
Author
|
latest tests finally ran and did not introduce any new regressions! |
sm6srw
approved these changes
May 5, 2022
| { | ||
| //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? |
Contributor
There was a problem hiding this comment.
Have you seen this happening?
Member
Author
There was a problem hiding this comment.
yes, but only before when I was calling this code from the ExtensionsManager (before view extensions like libraryjs were loaded)
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.
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
...