-
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-5473 workspace toolbar #14483
Dyn-5473 workspace toolbar #14483
Conversation
The evidence gif exceeds the size to be enclosed, here you are : |
@@ -830,11 +830,19 @@ void Watch3DViewModelPropertyChanged(object sender, PropertyChangedEventArgs e) | |||
} | |||
} | |||
|
|||
internal event EventHandler WindowRezised; | |||
internal void OnWindowResized(object lessthan1000) |
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.
Not a good idea to have numerics in variable name. Change to something else?
this.dynamoViewModel.RequestReturnFocusToView += OnRequestReturnFocusToView; | ||
this.dynamoViewModel.Model.WorkspaceSaving += OnWorkspaceSaving; | ||
this.dynamoViewModel.Model.WorkspaceOpened += OnWorkspaceOpened; | ||
this.dynamoViewModel.Model.WorkspaceAdded += OwnWorkspaceAdded; |
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.
Typo OnWorkspaceAdded*
|
||
private void DynamoViewModel_WindowRezised(object sender, System.EventArgs e) | ||
{ | ||
ViewButtonsText = !(bool)sender; |
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.
It would be good to make validate that a bool value is passed here, otherwise the casting will throw an exception.
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.
We can use Show/HideText
, it is not guaranteed a button either, right? One of the case is a menu item
CalculateWindowThreshold(); | ||
} | ||
|
||
internal void CalculateWindowThreshold() |
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.
Comments, what does it do?
dynamoViewModel.OnWindowResized(dynamoViewModel.Model.PreferenceSettings.WindowW <= threshold); | ||
} | ||
|
||
internal void CalculateWindowMinWidth() |
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.
Comments, what does it do?
|
||
public ShortcutToolbarViewModel(DynamoViewModel dynamoViewModel) | ||
{ | ||
NotificationsNumber = 0; | ||
authManager = dynamoViewModel.Model.AuthenticationManager; | ||
ValidateWorkSpaceBeforeToExportAsImageCommand = new DelegateCommand(dynamoViewModel.ValidateWorkSpaceBeforeToExportAsImage); | ||
SignOutCommand = new DelegateCommand(authManager.ToggleLoginState); | ||
authManager.LoginStateChanged += (o) => { RaisePropertyChanged(nameof(LoginState)); }; | ||
authManager.LoginStateChanged += (o) => { RaisePropertyChanged(nameof(LoginState)); }; | ||
dynamoViewModel.WindowRezised += DynamoViewModel_WindowRezised; |
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.
unsubscribe?
@@ -70,5 +78,18 @@ public bool IsNotificationsCounterVisible | |||
return true; | |||
} | |||
} | |||
|
|||
public bool ViewButtonsText |
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.
Please update name and add comments as suggested above
@jesusalvino It looks like there are failures on this PR. Can you take a look at it once. |
1 similar comment
@jesusalvino It looks like there are failures on this PR. Can you take a look at it once. |
that's weird, lot of tests failed but most of them passed locally, anyway already started them on the master-15 |
@@ -70,5 +81,24 @@ public bool IsNotificationsCounterVisible | |||
return true; | |||
} | |||
} | |||
|
|||
public bool ShowMenuItemText |
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.
comments please
@@ -101,6 +103,8 @@ public partial class DynamoView : Window, IDisposable | |||
get { return preferencesWindow; } | |||
} | |||
|
|||
internal double DefaultMinWidth = 0; |
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.
comments please, especially this is defined in DynamoView
@@ -84,6 +84,8 @@ public partial class DynamoView : Window, IDisposable | |||
private bool isPSSCalledOnViewModelNoCancel = false; | |||
private readonly DispatcherTimer _workspaceResizeTimer = new DispatcherTimer { Interval = new TimeSpan(0, 0, 0, 0, 500), IsEnabled = false }; | |||
private ViewLoadedParams sharedViewExtensionLoadedParams; | |||
private double toolBarRightMenuWidth = 0; | |||
private double additionalWidth = 50; |
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.
comments please, especially this is defined in DynamoView
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.
Some last comments, as long as regressions are addressed
Done |
Purpose
Implementing the Tech debt https://jira.autodesk.com/browse/DYN-5473 to deal with the Toolbar overlapping over the workspace tabs.
Declarations
Check these if you believe they are true
*.resx
filesReviewers
@QilongTang
@reddyashish
FYIs
@RobertGlobant20
@Enzo707