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

Refresh Dep Viewer #10046

Merged
merged 3 commits into from
Oct 14, 2019
Merged

Refresh Dep Viewer #10046

merged 3 commits into from
Oct 14, 2019

Conversation

QilongTang
Copy link
Contributor

@QilongTang QilongTang commented Oct 10, 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

Adding a button for user to refresh dep viewer manually.

RefreshDepViewer

Tooltip:
image

HoverOverState:
RefreshDepViewerHoverOverState

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

(FILL ME IN, Optional) Names of anyone else you wish to be notified of

@@ -5,7 +5,6 @@
xmlns:dynui="clr-namespace:Dynamo.UI.Controls"
xmlns:p="clr-namespace:Dynamo.Wpf.Properties"
xmlns:configuration="clr-namespace:Dynamo.Configuration;assembly=DynamoCore"
xmlns:fa="http://schemas.fontawesome.io/icons/"
Copy link
Member

Choose a reason for hiding this comment

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

might this negatively effect nodeViews which reference font awesome?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Shouldn't be the case, at least this name space is not referenced at all.. I can also remove if there are known issues but I can't think of any side effect

Icon="Refresh"
Foreground="{DynamicResource MemberButtonText}"
ToolTip="{x:Static w:Resources.RefreshButtonTooltipText}"
MouseLeftButtonDown="Refresh_MouseLeftButtonDown"/>
Copy link
Member

Choose a reason for hiding this comment

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

I know we said we would not go too far UI wise - but at a minimum - I think this button should have a tooltip and hover interaction to make clear it is clickable and not just an icon.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mjkkirschner Yes, please review the tooltip text, it is included in this PR

Copy link
Member

@mjkkirschner mjkkirschner Oct 10, 2019

Choose a reason for hiding this comment

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

thanks, any thoughts on the hover interaction? like a highlight?

@@ -120,7 +128,7 @@
</DataGridTextColumn>
<!-- Package Version -->
<DataGridTextColumn
Header="Version"
Header="{x:Static w:Resources.VersionHeaderText}"
Copy link
Member

Choose a reason for hiding this comment

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

thanks

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, this should fix the localization bug


private void Refresh_MouseLeftButtonDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
{
DependencyRegen(currentWorkspace);
Copy link
Member

Choose a reason for hiding this comment

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

does this function have testing?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Needs UI automation test for this one.

Copy link
Member

Choose a reason for hiding this comment

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

I actually meant for the DependencyRegen function - I think if that is covered this is likely good enough without a new test.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mjkkirschner Yes, we had a few unit tests covering that from the past

@@ -30,6 +30,10 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="FontAwesome.WPF, Version=4.3.0.35981, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\extern\FontAwesome\FontAwesome.WPF.dll</HintPath>
Copy link
Member

Choose a reason for hiding this comment

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

we dont use nuget for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mjkkirschner We don't. we are referencing an old version of FA (4.3.0) and keeping a hard copy of it in our repo. Although the latest WPF version on nuget is 4.7.0, not so different. We should update when FA 5.0 for WPF available and switch to use nuget referece because it will provide much more.

@mjkkirschner
Copy link
Member

looks good - a few requests.

@QilongTang
Copy link
Contributor Author

QilongTang commented Oct 11, 2019

I tried a bunch of ways to add hover over state, this way seems more consistent with what we have with the buttons for download. However I did notice that the buttons in dep viewer are not really consistent with what we have defined in Dynamo. Bummer. And refactoring isn't as easy as I imagined.. So I stopped here

@mjkkirschner
Copy link
Member

@QilongTang LGTM

@mjkkirschner mjkkirschner added the LGTM Looks good to me label Oct 14, 2019
@QilongTang QilongTang merged commit e09bf01 into master Oct 14, 2019
@QilongTang QilongTang deleted the RefreshDepViewer branch October 14, 2019 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LGTM Looks good to me
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants