Skip to content
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

[DYN-3486] Extensions menu #11541

Merged
merged 59 commits into from
Mar 12, 2021
Merged

Conversation

Astul-Betizagasti
Copy link
Contributor

Purpose

Add a new Extensions menu which will include a menu item for each extension added in alphabetical order

Picture of how it looks with Dynamo's default extensions:
2

If for some reason no extensions are added then the menu will be disabled:
1

Declarations

Check these if you believe they are true

  • The codebase is in a better state after this PR
  • Is documented according to the standards
  • The level of testing this PR includes is appropriate
  • User facing strings, if any, are extracted into *.resx files
  • All tests pass using the self-service CI.
  • Snapshot of UI changes, if any.
  • Changes to the API follow Semantic Versioning and are documented in the API Changes document.
  • This PR modifies some build requirements and the readme is updated

Reviewers

Aaron Tang (@QilongTang )

FYIs

Roberto Tellez (@RobertGlobant20 )

Astul-Betizagasti and others added 30 commits July 6, 2020 17:48
Master update from public repo
@QilongTang
Copy link
Contributor

Test Result (3 failures / +3)
DynamoCoreWpfTests.DocumentationBrowserViewExtensionTests.ClickingMenuItemLaunchesSidebarWithIndexContent
DynamoCoreWpfTests.DocumentationBrowserViewExtensionTests.DocsExtensionAddsMenuItem
DynamoCoreWpfTests.DocumentationBrowserViewExtensionTests.ShowingStartPageHidesBrowser

@Astul-Betizagasti
Copy link
Contributor Author

Test Result (3 failures / +3)
DynamoCoreWpfTests.DocumentationBrowserViewExtensionTests.ClickingMenuItemLaunchesSidebarWithIndexContent
DynamoCoreWpfTests.DocumentationBrowserViewExtensionTests.DocsExtensionAddsMenuItem
DynamoCoreWpfTests.DocumentationBrowserViewExtensionTests.ShowingStartPageHidesBrowser

@QilongTang, I just updated the pr with a fix for these

@@ -23,6 +23,7 @@ internal static string ToDisplayString(this MenuBarType type)
case MenuBarType.View: return Properties.Resources.DynamoViewViewMenu;
case MenuBarType.Help: return Properties.Resources.DynamoViewHelpMenu;
case MenuBarType.Packages: return Properties.Resources.DynamoViewPackageMenu;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a TODO to the cases above mentioning these will be deleted in Dynamo 3.0?

@@ -204,7 +224,8 @@ public enum MenuBarType
Edit,
View,
Help,
Packages
Packages,
Extensions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a TODO to the cases above mentioning these will be deleted in Dynamo 3.0?

Copy link
Contributor

@QilongTang QilongTang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with a few comments

@Astul-Betizagasti
Copy link
Contributor Author

@QilongTang I added the TODO's as you asked and also modify my implementation of the new api so that it doesn't use the code that is planed to be removed so there will be less changes needed in the future. Let me know if you have any further comments, thanks!

@@ -70,7 +70,7 @@ public override void Loaded(ViewLoadedParams viewLoadedParams)
this.documentationBrowserMenuItem = new MenuItem { Header = Resources.MenuItemText, IsCheckable = true };
this.documentationBrowserMenuItem.Checked += MenuItemCheckHandler;
this.documentationBrowserMenuItem.Unchecked += MenuItemUnCheckedHandler;
this.viewLoadedParamsReference.AddMenuItem(MenuBarType.View, this.documentationBrowserMenuItem);
this.viewLoadedParamsReference.AddExtensionMenuItem(this.documentationBrowserMenuItem);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I think this makes most sense given none of the other MenuBarTypes will be supported for the first version of this API, if we plan to support them in the future, we can add another version of this API.

Copy link
Contributor

@QilongTang QilongTang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@QilongTang QilongTang merged commit 8e040f6 into DynamoDS:master Mar 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants