-
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
add package states under dbg mode #11698
Conversation
@@ -113,6 +114,60 @@ public bool MarkedForUninstall | |||
internal set { markedForUninstall = value; RaisePropertyChanged("MarkedForUninstall"); } | |||
} | |||
|
|||
public bool EnableOldMarkedForUnistallState |
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.
seems that wpf can only bind to public properties...:(
If we want to have it under a debug mode first....we could just tag these temporary public methods...that they should not be used ..?
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.
yeah, one thing we've done in the past is to mark them obsolete immediately - it's confusing, but it let's people know to be wary.
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.
seems that wpf can only bind to public properties...:(
If we want to have it under a debug mode first....we could just tag these temporary public methods...that they should not be used ..?
yeah, I am supportive of both. Obsolete tag with some comments works well, is there any rule if the team can remove obsolete tag within releases? @mjkkirschner
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 see any harm to removing an obsolete method that we've explicitly called out as DO NOT USE.
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 see any harm to removing an obsolete method that we've explicitly called out as DO NOT USE.
Yes, that one I agree. I am curious about the case that we obsoleted something but decided that we want to keep it in the end, do we simply remove the obsolete tag?
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.
yep :) - Again, what case concerns you? if no one is using the member for fear it might be removed, then what break could keeping it cause?
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.
👍
<data name="PackageStateUnloadedTooltip" xml:space="preserve"> | ||
<value>Skipped. | ||
This package has not been loaded because another conflicting package was loaded before it.</value> | ||
</data> |
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 @Amoursol @Jingyi-Wen
It has been brought to my attention that the terms used are not really consistent (like loaded vs installed)
What about using the following terms:
- Installed - package is loaded into Dynamo and ready to be used.
- Scheduled for uninstall - package will be uninstalled after next Dynamo restart.
- Skipped - package is available on disk but was not loaded into Dynamo due to conflict with another similar package.
- Error - package was not loaded into Dynamo due to an unexpected error
Also what do you think about scheduled vs marked ....for uninstall ?
If you have any alternatives....please tag them with the numbers above so that we know which one is which :)
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.
@pinzart @Jingyi-Wen What do you think about 3. Ignored?
I mention it because I believe sometimes in our error messages and notifications we use the same term to describe packages that were not loaded. Either is fine with me though.
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 would use Loaded vs. Installed since it implies that the package is downloaded as well as loaded in one word.
- I wish to clarify what it means to say Scheduled for uninstall - does it mean scheduled for unload or scheduled to be nuked? If not clear, we should probably change it to say Scheduled for deletion or Scheduled to be unloaded
- Instead of skipped why don't we just use the term Unloaded?
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.
The main concern, I guess, is about using Loaded/Unloaded vs Scheduled for uninstall.
What @aparajit-pratap is suggesting is consistent and I would say they seem fine to me
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 agree with @aparajit-pratap on using Loaded, since we call the window "Installed packages". And generally I think install and uninstall sounds more like user behaviors while load and unload sounds more like Dynamo behaviors
- Agree on Scheduled for unloaded or deletion. Same reason above
- Not loaded or Unloaded makes sense to me
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'm also in favour of Loaded as it uses stronger language (Installed could still theoretically fail to load)
- Scheduled for Uninstall/Unload/Deletion is still the one that feels most ambiguous, but I don't have a better suggestion. In lieu of that I would lean towards Scheduled for Deletion/Unload as above.
- Unloaded makes most sense to me here to match the inverse of the Loaded state.
- Error is perfect here - can the user see the error message and do something about it in this state @pinzart?
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.
@Amoursol Regarding the error state. Hopefully we can display something meaningful to the user....but that work will probably be a part of this jira task https://jira.autodesk.com/browse/DYN-3670
|
||
/// <summary> | ||
/// Looks up a localized string similar to Error. | ||
///This package has not been installed due to an unexpected error.. |
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.
Does installed mean downloaded and loaded here?
} | ||
|
||
/// <summary> | ||
/// Looks up a localized string similar to Scheduled for uninstall. |
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.
Does Uninstall mean completely deleted here or just unloaded?
<data name="PackageStateUnloadedTooltip" xml:space="preserve"> | ||
<value>Skipped. | ||
This package has not been loaded because another conflicting package was loaded before it.</value> | ||
</data> |
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 would use Loaded vs. Installed since it implies that the package is downloaded as well as loaded in one word.
- I wish to clarify what it means to say Scheduled for uninstall - does it mean scheduled for unload or scheduled to be nuked? If not clear, we should probably change it to say Scheduled for deletion or Scheduled to be unloaded
- Instead of skipped why don't we just use the term Unloaded?
@@ -777,6 +778,10 @@ internal void SetPackageState(PackageDownloadHandle packageDownloadHandle, strin | |||
Package dynPkg; | |||
if (packageDownloadHandle.Extract(DynamoViewModel.Model, downloadPath, out dynPkg)) | |||
{ | |||
if (DebugModes.IsEnabled("DynamoPackageStates")) | |||
{ | |||
dynPkg.PackageState = Package.PackageStates.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.
Shouldn't we set this only after the call to LoadPackages
?
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.
hmm...I did not attempt to properly set all the states.
I only focused on the UI/UX side of it.
It may make sense to actually set the states in the PackageManagerExtension.PackageLoader
...since we may have more visibility into error states there. Or maybe some other notification system...Not sure yet
I can add a comment that this specific code is temporary...and should be moved somewhere else...And I can move it below as well
@@ -89,12 +89,30 @@ | |||
FontSize="11" | |||
Foreground="#CCC"></TextBlock> | |||
<TextBlock Text="{x:Static p:Resources.InstalledPackageViewPendingInstallButton}" | |||
Visibility="{Binding Path=Model.MarkedForUninstall, Converter={StaticResource BooleanToVisibilityCollapsedConverter}}" | |||
Visibility="{Binding Path=Model.EnableOldMarkedForUnistallState, Converter={StaticResource BooleanToVisibilityCollapsedConverter}}" |
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.
Little confused here, why couldn't you simply change the implementation of the MarkedForUninstall
property instead of introducing a new one?
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 introduced another property because MarkedForUninstall
is used in other parts of Dynamo, not only used in the UI...and I did not want to break that existing functionality by introducing the DebugMode flag into the equation.
Basically, if I had done : bool MarkedForUninstall { get {return !DebugModes.IsActive() && isMarkedForUninstall; } }
then, while having the DebugMode active, the other parts of the Dynamo that use MarkedForUninstall
would not work anymore.
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.
MarkedForUninstall...should probably be replaced by the PackageStates ...when the implementation is ready
</data> | ||
<data name="PackageStateErrorTooltip" xml:space="preserve"> | ||
<value>Unloaded. | ||
This package has not been loaded due to an unexpected error.</value> |
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.
Maybe we can be more specific about the errors...once we know where/how to set the package states in the Dynamo code
</data> | ||
<data name="PackageStateUnloadedTooltip" xml:space="preserve"> | ||
<value>Unloaded. | ||
This package has not been loaded because another conflicting package was loaded before it.</value> |
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.
Same as above, we may be able to specify which package caused the current one to get into an Unloaded state
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.
Nice, LGTM!
Purpose
This PR adds package states to the Installed Packages UI.
The UI changes are not final, they UX is still under review.
I also changed around some of the wording used.
UI changes preview
Declarations
Check these if you believe they are true
*.resx
filesReviewers
(FILL ME IN) Reviewer 1 (If possible, assign the Reviewer for the PR)
(FILL ME IN, optional) Any additional notes to reviewers or testers.
FYIs
(FILL ME IN, Optional) Names of anyone else you wish to be notified of