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

Added node-autocomplete documentation #11690

Merged
merged 2 commits into from
May 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
163 changes: 163 additions & 0 deletions src/DynamoCoreWpf/Controls/Docs/NodeAutocompleteDocumentation.html

Large diffs are not rendered by default.

26 changes: 20 additions & 6 deletions src/DynamoCoreWpf/Controls/NodeAutoCompleteSearchControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,18 +65,32 @@
TextAlignment="Center"
FontSize="14">
</TextBlock>
<Button Name="CloseButton" Margin="50,0,5,0" BorderThickness="0" Background="{StaticResource autocompletionWindow}">
<Button Name="InfoButton" Click="OnMoreInfoClicked" Margin="50,7,5,7" BorderThickness="0" Background="{StaticResource autocompletionWindow}">
<Image Width="14" Height="14" HorizontalAlignment="Right" VerticalAlignment="Center">
<Image.Style>
<Style TargetType="{x:Type Image}">
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="False">
<Setter Property="Source" Value="/DynamoCoreWpf;component/UI/Images/whiteinfotab.png" />
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Source" Value="/DynamoCoreWpf;component/UI/Images/whiteinfotab.png" />
</Trigger>
</Style.Triggers>
</Style>
</Image.Style>
</Image>
</Button>
<Button Name="CloseButton" Margin="0,7,5,7" BorderThickness="0" Background="{StaticResource autocompletionWindow}">
<Image Width="14" Height="14" HorizontalAlignment="Right" VerticalAlignment="Center">
<Image.Style>
<Style TargetType="{x:Type Image}">
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="False">
<Setter Property="Source"
Value="/DynamoCoreWpf;component/UI/Images/whiteclosetab.png" />
<Setter Property="Source" Value="/DynamoCoreWpf;component/UI/Images/whiteclosetab.png" />
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Source"
Value="/DynamoCoreWpf;component/UI/Images/whiteclosetab.png" />
<Setter Property="Source" Value="/DynamoCoreWpf;component/UI/Images/whiteclosetab.png" />
</Trigger>
</Style.Triggers>
</Style>
Expand Down Expand Up @@ -115,7 +129,7 @@
</ListBox>
</Border>

<Border Margin="-3,0,-3,0">
<Border Margin="-4,2,-2,2" Grid.RowSpan="2">
<Popup StaysOpen="True"
AllowsTransparency="True"
Placement="Right"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,5 +270,10 @@ private void OnMembersListBoxMouseWheel(object sender, MouseWheelEventArgs e)
// do not propagate to child items with scrollable content
e.Handled = true;
}

private void OnMoreInfoClicked(object sender, RoutedEventArgs e)
{
ViewModel.dynamoViewModel.OpenDocumentationLinkCommand.Execute(new OpenDocumentationLinkEventArgs(new Uri(Dynamo.Wpf.Properties.Resources.NodeAutocompleteDocumentationUriString, UriKind.Relative)));
Copy link
Member

Choose a reason for hiding this comment

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

is there a pattern you are following for adding this to the resx file?

I hope this does not get localized - that would cause problems wouldn't it?

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 it's done the same way for Python editor documentation and publish package doc as well

Copy link
Member

@mjkkirschner mjkkirschner May 18, 2021

Choose a reason for hiding this comment

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

@QilongTang it might be worth checking with localization team if this is going to cause a problem - if the url is localized then this link won't work in localized environments. (I think)

Copy link
Contributor

Choose a reason for hiding this comment

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

@mjkkirschner Thanks, I have reached out to localization team. https://autodesk.slack.com/archives/C01FVCEMYTA/p1621415985002200

}
}
}
5 changes: 5 additions & 0 deletions src/DynamoCoreWpf/DynamoCoreWpf.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -666,6 +666,9 @@
<ItemGroup>
<Resource Include="UI\Images\whiteclosetab.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="UI\Images\whiteinfotab.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="UI\Images\closewindow_hover.png" />
</ItemGroup>
Expand Down Expand Up @@ -1296,6 +1299,7 @@
<Resource Include="UI\Images\profile_normal.png" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Controls\Docs\NodeAutocompleteDocumentation.html" />
<Content Include="sharpdx_direct3d11_effects_x64.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
Expand All @@ -1318,6 +1322,7 @@
<Resource Include="UI\Images\icon-whats-new-small.png" />
<Resource Include="UI\Images\icon-dictionary-small.png" />
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="AfterBuild">
<MakeDir Directories="$(OutputPath)\viewExtensions\" />
Expand Down
9 changes: 9 additions & 0 deletions src/DynamoCoreWpf/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions src/DynamoCoreWpf/Properties/Resources.en-US.resx
Original file line number Diff line number Diff line change
Expand Up @@ -2388,4 +2388,7 @@ Uninstall the following packages: {0}?</value>
<data name="PreferencesViewSavedChangesTooltip" xml:space="preserve">
<value>Last saved: </value>
</data>
<data name="NodeAutocompleteDocumentationUriString" xml:space="preserve">
<value>DynamoCoreWpf;NodeAutocompleteDocumentation.html</value>
</data>
</root>
3 changes: 3 additions & 0 deletions src/DynamoCoreWpf/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -2388,4 +2388,7 @@ Uninstall the following packages: {0}?</value>
<data name="PreferencesViewSavedChangesTooltip" xml:space="preserve">
<value>Last saved:</value>
</data>
<data name="NodeAutocompleteDocumentationUriString" xml:space="preserve">
<value>DynamoCoreWpf;NodeAutocompleteDocumentation.html</value>
</data>
</root>
Binary file added src/DynamoCoreWpf/UI/Images/whiteinfotab.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.