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

GraphNodeManager Update #13069

Merged
merged 37 commits into from
Aug 16, 2022
Merged
Show file tree
Hide file tree
Changes from 36 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
5ccedd2
Nested Empty List Not Showing
dnenov Jun 28, 2022
f272c2c
Filter Label Consistent Capitalisation
dnenov Jun 28, 2022
b0b940a
Export Tooltip
dnenov Jun 28, 2022
9978f7b
Tooltip Export and Copy Flip
dnenov Jun 28, 2022
fa1e4d2
DismissedAlerts Not Updated in Automatic Mode
dnenov Jun 28, 2022
19b0211
Merge branch 'master' of https://github.com/DynamoDS/Dynamo into dnen…
dnenov Jul 26, 2022
cc65e29
Icons to Filters
dnenov Jul 26, 2022
3090d39
Aligned Filters to Figma
dnenov Jul 26, 2022
759c6ed
Export Default Name
dnenov Jul 26, 2022
ab01d8f
Export Unfiltered Nodes Only
dnenov Jul 26, 2022
30b59aa
Renamed Node Blue Dot
dnenov Jul 26, 2022
2658095
Comments: nameof
dnenov Jul 27, 2022
9b0a73b
Comments: GetOriginalName Internal, used InternalsVisibleTo instead
dnenov Jul 27, 2022
cd5d3c1
Summary Comments Added to FilterViewModel
dnenov Jul 27, 2022
7365210
Fixed Summary Comments After Change
dnenov Jul 27, 2022
b73cf21
Comments: IEnumerable to Array Simplified
dnenov Jul 27, 2022
bbb88f3
Comments: Braces
dnenov Jul 27, 2022
bfb9187
SearchTextBox Update
dnenov Jul 27, 2022
88db85f
DataGrid Visual Changes
dnenov Jul 27, 2022
ec981e1
Export Dual Tooltip
dnenov Jul 27, 2022
2cf1df8
Select Node Behavior Change
dnenov Jul 27, 2022
954a3ea
Multiple Visual Updates
dnenov Jul 29, 2022
9b2ed4b
Warning/Error Text Contrast
dnenov Jul 29, 2022
a1ebe97
Hover State Colors, Consistent Selection Color
dnenov Jul 30, 2022
ff962a9
Dismissed Warning Italic Font
dnenov Aug 2, 2022
d2a4356
Any Empty Lists and Null
dnenov Aug 2, 2022
9622fc1
GNM EmptyList and Null Test
dnenov Aug 2, 2022
6ca914b
Remove Dismissed Icon
dnenov Aug 3, 2022
0837fe3
Naming Convention
dnenov Aug 5, 2022
4580258
Images as Resource
dnenov Aug 5, 2022
5615669
Removed/Replaced Converters
dnenov Aug 5, 2022
dcdf553
Color Resources Replaced
dnenov Aug 5, 2022
d7a8e1f
Converter Namespace Rename
dnenov Aug 9, 2022
a97c133
Merge branch 'master' of https://github.com/DynamoDS/Dynamo into dnen…
dnenov Aug 11, 2022
07125c9
Merge Fix
dnenov Aug 11, 2022
5a07586
Reverted Changes, Fix Tests Fail
dnenov Aug 15, 2022
abee353
Merge branch 'master' into dnenov-update-graphnodemanager
reddyashish Aug 15, 2022
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
25 changes: 24 additions & 1 deletion src/DynamoCore/Graph/Nodes/NodeModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1081,11 +1081,34 @@ public virtual NodeOutputData OutputData
};
}
}

/// A collection of error/warning/info messages, dismissed via a sub-menu in the node Context Menu.
[JsonIgnore]
public ObservableCollection<string> DismissedAlerts { get; set; } = new ObservableCollection<string>();


private int dismissedAlertsCount;
/// <summary>
/// Returns the number of dismissed error/warning/info messages.
/// </summary>
[JsonIgnore]
public int DismissedAlertsCount
{
get
{
return dismissedAlertsCount;
}

internal set // Private setter, see "ArgumentLacing" for details.
{
if (dismissedAlertsCount != value)
{
dismissedAlertsCount = value;
RaisePropertyChanged(nameof(DismissedAlertsCount));
}
}
}

#endregion

#region freeze execution
Expand Down
1 change: 1 addition & 0 deletions src/DynamoCore/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,6 @@
[assembly: InternalsVisibleTo("DynamoManipulation")]
[assembly: InternalsVisibleTo("IronPythonTests")]
[assembly: InternalsVisibleTo("DynamoPackagesWPF")]
[assembly: InternalsVisibleTo("GraphNodeManagerViewExtension")]

[assembly: TypeForwardedTo(typeof(Dynamo.Scheduler.Disposable))]
4 changes: 2 additions & 2 deletions src/DynamoCoreWpf/UI/Themes/Modern/DynamoModern.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -5166,7 +5166,7 @@
<Style x:Key="InputBoxDarkThemeStyle" TargetType="{x:Type TextBox}">
<Setter Property="FontFamily" Value="{StaticResource ArtifaktElementRegular}" />
<Setter Property="Foreground" Value="{StaticResource DarkThemeBodyMediumBrush}"/>
<Setter Property="Background" Value="{StaticResource DarkThemeInputBoxBackgroundBrush}"/>
<Setter Property="Background" Value="#353535"/>
<Setter Property="UseLayoutRounding" Value="True"/>
<Setter Property="FontSize" Value="12px"/>
<Setter Property="Padding" Value="10"/>
Expand Down Expand Up @@ -5253,7 +5253,7 @@
<Grid>
<TextBox x:Name="InputTextBox"
Padding="8,10"
Background="#353535"
Background="{StaticResource DarkThemeInputBoxBackgroundColor}"
BorderThickness="0"
CaretBrush="{StaticResource Blue300Brush}"
Focusable="True"
Expand Down
15 changes: 14 additions & 1 deletion src/DynamoCoreWpf/ViewModels/Core/NodeViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -950,8 +950,21 @@ private void DismissedNodeMessages_CollectionChanged(object sender, NotifyCollec

RaisePropertyChanged(nameof(DismissedAlerts));
RaisePropertyChanged(nameof(NumberOfDismissedAlerts));

UpdateModelDismissedAlertsCount();
}


/// <summary>
/// Calls an update for the DismissedAlertCount inside the NodeModel to push PropertyChanged fire
/// </summary>
private void UpdateModelDismissedAlertsCount()
{
if (DismissedAlerts != null)
{
nodeLogic.DismissedAlertsCount = DismissedAlerts.Count;
}
}

/// <summary>
/// Dispose function
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,18 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ui="clr-namespace:Dynamo.UI;assembly=DynamoCoreWpf">

<ResourceDictionary.MergedDictionaries>
<ui:SharedResourceDictionary Source="{x:Static ui:SharedDictionaryManager.DynamoColorsAndBrushesDictionaryUri}" />
<ui:SharedResourceDictionary Source="{x:Static ui:SharedDictionaryManager.DynamoModernDictionaryUri}" />
</ResourceDictionary.MergedDictionaries>

<!-- Colors -->
<Color x:Key="MidGray">#999999</Color>
<Color x:Key="LightGray">#CCCCCC</Color>
<Color x:Key="Blue">#38abdf</Color>
<Color x:Key="MidLightBlue">#366a81</Color>
<Color x:Key="MidBlue">#365868</Color>
<Color x:Key="MidDarkBlue">#375f71</Color>
<Color x:Key="TextColor">#F5F5F5</Color>
<Color x:Key="GrayOpacity">#5C5C5C5C</Color>
<Color x:Key="MidGrayColor">#999999</Color>
<Color x:Key="BorderColor">#555</Color>

<!-- Brushes -->
<SolidColorBrush x:Key="MidGrayBrush" Color="{StaticResource MidGray}" />
<SolidColorBrush x:Key="LightGrayBrush" Color="{StaticResource LightGray}" />
<SolidColorBrush x:Key="BlueBrush" Color="{StaticResource Blue}" />
<SolidColorBrush x:Key="MidLightBlueBrush" Color="{StaticResource MidLightBlue}" />
<SolidColorBrush x:Key="MidBlueBrush" Color="{StaticResource MidBlue}" />
<SolidColorBrush x:Key="MidDarkBlueBrush" Color="{StaticResource MidDarkBlue}" />
<SolidColorBrush x:Key="TextColorBrush" Color="{StaticResource TextColor}" />
<SolidColorBrush x:Key="GrayOpacityBrush" Color="{StaticResource GrayOpacity}" />
<SolidColorBrush x:Key="MidGrayBrush" Color="{StaticResource MidGrayColor}" />
<SolidColorBrush x:Key="BorderColorBrush" Color="{StaticResource BorderColor}" />

<!-- DataGrid style -->
<Style x:Key="DataGridStyle1" TargetType="{x:Type DataGrid}">
Expand All @@ -27,59 +21,69 @@
<Setter Property="CellStyle" Value="{DynamicResource CellStyle1}"/>
<Setter Property="RowHeaderWidth" Value="0"/>
<Setter Property="BorderThickness" Value="0.5" />
<Setter Property="BorderBrush" Value="#555555"/>
<Setter Property="BorderBrush" Value="{StaticResource BorderColorBrush}"/>
<Setter Property="ColumnWidth" Value="Auto"/>
<Setter Property="GridLinesVisibility" Value="Vertical"/>
<Setter Property="VerticalGridLinesBrush" Value="#555555"/>
<Setter Property="VerticalGridLinesBrush" Value="{StaticResource BorderColorBrush}"/>
<Setter Property="UseLayoutRounding" Value="True"></Setter>
<Setter Property="SnapsToDevicePixels" Value="True"></Setter>
</Style>

<!-- DataGridColumnHeader style -->
<Style x:Key="ColumnHeaderStyle1" TargetType="DataGridColumnHeader">
<Setter Property="Height" Value="20"/>
<Setter Property="Background" Value="#333333"/>
<Setter Property="Foreground" Value="#999999"/>
<Setter Property="Height" Value="24"/>
<Setter Property="Background" Value="{StaticResource ExtensionBackgroundColor}"/>
<Setter Property="Foreground" Value="#bbbbbb"/>
<Setter Property="BorderThickness" Value="0 0 0 1"></Setter>
<Setter Property="BorderBrush" Value="{StaticResource BorderColorBrush}"></Setter>
<Setter Property="FontSize" Value="10" />
<Setter Property="BorderThickness" Value="0 0 1 0" />
<Setter Property="BorderBrush" Value="#555555"/>
<Setter Property="Margin" Value="0 0 1 0"/>
<Setter Property="Padding" Value="10 0"/>
<Setter Property="Margin" Value="0"/>
<Setter Property="Padding" Value="6 0"/>
<Setter Property="UseLayoutRounding" Value="True"></Setter>
<Setter Property="SnapsToDevicePixels" Value="True"></Setter>
</Style>

<!-- DataGridRow style -->
<Style TargetType="DataGridRow" BasedOn="{StaticResource {x:Type DataGridRow}}">
<Setter Property="Background" Value="#333333"/>
<Setter Property="Background" Value="{StaticResource MainBackgroundColor}"/>
<Setter Property="BorderThickness" Value="0" />
<Setter Property="MinHeight" Value="24"></Setter>
<Setter Property="VerticalContentAlignment" Value="Center"></Setter>
<Setter Property="BorderBrush" Value="#555555"/>
<Setter Property="BorderBrush" Value="{StaticResource BorderColorBrush}"/>
<Setter Property="UseLayoutRounding" Value="True"></Setter>
<Setter Property="SnapsToDevicePixels" Value="True"></Setter>
<Style.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Background" Value="#555555" />
<Trigger Property="AlternationIndex" Value="1">
<Setter Property="Background" Value="{StaticResource DarkerGreyBrush}"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#555555" />
<Setter Property="Background" Value="#434343"/>
</Trigger>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Background" Value="#4a4a4a" />
</Trigger>
</Style.Triggers>
</Style>

<!-- Cell style -->
<Style x:Key="CellStyle1" TargetType="DataGridCell">
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Margin" Value="1" />
<Setter Property="Margin" Value="1 0 0 0" />
<Setter Property="MinHeight" Value="24"></Setter>
<Setter Property="UseLayoutRounding" Value="True"></Setter>
<Setter Property="SnapsToDevicePixels" Value="True"></Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type DataGridCell}">
<Grid Background="{TemplateBinding Background}">
<ContentPresenter VerticalAlignment="Center" />
<ContentPresenter VerticalAlignment="Center" Margin="2 0" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Background" Value="#555555" />
<Setter Property="Background" Value="{StaticResource BorderColorBrush}" />
</Trigger>
</Style.Triggers>
</Style>
Expand Down Expand Up @@ -111,7 +115,7 @@

<!-- Button Style -->
<Style x:Key="ButtonStyle1" TargetType="{x:Type Button}">
<Setter Property="Foreground" Value="{StaticResource TextColorBrush}"></Setter>
<Setter Property="Foreground" Value="{StaticResource DarkThemeBodyMediumBrush}"></Setter>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderThickness" Value="0"></Setter>
<Setter Property="FontSize" Value="10"></Setter>
Expand All @@ -126,7 +130,7 @@
</Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Foreground" Value="{StaticResource BlueBrush}" />
<Setter Property="Foreground" Value="{StaticResource Blue400Brush}" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Foreground" Value="{StaticResource MidLightBlueBrush}" />
Expand Down
18 changes: 14 additions & 4 deletions src/GraphNodeManagerViewExtension/Controls/FilterItemControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="ControlColorsAndBrushes.xaml"/>
<ui:SharedResourceDictionary Source="{x:Static ui:SharedDictionaryManager.DynamoModernDictionaryUri}" />
<ui:SharedResourceDictionary Source="{x:Static ui:SharedDictionaryManager.DynamoColorsAndBrushesDictionaryUri}" />
</ResourceDictionary.MergedDictionaries>
<local:BooleanToBorderColorConverter x:Key="BooleanToBorderColorConverter" ToggleBrush="{StaticResource BlueBrush}"/>
<local:BooleanToBorderColorConverter x:Key="BooleanToBorderColorConverter" ToggleBrush="{StaticResource Blue400Brush}"/>
<local:BooleanToColorConverter x:Key="BooleanToColorConverter"
DefaultBrush="{StaticResource DarkGreyBrush}"
HoverBrush="{StaticResource DarkMidGreyBrush}"
PressedBrush="{StaticResource LightGrayBrush}"
PressedBrush="{StaticResource PrimaryCharcoal300Brush}"
ToggleDefaultBrush="{StaticResource MidBlueBrush}"
ToggleHoverBrush="{StaticResource MidDarkBlueBrush}"
TogglePressedBrush="{StaticResource MidLightBlueBrush}" />
Expand All @@ -36,7 +37,16 @@
Converter={StaticResource BooleanToColorConverter},
ConverterParameter=Default,
UpdateSourceTrigger=PropertyChanged}">
<ContentPresenter />
<StackPanel Orientation="Horizontal">
<Image Source="{Binding FilterImage}"
Width="10"
Height="10"
SnapsToDevicePixels="True"
UseLayoutRounding="True"
VerticalAlignment="Stretch"
Margin="2 0 0 0"/>
<ContentPresenter />
</StackPanel>
</Border>

<ControlTemplate.Triggers>
Expand Down Expand Up @@ -68,7 +78,7 @@
TextAlignment="Center"
FontSize="10"
FontWeight="Medium"
Foreground="{StaticResource TextColorBrush}"
Foreground="{StaticResource DarkThemeBodyMediumBrush}"
HorizontalAlignment="Center"
VerticalAlignment="Center">
</TextBlock>
Expand Down
22 changes: 11 additions & 11 deletions src/GraphNodeManagerViewExtension/Controls/SearchBoxControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Dynamo.GraphNodeManager.Controls"
xmlns:p="clr-namespace:Dynamo.GraphNodeManager.Properties"
xmlns:ui="clr-namespace:Dynamo.UI;assembly=DynamoCoreWpf"
mc:Ignorable="d"
d:DesignHeight="40" d:DesignWidth="800">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ui:SharedResourceDictionary Source="{x:Static ui:SharedDictionaryManager.DynamoColorsAndBrushesDictionaryUri}" />
<ui:SharedResourceDictionary Source="{x:Static ui:SharedDictionaryManager.DynamoModernDictionaryUri}" />
<ResourceDictionary Source="ControlColorsAndBrushes.xaml"/>
</ResourceDictionary.MergedDictionaries>
<local:NonEmptyStringToCollapsedConverter x:Key="NonEmptyStringToCollapsedConverter"/>
Expand All @@ -18,24 +21,24 @@
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Padding" Value="15 10 5 5"/>
<Setter Property="FontSize" Value="11"/>
<Setter Property="Foreground" Value="{StaticResource TextColorBrush}"></Setter>
<Setter Property="Foreground" Value="{StaticResource DarkThemeBodyMediumBrush}"></Setter>
</Style>
<Style x:Key="TextBlockStyle" TargetType="TextBlock">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Padding" Value="15 10 5 5"/>
<Setter Property="FontSize" Value="11"/>
<Setter Property="Foreground" Value="{StaticResource TextColorBrush}"></Setter>
<Setter Property="Foreground" Value="{StaticResource DarkThemeBodyMediumBrush}"></Setter>
</Style>
<Style x:Key="BorderStyle" TargetType="Border">
<Setter Property="BorderThickness" Value="0 0 0 1"></Setter>
<Setter Property="Background" Value="Transparent"></Setter>
<Setter Property="BorderBrush" Value="{StaticResource MidGrayBrush}"></Setter>
<Style.Triggers>
<DataTrigger Binding="{Binding ElementName=SearchTextBox, Path=IsMouseOver}" Value="True">
<Setter Property="BorderBrush" Value="{StaticResource LightGrayBrush}"></Setter>
<Setter Property="BorderBrush" Value="{StaticResource PrimaryCharcoal300Brush}"></Setter>
</DataTrigger>
<DataTrigger Binding="{Binding ElementName=SearchTextBox, Path=IsFocused}" Value="True">
<Setter Property="BorderBrush" Value="{StaticResource BlueBrush}"></Setter>
<Setter Property="BorderBrush" Value="{StaticResource Blue400Brush}"></Setter>
</DataTrigger>
</Style.Triggers>
</Style>
Expand Down Expand Up @@ -94,13 +97,9 @@
Margin="2 0 0 0"
Opacity="0.5"
VerticalAlignment="Center"
Text="{Binding SearchBoxPrompt}">
<TextBlock.Visibility>
<MultiBinding Converter="{StaticResource MultiBooleanToVisibilityConverter}">
<Binding Path="SearchText"></Binding>
<Binding ElementName="SearchTextBox" Path="IsFocused"></Binding>
</MultiBinding>
</TextBlock.Visibility>
Visibility="Visible"
IsHitTestVisible="False"
Text="{x:Static p:Resources.SearchBoxWatermarkText}">
</TextBlock>

<!-- Search Box -->
Expand All @@ -112,6 +111,7 @@
Cursor="IBeam"
HorizontalAlignment="Stretch"
TextChanged="SearchTextBox_OnTextChanged"
IsKeyboardFocusWithinChanged="SearchTextBox_OnKeyboardFocusWithinChanged"
Text="{Binding SearchText, UpdateSourceTrigger=PropertyChanged}"></TextBox>

<!-- Clear Search -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,21 @@ private void OnSearchClearButtonClicked(object sender, System.Windows.Input.Mous
{
this.SearchTextBox.Clear();
}

private void SearchTextBox_OnKeyboardFocusWithinChanged(object sender, DependencyPropertyChangedEventArgs e)
{
var textBox = sender as TextBox;
if (textBox == null) return;

if (string.IsNullOrEmpty(textBox.Text) && !textBox.IsKeyboardFocusWithin)
{
SearchTextBoxWatermark.Visibility = Visibility.Visible;
}
else
{
SearchTextBoxWatermark.Visibility = Visibility.Collapsed;
}
}
}

/// <summary>
Expand Down
Loading