-
Notifications
You must be signed in to change notification settings - Fork 635
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
As a Dynamo integrator I want to control where my nodes are located in the library #12848
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
@@ -84,8 +84,12 @@ protected virtual object CreateObjectForSerialization(IEnumerable<NodeSearchElem | |||
/// </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! |
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)
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:
MergeLayoutSpecs
method. 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 combineIncludeInfo
orIconUrl
of elements, it will only merge their child element collections.pkg/extra/layoutspecs.json
file, will trigger a layout spec application request.libraryViewExtension
is loaded , it will handle the request and attempt to merge the two layout specs.BuiltIn
flag, in addition to thePackaged
flag.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
Revit
Declarations
Check these if you believe they are true
*.resx
filesRelease Notes
Internal API for Dynamo integrators to modify the library layout for their builtin packages.
Reviewers
...