Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit d5927bd

Browse files
committed
Merge pull request #241 from github/don/stub-ui
[WIP] Add Pull Request Creation View
2 parents 4c1b21f + a20689b commit d5927bd

18 files changed

+1013
-55
lines changed

src/GitHub.App/SampleData/PullRequestCreationViewModelDesigner.cs

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,27 @@ public class PullRequestCreationViewModelDesigner : BaseViewModelDesigner, IPull
99
{
1010
public PullRequestCreationViewModelDesigner()
1111
{
12-
Name = "Bla bla bla";
12+
Branches = new List<string>()
13+
{
14+
"don/stub-ui",
15+
"feature/pr/views",
16+
"release-1.0.17.0"
17+
};
18+
19+
CurrentBranchName = "fix-everything";
20+
SelectedAssignee = "Haacked (Phil Haack)";
21+
TargetBranchName = "master";
1322
Users = new List<string>()
1423
{
15-
"haacked",
16-
"shana"
24+
"Haacked (Phil Haack)",
25+
"shana (Andreia Gaita)"
1726
};
1827
}
1928

20-
public string Name { get; set; }
29+
public string CurrentBranchName { get; set; }
30+
public string SelectedAssignee { get; set; }
31+
public string TargetBranchName { get; set; }
32+
public List<string> Branches { get; set; }
2133
public List<string> Users { get; set; }
2234
}
2335
}

src/GitHub.UI/Assets/Buttons.xaml

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,28 +17,16 @@
1717
<!-- Button -->
1818
<Style x:Key="GitHubButton" TargetType="{x:Type Button}">
1919
<Style.Resources>
20-
<LinearGradientBrush x:Key="GitHubButtonBackgroundGradientBrush" StartPoint="0.5,0" EndPoint="0.5,1">
21-
<GradientStop Color="#FFF1F1F1" Offset="0" />
22-
<GradientStop Color="#FFE1E1E1" Offset="1" />
23-
</LinearGradientBrush>
24-
<LinearGradientBrush x:Key="GitHubButtonBackgroundMouseOverGradientBrush" StartPoint="0.5,0" EndPoint="0.5,1">
25-
<GradientStop Color="#FFE8E8E8" Offset="0" />
26-
<GradientStop Color="#FFD7D7D7" Offset="1" />
27-
</LinearGradientBrush>
28-
<LinearGradientBrush x:Key="GitHubButtonBackgroundPressedGradientBrush" StartPoint="0.5,0" EndPoint="0.5,1">
29-
<GradientStop Color="#FFE8E8E8" Offset="0" />
30-
<GradientStop Color="#FFCDCDCD" Offset="1" />
31-
</LinearGradientBrush>
32-
<LinearGradientBrush x:Key="GitHubButtonBackgroundDisabledGradientBrush" StartPoint="0.5,0" EndPoint="0.5,1">
33-
<GradientStop Color="#FFFCFCFC" Offset="0" />
34-
<GradientStop Color="#FFEBEBEB" Offset="1" />
35-
</LinearGradientBrush>
20+
<SolidColorBrush x:Key="GitHubButtonBackgroundBrush" Color="#FFECECF1" />
21+
<SolidColorBrush x:Key="GitHubButtonBackgroundMouseOverBrush" Color="#FFDDDDE6" />
22+
<SolidColorBrush x:Key="GitHubButtonBackgroundPressedBrush" Color="#FFCFCFDB" />
23+
<SolidColorBrush x:Key="GitHubButtonBackgroundDisabledBrush" Color="#FFFCFCFC" />
3624
<SolidColorBrush x:Key="GitHubButtonForegroundBrush" Color="#FF666666" />
3725
<SolidColorBrush x:Key="GitHubButtonBorderBrush" Color="#FFCACACA" />
3826
<SolidColorBrush x:Key="GitHubButtonBorderMouseOverBrush" Color="#FFCACACA" />
3927
<SolidColorBrush x:Key="GitHubButtonBorderPressedBrush" Color="#FFBFBFBF" />
4028
</Style.Resources>
41-
<Setter Property="Background" Value="{DynamicResource GitHubButtonBackgroundGradientBrush}" />
29+
<Setter Property="Background" Value="{DynamicResource GitHubButtonBackgroundBrush}" />
4230
<Setter Property="BorderBrush" Value="{DynamicResource GitHubButtonBorderBrush}" />
4331
<Setter Property="Foreground" Value="{DynamicResource GitHubButtonForegroundBrush}" />
4432
<Setter Property="FontFamily" Value="{DynamicResource GitHubFontFamilyNormal}" />
@@ -96,13 +84,13 @@
9684
BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="True"
9785
Background="{TemplateBinding Background}" />
9886
<Rectangle x:Name="DisabledVisualElement"
99-
Fill="{StaticResource GitHubButtonBackgroundDisabledGradientBrush}" SnapsToDevicePixels="True" IsHitTestVisible="false"
87+
Fill="{StaticResource GitHubButtonBackgroundDisabledBrush}" SnapsToDevicePixels="True" IsHitTestVisible="false"
10088
Opacity="0" />
10189
<Border x:Name="MouseOverBorder" BorderBrush="{StaticResource GitHubButtonBorderMouseOverBrush}"
102-
Background="{StaticResource GitHubButtonBackgroundMouseOverGradientBrush}"
90+
Background="{StaticResource GitHubButtonBackgroundMouseOverBrush}"
10391
BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="True" Opacity="0" />
10492
<Border x:Name="PressedBorder" BorderBrush="{StaticResource GitHubButtonBorderPressedBrush}"
105-
Background="{StaticResource GitHubButtonBackgroundPressedGradientBrush}"
93+
Background="{StaticResource GitHubButtonBackgroundPressedBrush}"
10694
BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="True" Opacity="0" />
10795
<Border x:Name="DefaultVisualElement" BorderBrush="{DynamicResource GitHubAccentBrush}"
10896
Background="Transparent" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="True" Opacity="0" />
@@ -231,4 +219,5 @@
231219
</Setter.Value>
232220
</Setter>
233221
</Style>
222+
234223
</ResourceDictionary>

src/GitHub.UI/Assets/Controls/FilterTextBox.xaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
</Border>
4141
</Border>
4242

43-
<Grid Margin="1,0,0,0">
43+
<Grid Margin="1,1,0,0">
4444
<ScrollViewer
4545
x:Name="PART_ContentHost"
4646
Padding="{TemplateBinding Padding}"
@@ -51,7 +51,7 @@
5151
Margin="0"/>
5252
<Label x:Name="PromptLabel"
5353
FontSize="{TemplateBinding FontSize}"
54-
Foreground="{DynamicResource GitHubForegroundBrush}"
54+
Foreground="{TemplateBinding Foreground}"
5555
Margin="2,0,0,0"
5656
Padding="{TemplateBinding Padding}"
5757
Opacity="0"
@@ -63,6 +63,7 @@
6363
VerticalAlignment="Top">
6464
<TextBlock
6565
Text="{TemplateBinding PromptText}"
66+
Opacity="0.5"
6667
TextTrimming="CharacterEllipsis" />
6768
</Label>
6869
</Grid>
@@ -122,7 +123,6 @@
122123
</Trigger>
123124
<DataTrigger Binding="{Binding Text.Length, RelativeSource={RelativeSource Self}}" Value="0">
124125
<Setter Property="Opacity" TargetName="PromptLabel" Value="0.7" />
125-
<Setter Property="Foreground" Value="Transparent" />
126126
<Setter Property="Visibility" TargetName="clearButton" Value="Collapsed" />
127127
</DataTrigger>
128128
</ControlTemplate.Triggers>

src/GitHub.UI/Assets/TextBlocks.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
</Border>
7272
</Border>
7373

74-
<Grid Margin="1,0,0,0">
74+
<Grid Margin="1,2,0,0">
7575
<ScrollViewer x:Name="PART_ContentHost" Padding="{TemplateBinding Padding}" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden" VerticalAlignment="Top" Margin="0"/>
7676
<Label x:Name="PromptLabel" HorizontalAlignment="Left"
7777
Foreground="{DynamicResource GHTextBrush}"

src/GitHub.VisualStudio/GitHub.VisualStudio.csproj

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,22 @@
362362
<SubType>Designer</SubType>
363363
<Generator>MSBuild:Compile</Generator>
364364
</Page>
365+
<Page Include="Styles\Buttons.xaml">
366+
<SubType>Designer</SubType>
367+
<Generator>MSBuild:Compile</Generator>
368+
</Page>
369+
<Page Include="Styles\GitHubComboBox.xaml">
370+
<SubType>Designer</SubType>
371+
<Generator>MSBuild:Compile</Generator>
372+
</Page>
373+
<Page Include="Styles\GitHubTabControl.xaml">
374+
<SubType>Designer</SubType>
375+
<Generator>MSBuild:Compile</Generator>
376+
</Page>
377+
<Page Include="Styles\TextBlocks.xaml">
378+
<SubType>Designer</SubType>
379+
<Generator>MSBuild:Compile</Generator>
380+
</Page>
365381
<Page Include="Styles\ThemeBlue.xaml">
366382
<Generator>MSBuild:Compile</Generator>
367383
<SubType>Designer</SubType>

src/GitHub.VisualStudio/SharedDictionary.xaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,16 @@
22
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
33
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
44
xmlns:PresentationOptions="http://schemas.microsoft.com/winfx/2006/xaml/presentation/options"
5+
xmlns:ui="clr-namespace:GitHub.UI;assembly=GitHub.UI"
56
xmlns:cache="clr-namespace:GitHub.VisualStudio.Helpers">
67

78
<ResourceDictionary.MergedDictionaries>
89
<cache:SharedDictionaryManager Source="pack://application:,,,/GitHub.VisualStudio;component/Styles/ThemeDesignTime.xaml"/>
910
<cache:SharedDictionaryManager Source="pack://application:,,,/GitHub.VisualStudio;component/Styles/ActionLinkButton.xaml" />
11+
<cache:SharedDictionaryManager Source="pack://application:,,,/GitHub.VisualStudio;component/Styles/GitHubComboBox.xaml" />
12+
<cache:SharedDictionaryManager Source="pack://application:,,,/GitHub.VisualStudio;component/Styles/Buttons.xaml" />
13+
<cache:SharedDictionaryManager Source="pack://application:,,,/GitHub.VisualStudio;component/Styles/GitHubTabControl.xaml" />
14+
<cache:SharedDictionaryManager Source="pack://application:,,,/GitHub.VisualStudio;component/Styles/TextBlocks.xaml" />
1015
</ResourceDictionary.MergedDictionaries>
1116

1217
<Style x:Key="VSStyledButton" BasedOn="{StaticResource VsButtonStyleKey}" TargetType="{x:Type Button}" />

0 commit comments

Comments
 (0)