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

Set Packageinfo Restart State #9982

Merged
merged 10 commits into from
Sep 17, 2019
Merged

Set Packageinfo Restart State #9982

merged 10 commits into from
Sep 17, 2019

Conversation

QilongTang
Copy link
Contributor

@QilongTang QilongTang commented Sep 16, 2019

Please Note:

  1. Before submitting the PR, please review How to Contribute to Dynamo
  2. Dynamo Team will meet 1x a month to review PRs found on Github (Issues will be handled separately)
  3. PRs will be reviewed from oldest to newest
  4. If a reviewed PR requires changes by the owner, the owner of the PR has 30 days to respond. If the PR has seen no activity by the next session, it will be either closed by the team or depending on its utility will be taken over by someone on the team
  5. PRs should use either Dynamo's default PR template or one of these other template options in order to be considered for review.
  6. PRs that do not have one of the Dynamo PR templates completely filled out with all declarations satisfied will not be reviewed by the Dynamo team.
  7. PRs made to the DynamoRevit repo will need to be cherry-picked into all the DynamoRevit Release branches that Dynamo supports. Contributors will be responsible for cherry-picking their reviewed commits to the other branches after a LGTM label is added to the PR.

Purpose

DYN-2103
As a Dynamo user, I want workspace dep viewer to set Restart State

image

gif of whole workflow:
DynamoPendingRestart

TODO

  • Add the red bannder
  • Unit test

Declarations

Check these if you believe they are true

  • The code base 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.

Reviewers

@DynamoDS/dynamo

FYIs

@QilongTang QilongTang added the WIP label Sep 16, 2019
@@ -205,7 +204,7 @@
DockPanel.Dock="Top"
Height="55"
Margin="1"
Visibility="{Binding Path=IsPendingRestart, Mode=OneWay, Converter={StaticResource BoolToVis} }">
Copy link
Member

Choose a reason for hiding this comment

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

have you used the wpf live tree to verify that this dockPanel actually has a dataContext that is not null - you may need to set it explicitly, not on the parent, but on this sub tree.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I did that. The data context is inherited from parent

Copy link
Member

@mjkkirschner mjkkirschner Sep 17, 2019

Choose a reason for hiding this comment

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

@QilongTang you are missing RaisePropertyChanged("IsPendingRestart"); or nameOf(IsPendingRestart) inside your setter for the public property.

/// <summary>
/// Property to check if the Dynamo session has package pending for uninstall
/// </summary>
public Boolean IsPendingRestart { get; set; }
Copy link
Member

Choose a reason for hiding this comment

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

it is potentially time for us to move all this data to a model - right now it's all in the view...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree, that should a better example for 3rd party devs, I checked other view extensions, all of them have similar problems

@QilongTang QilongTang changed the title [WIP] Set Packageinfo Restart State Set Packageinfo Restart State Sep 16, 2019
@QilongTang QilongTang added PTAL Please Take A Look 👀 and removed WIP labels Sep 16, 2019
@@ -197,7 +197,23 @@

<!-- Template for the feedback banner -->
<DockPanel Name="Feedback" VerticalAlignment="Bottom" Grid.Row="2" Width="600">
<StatusBar Background="{StaticResource FeedbackSectionBackground}" DockPanel.Dock="Bottom" Height="55">
<!-- Restart Banner -->
Copy link
Collaborator

@scottmitchell scottmitchell Sep 17, 2019

Choose a reason for hiding this comment

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

I'm curious why you all decided to copy the feature preview banner UI for this instead of adding another state icon. Seems like we would want to avoid conflating dependency-state and feature-state UI components.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@scottmitchell The team have discussed around this state, we admit this is not a state for package like the other ones, this is more like a state for Dynamo. So we decide to display this differently and still show it as a warning.

@mjkkirschner
Copy link
Member

@QilongTang looks good, just a few comments.

@QilongTang
Copy link
Contributor Author

QilongTang commented Sep 17, 2019

@mjkkirschner Comments all addressed, I also reverted the last changes in order to preserve the behavior that when a package is marked for uninstall in PM UI, it can also be reflected on package dep viewer ( not binding to the download button). The logic is now back to DependencyRegen() because download package is a common function between regular PM and viewer.

@QilongTang
Copy link
Contributor Author

After talking with @mjkkirschner , Merging

@QilongTang QilongTang merged commit 499bd9b into master Sep 17, 2019
@QilongTang QilongTang deleted the Set-Restart-State branch September 17, 2019 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PTAL Please Take A Look 👀
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants