Skip to content

Commit

Permalink
DYN-1999 Adding a section for users to provide feedback. (DynamoDS#9822)
Browse files Browse the repository at this point in the history
* DYN-1999 Adding a section for users to provide feedback.

* Removing extra styling

* Extra spacing

* Addressing comments

* Addressing comments

Adding to resource and configuration files.

* Setting grid row value to zero.

* Changing background color

(cherry picked from commit 8202644)
  • Loading branch information
reddyashish committed Jul 2, 2019
1 parent 1ebcc54 commit 74ccbc4
Show file tree
Hide file tree
Showing 7 changed files with 122 additions and 5 deletions.
27 changes: 27 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.

9 changes: 9 additions & 0 deletions src/DynamoCoreWpf/Properties/Resources.en-US.resx
Original file line number Diff line number Diff line change
Expand Up @@ -2199,4 +2199,13 @@ Do you want to install the latest Dynamo update?</value>
<data name="ExtensionAlreadyPresent" xml:space="preserve">
<value>No new tab is added, as the extension is already present in the extensions side bar.</value>
</data>
<data name="ProvideFeedbackButton" xml:space="preserve">
<value> Provide Feedback</value>
</data>
<data name="PreviewText" xml:space="preserve">
<value> This Feature is in Preview! </value>
</data>
<data name="ProvideFeedbackError" xml:space="preserve">
<value>Could not re-direct to the Dynamo forum page for feedback:</value>
</data>
</root>
9 changes: 9 additions & 0 deletions src/DynamoCoreWpf/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -2202,4 +2202,13 @@ Want to publish a different package?</value>
<data name="ExtensionAlreadyPresent" xml:space="preserve">
<value>No new tab is added, as the extension is already present in the extensions side bar.</value>
</data>
<data name="ProvideFeedbackButton" xml:space="preserve">
<value> Provide Feedback</value>
</data>
<data name="PreviewText" xml:space="preserve">
<value> This Feature is in Preview! </value>
</data>
<data name="ProvideFeedbackError" xml:space="preserve">
<value>Could not re-direct to the Dynamo forum page for feedback:</value>
</data>
</root>
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,9 @@
<Color x:Key="SelectionColor">#009EFF</Color>
<Color x:Key="MaterialColor">#efede4</Color>

<!--Sidebar-->
<!--Extensions Sidebar-->
<SolidColorBrush x:Key="BorderBrushWhite" Color="#FF3F4040" />
<SolidColorBrush x:Key="FeedbackSectionBackground" Color="#4192D9" />

<!-- Library background-->
<SolidColorBrush x:Key="SearchTextBoxBackground" Color="#F1F2F2" />
Expand Down
6 changes: 3 additions & 3 deletions src/DynamoCoreWpf/Views/Core/DynamoView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -1677,7 +1677,7 @@
Grid.Row="2"
Grid.Column="4"
Grid.RowSpan="2">
<TabControl Name="tabDynamic" ItemsSource="{Binding}">
<TabControl Name="tabDynamic" Background="#353535" BorderThickness="0" ItemsSource="{Binding}">
<TabControl.Resources>
<!--Styling for the close button in the tab-->
<Style TargetType="{x:Type Button}"
Expand Down Expand Up @@ -1711,7 +1711,7 @@
</Setter>
</Style>

<!--Template for each tab item in the extensions side bar-->
<!--Template for tab header in the extensions side bar-->
<DataTemplate x:Key="TabHeader" DataType="TabItem">
<DockPanel HorizontalAlignment="Stretch" MinWidth="{Binding Source={x:Static configuration:Configurations.ExtensionsSideBarTabMinWidth}}">
<TextBlock Text="{Binding RelativeSource={RelativeSource AncestorType={x:Type TabItem}}, Path=Header}" HorizontalAlignment="Stretch"/>
Expand Down Expand Up @@ -1862,7 +1862,7 @@
Grid.Row="2"
Grid.RowSpan="2"
Height="Auto"
Width="3"
Width="0"
Name="extensionSplitter"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Expand Down
57 changes: 56 additions & 1 deletion src/PackageDependencyViewExtension/PackageDependencyView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,19 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:p="clr-namespace:Dynamo.Wpf.Properties;assembly=DynamoCoreWpf"
xmlns:ui="clr-namespace:Dynamo.UI;assembly=DynamoCoreWpf"
mc:Ignorable="d"
VerticalAlignment="Top"
HorizontalAlignment="Left">
<Grid Background= "#353535" Height="800">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ui:SharedResourceDictionary Source="{x:Static ui:SharedDictionaryManager.DynamoColorsAndBrushesDictionaryUri}" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>
<Grid Background= "#353535" Height="860">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
Expand Down Expand Up @@ -86,5 +95,51 @@
</TextBlock>
</Button>
</Grid>-->

<!-- Template for the feedback banner -->
<DockPanel Name="Feedback" Margin="0,800,0,40" Grid.Row="0">
<StatusBar Background="{StaticResource FeedbackSectionBackground}" DockPanel.Dock="Bottom" Height="55">
<!-- Preview text -->
<StatusBarItem>
<Border Height="50">
<TextBlock TextWrapping="Wrap" Padding="10,0,10,0" FontSize="15" Foreground="White" Text="{x:Static p:Resources.PreviewText}" VerticalAlignment="Center"/>
</Border>
</StatusBarItem>
<StatusBarItem Width="193" Margin="100,0,0,0" Height="40">
<Border Name="FeedbackBorder" BorderThickness="1">
<Border.Style>
<Style>
<Style.Triggers>
<Trigger Property="Border.IsMouseOver" Value="True">
<Setter Property="Border.BorderBrush" Value="White" />
</Trigger>
<Trigger Property="Border.IsMouseOver" Value="False">
<Setter Property="Border.BorderBrush" Value="#373737" />
</Trigger>
</Style.Triggers>
</Style>
</Border.Style>
<!-- Feedback button -->
<Button HorizontalAlignment="Right"
Width="150" Click="ProvideFeedback" Background="#373737" Height="30">
<TextBlock TextWrapping="Wrap" FontSize="15" Foreground="White" Height="20" Text="{x:Static p:Resources.ProvideFeedbackButton}" VerticalAlignment="Center"/>
<Button.Style>
<Style TargetType="{x:Type Button}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border Background="{TemplateBinding Background}">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Button.Style>
</Button>
</Border>
</StatusBarItem>
</StatusBar>
</DockPanel>
</Grid>
</UserControl>
16 changes: 16 additions & 0 deletions src/PackageDependencyViewExtension/PackageDependencyView.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;

Expand All @@ -17,6 +18,8 @@ public partial class PackageDependencyView : UserControl

private WorkspaceModel currentWorkspace;

private String FeedbackLink = "https://forum.dynamobim.com/t/call-for-feedback-on-dynamo-graph-package-dependency-display/37229";

private ViewLoadedParams loadedParams;
private PackageDependencyViewExtension dependencyViewExtension;

Expand All @@ -38,6 +41,19 @@ private Boolean HasMissingPackage
}
}

/// <summary>
/// Re-directs to a web link to get the feedback from the user.
/// </summary>
private void ProvideFeedback(object sender, EventArgs e)
{
try {
System.Diagnostics.Process.Start(FeedbackLink);
}
catch (Exception ex) {
String message = Dynamo.Wpf.Properties.Resources.ProvideFeedbackError + "\n\n" + ex.Message;
MessageBox.Show(message, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
}
}

/// <summary>
/// Event handler for workspaceAdded event
Expand Down

0 comments on commit 74ccbc4

Please sign in to comment.