-
Notifications
You must be signed in to change notification settings - Fork 636
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-1897 API to add extensions to right side bar. #9786
Conversation
Great to see progress, do you plan to make a PR to the DynamoSamples repo as well? |
Yes, I will make a PR for that. |
@smangarole will this break any UI automation tests? |
@reddyashish I think this looks great! I wonder if we should add a dropdown hamburger https://fontawesome.com/icons/bars?style=solid like we do for the workspace tabs to the right? Can we also add a larger margin between the workspace tab control and the viewExtension tabs? |
The changes we discussed today have been addressed. One thing pending, is to add a test case. |
Looks Solid. At some point I would like to merge our changes together to see what it feel like for the package dependency on the right. |
Looks good @reddyashish just two comments for you to consider if they worth doing. |
@reddyashish LGTM. Can you remind me what did we land on Unique ID for each Tab in the end, extension name or? |
The unique id would be the fully qualified type name.(namespace+class name of the extension) |
Great, looks solid |
Merging this. Will create a todo task to make the API public once the team finalizes it. |
tab.HeaderTemplate = tabDynamic.FindResource("TabHeader") as DataTemplate; | ||
|
||
// setting the extension window to the current tab content | ||
tab.Content = contentControl.Content; |
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.
@QilongTang @reddyashish - did you guys have a chance to discuss this last week?
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, I am looking into this issue.
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.
@mjkkirschner Changing this to set the contentControl object to tab.Content, worked(only for UserControl elements). This would then fail if the user is the creating a window type extension.
I will be making this change in a new PR, but the users will have a constraint of injecting user control elements only.
* API * First commit * second commit * Comments and some reverts * Addressing comments and adding event handler to the tabitems list * making it private * API change and addressing comments. * Some more comments * Adding test * Adjusting margins * Adding border property to static resource field * Adding loggers to console * Removing the entry from DynamoCoreWPF assembly info. * Spacing
Purpose
This PR provides an internal API to add an extension to the right side extensions bar. This API can be called from inside your View Extension class. Inside the "Loaded" function, we can call this method and the window will be added to the right side bar. Tab control mechanism is implemented here.
For example: p.AddToExtensionsSideBar(window);
In the below GIF, I have changed the sample extension class to call this above method instead of calling the window.show() function.
Looking forward to any suggestions.
Declarations
Check these if you believe they are true
*.resx
filesReviewers
@QilongTang @mjkkirschner @aparajit-pratap @ColinDayOrg @scottmitchell