Skip to content

Commit

Permalink
[Cherry-Pick] Update Dynamo sample graphs (#14897) Pm AddPath button …
Browse files Browse the repository at this point in the history
…UI fix (#14889) (#14902)

* Update Dynamo sample graphs (#14897)

* update dynamo sample graphs

- update all dynamo-related sample graphs

* fix failing tests after update

- updated numerous tests after the changes

* Pm AddPath button UI fix (#14889)

* small visual fix

- added the text part next to the icon to the button element
- now the button works through either the text or the icon

* added AddPath hover state

- now AddPath shares the same hover state as the icon

* address regressions related to samples (#14900)

---------

Co-authored-by: Deyan Nenov <[email protected]>
  • Loading branch information
QilongTang and dnenov authored Jan 29, 2024
1 parent 1ceb403 commit 132e10e
Show file tree
Hide file tree
Showing 24 changed files with 17,683 additions and 10,083 deletions.
67 changes: 38 additions & 29 deletions doc/distrib/Samples/en-US/Basics/Basics_Basic01.dyn

Large diffs are not rendered by default.

215 changes: 143 additions & 72 deletions doc/distrib/Samples/en-US/Basics/Basics_Basic02.dyn

Large diffs are not rendered by default.

232 changes: 164 additions & 68 deletions doc/distrib/Samples/en-US/Basics/Basics_Basic03.dyn

Large diffs are not rendered by default.

614 changes: 438 additions & 176 deletions doc/distrib/Samples/en-US/Core/Core_AttractorPoint.dyn

Large diffs are not rendered by default.

4,023 changes: 2,790 additions & 1,233 deletions doc/distrib/Samples/en-US/Core/Core_CodeBlocks.dyn

Large diffs are not rendered by default.

480 changes: 299 additions & 181 deletions doc/distrib/Samples/en-US/Core/Core_ListAtLevel.dyn

Large diffs are not rendered by default.

587 changes: 422 additions & 165 deletions doc/distrib/Samples/en-US/Core/Core_ListLacing.dyn

Large diffs are not rendered by default.

10,852 changes: 5,472 additions & 5,380 deletions doc/distrib/Samples/en-US/Core/Core_Math.dyn

Large diffs are not rendered by default.

464 changes: 325 additions & 139 deletions doc/distrib/Samples/en-US/Core/Core_PassingFunctions.dyn

Large diffs are not rendered by default.

499 changes: 367 additions & 132 deletions doc/distrib/Samples/en-US/Core/Core_Python.dyn

Large diffs are not rendered by default.

1,554 changes: 813 additions & 741 deletions doc/distrib/Samples/en-US/Core/Core_RangeSyntax.dyn

Large diffs are not rendered by default.

2,314 changes: 1,971 additions & 343 deletions doc/distrib/Samples/en-US/Core/Core_Strings.dyn

Large diffs are not rendered by default.

560 changes: 438 additions & 122 deletions doc/distrib/Samples/en-US/Geometry/Geometry_Curves.dyn

Large diffs are not rendered by default.

466 changes: 355 additions & 111 deletions doc/distrib/Samples/en-US/Geometry/Geometry_Points.dyn

Large diffs are not rendered by default.

876 changes: 704 additions & 172 deletions doc/distrib/Samples/en-US/Geometry/Geometry_Solids.dyn

Large diffs are not rendered by default.

1,228 changes: 884 additions & 344 deletions doc/distrib/Samples/en-US/Geometry/Geometry_Surfaces.dyn

Large diffs are not rendered by default.

456 changes: 328 additions & 128 deletions doc/distrib/Samples/en-US/ImportExport/ImportExport_CSV to Stuff.dyn

Large diffs are not rendered by default.

495 changes: 367 additions & 128 deletions doc/distrib/Samples/en-US/ImportExport/ImportExport_Data To Excel.dyn

Large diffs are not rendered by default.

499 changes: 397 additions & 102 deletions doc/distrib/Samples/en-US/ImportExport/ImportExport_Excel to Dynamo.dyn

Large diffs are not rendered by default.

608 changes: 489 additions & 119 deletions doc/distrib/Samples/en-US/ImportExport/OpenXMLExport_Data To Excel.dyn

Large diffs are not rendered by default.

477 changes: 379 additions & 98 deletions doc/distrib/Samples/en-US/ImportExport/OpenXMLImport_Data From Excel.dyn

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -917,27 +917,39 @@
<Button.Template>
<ControlTemplate TargetType="Button">
<Border Background="Transparent" Margin="0 -1 0 0">
<Viewbox Width="16"
Height="16"
VerticalAlignment="Top">
<Path x:Name="Folder"
Fill="#999999"
Data="M2.00016 6.66667H6.84016L7.8535 6H13.3335V12H14.0002V5.33333H7.86016L6.00016 4H1.3335V14.6667H8.66683V14H2.00016V6.66667ZM2.00016 4.66667H6.00016L7.20016 5.61333L6.66683 6H2.00016V4.66667ZM12.6668 10.6667V12.6667H14.6668V14H12.6668V16H11.3335V14H9.3335V12.6667H11.3335V10.6667H12.6668Z"
StrokeThickness="0">
</Path>
</Viewbox>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
<Viewbox Width="16"
Height="16"
VerticalAlignment="Top">
<Path x:Name="Folder"
Fill="#999999"
Data="M2.00016 6.66667H6.84016L7.8535 6H13.3335V12H14.0002V5.33333H7.86016L6.00016 4H1.3335V14.6667H8.66683V14H2.00016V6.66667ZM2.00016 4.66667H6.00016L7.20016 5.61333L6.66683 6H2.00016V4.66667ZM12.6668 10.6667V12.6667H14.6668V14H12.6668V16H11.3335V14H9.3335V12.6667H11.3335V10.6667H12.6668Z"
StrokeThickness="0">
</Path>
</Viewbox>
<TextBlock Text="{x:Static p:Resources.PackagePathAddPathButtonName}" Margin="10 3 0 0">
<TextBlock.Style>
<Style TargetType="TextBlock" BasedOn="{StaticResource SubLabelStyle}">
<Style.Triggers>
<DataTrigger Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Border}}" Value="True">
<Setter Property="Foreground" Value="#6AC0E7"/>
</DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
</StackPanel>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Folder"
Property="Fill"
Value="#6AC0E7" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate.Triggers>
</ControlTemplate>
</Button.Template>
</Button>
<TextBlock Style="{StaticResource SubLabelStyle}" Text="{x:Static p:Resources.PackagePathAddPathButtonName}" Margin="10 0 0 0"/>
</StackPanel>
<Grid Margin="0,0,0,15"
Visibility="{Binding MarkdownFilesDirectory, UpdateSourceTrigger=PropertyChanged,
Expand Down
8 changes: 4 additions & 4 deletions test/DynamoCoreWpfTests/WorkspaceOpeningTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ public void OpeningWorkspaceSetsPosition()
{
var ws = OpenWorkspaceFromSampleFile();
Assert.AreEqual(ws.Name, "Basics_Basic01");
Assert.AreEqual(ws.X, -1915.11, .1);
Assert.AreEqual(ws.Y, -330.08, .1);
Assert.AreEqual(ws.X, -2651.25, .1);
Assert.AreEqual(ws.Y, -490.92, .1);
}

[Test]
Expand Down Expand Up @@ -85,7 +85,7 @@ public void OpeningWorkspaceSetsZoom()
{
var ws = OpenWorkspaceFromSampleFile();
var wvm = ViewModel.CurrentSpaceViewModel;
Assert.AreEqual(wvm.Zoom, 0.76, .1);
Assert.AreEqual(wvm.Zoom, 1.0, .1);
}

[Test]
Expand Down Expand Up @@ -146,7 +146,7 @@ public void ManipulatingWorkspaceDoesNotAffectZoom()

_ = OpenWorkspaceFromSampleFile();
var wvm = ViewModel.CurrentSpaceViewModel;
Assert.AreEqual(wvm.Zoom, 0.761, .1);
Assert.AreEqual(wvm.Zoom, 1.0, .1);
}

private WorkspaceModel OpenWorkspaceFromSampleFile()
Expand Down
Loading

0 comments on commit 132e10e

Please sign in to comment.