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

Commit c6d7304

Browse files
authored
Merge pull request #1955 from github/refactor/move-views
Refactor: Move views to GitHub.VisualStudio.UI
2 parents 13a2da0 + d9ab704 commit c6d7304

File tree

87 files changed

+94
-307
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+94
-307
lines changed

src/GitHub.InlineReviews/SampleData/CommentThreadViewModelDesigner.cs renamed to src/GitHub.App/SampleData/CommentThreadViewModelDesigner.cs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
1-
using System;
2-
using System.Collections.ObjectModel;
1+
using System.Collections.ObjectModel;
32
using System.Diagnostics.CodeAnalysis;
43
using System.Reactive;
5-
using GitHub.InlineReviews.ViewModels;
6-
using GitHub.Models;
74
using GitHub.ViewModels;
85
using ReactiveUI;
96

10-
namespace GitHub.InlineReviews.SampleData
7+
namespace GitHub.SampleData
118
{
129
[SuppressMessage("Microsoft.Performance", "CA1812:AvoidUninstantiatedInternalClasses")]
13-
class CommentThreadViewModelDesigner : ICommentThreadViewModel
10+
public class CommentThreadViewModelDesigner : ICommentThreadViewModel
1411
{
1512
public ObservableCollection<ICommentViewModel> Comments { get; }
1613
= new ObservableCollection<ICommentViewModel>();

src/GitHub.InlineReviews/SampleData/CommentViewModelDesigner.cs renamed to src/GitHub.App/SampleData/CommentViewModelDesigner.cs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
using System;
2-
using System.Reactive;
32
using System.Diagnostics.CodeAnalysis;
4-
using GitHub.InlineReviews.ViewModels;
5-
using ReactiveUI;
3+
using System.Reactive;
64
using GitHub.ViewModels;
5+
using ReactiveUI;
76

8-
namespace GitHub.InlineReviews.SampleData
7+
namespace GitHub.SampleData
98
{
109
[SuppressMessage("Microsoft.Performance", "CA1812:AvoidUninstantiatedInternalClasses")]
11-
class CommentViewModelDesigner : ReactiveObject, ICommentViewModel
10+
public class CommentViewModelDesigner : ReactiveObject, ICommentViewModel
1211
{
1312
public CommentViewModelDesigner()
1413
{

src/GitHub.InlineReviews/Services/CommentService.cs renamed to src/GitHub.App/Services/CommentService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using System.Globalization;
33
using System.Windows.Forms;
44

5-
namespace GitHub.InlineReviews.Services
5+
namespace GitHub.Services
66
{
77
[Export(typeof(ICommentService))]
88
[PartCreationPolicy(CreationPolicy.NonShared)]

src/GitHub.InlineReviews/ViewModels/CommentThreadViewModel.cs renamed to src/GitHub.App/ViewModels/CommentThreadViewModel.cs

File renamed without changes.

src/GitHub.InlineReviews/ViewModels/CommentViewModel.cs renamed to src/GitHub.App/ViewModels/CommentViewModel.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@
33
using System.Reactive;
44
using System.Reactive.Linq;
55
using System.Threading.Tasks;
6-
using System.Windows;
76
using GitHub.Extensions;
8-
using GitHub.InlineReviews.Services;
97
using GitHub.Logging;
108
using GitHub.Models;
9+
using GitHub.Services;
1110
using GitHub.ViewModels;
1211
using ReactiveUI;
1312
using Serilog;

src/GitHub.InlineReviews/Services/ICommentService.cs renamed to src/GitHub.Exports.Reactive/Services/ICommentService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace GitHub.InlineReviews.Services
1+
namespace GitHub.Services
22
{
33
/// <summary>
44
/// This service allows for functionality to be injected into the chain of different peek Comment ViewModel types.

src/GitHub.InlineReviews/ViewModels/ICommentThreadViewModel.cs renamed to src/GitHub.Exports.Reactive/ViewModels/ICommentThreadViewModel.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
1-
using System;
2-
using System.Collections.ObjectModel;
1+
using System.Collections.ObjectModel;
32
using System.Reactive;
4-
using GitHub.Models;
5-
using GitHub.ViewModels;
63
using ReactiveUI;
74

8-
namespace GitHub.InlineReviews.ViewModels
5+
namespace GitHub.ViewModels
96
{
107
/// <summary>
118
/// A comment thread.

src/GitHub.InlineReviews/ViewModels/ICommentViewModel.cs renamed to src/GitHub.Exports.Reactive/ViewModels/ICommentViewModel.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
using System;
22
using System.Reactive;
3-
using GitHub.Models;
4-
using GitHub.ViewModels;
53
using ReactiveUI;
64

7-
namespace GitHub.InlineReviews.ViewModels
5+
namespace GitHub.ViewModels
86
{
97
public enum CommentEditState
108
{

src/GitHub.InlineReviews/GitHub.InlineReviews.csproj

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,6 @@
8484
<Compile Include="Margins\InlineCommentMargin.cs" />
8585
<Compile Include="Margins\InlineCommentMarginVisible.cs" />
8686
<Compile Include="Margins\InlineCommentMarginEnabled.cs" />
87-
<Compile Include="Services\CommentService.cs" />
88-
<Compile Include="Services\ICommentService.cs" />
8987
<Compile Include="PullRequestStatusBarPackage.cs" />
9088
<Compile Include="InlineReviewsPackage.cs" />
9189
<Compile Include="Models\InlineCommentThreadModel.cs" />
@@ -102,7 +100,6 @@
102100
<Compile Include="Peek\InlineCommentPeekResultPresentation.cs" />
103101
<Compile Include="Peek\InlineCommentPeekResultPresenter.cs" />
104102
<Compile Include="Properties\AssemblyInfo.cs" />
105-
<Compile Include="SampleData\CommentThreadViewModelDesigner.cs" />
106103
<Compile Include="Services\IInlineCommentPeekService.cs" />
107104
<Compile Include="Services\IPullRequestSessionService.cs" />
108105
<Compile Include="Services\InlineCommentPeekService.cs" />
@@ -111,9 +108,6 @@
111108
<Compile Include="Margins\InlineCommentMarginProvider.cs" />
112109
<Compile Include="Services\PullRequestSessionService.cs" />
113110
<Compile Include="ViewModels\PullRequestFileMarginViewModel.cs" />
114-
<Compile Include="ViewModels\CommentViewModel.cs" />
115-
<Compile Include="ViewModels\ICommentThreadViewModel.cs" />
116-
<Compile Include="ViewModels\CommentThreadViewModel.cs" />
117111
<Compile Include="ViewModels\InlineCommentPeekViewModel.cs" />
118112
<Compile Include="ViewModels\IPullRequestReviewCommentViewModel.cs" />
119113
<Compile Include="ViewModels\NewInlineCommentThreadViewModel.cs" />
@@ -128,7 +122,6 @@
128122
<Compile Include="Views\InlineCommentPeekView.xaml.cs">
129123
<DependentUpon>InlineCommentPeekView.xaml</DependentUpon>
130124
</Compile>
131-
<Compile Include="SampleData\CommentViewModelDesigner.cs" />
132125
<Compile Include="Services\DiffService.cs" />
133126
<Compile Include="Services\IDiffService.cs" />
134127
<Compile Include="Tags\AddInlineCommentTag.cs" />
@@ -144,13 +137,6 @@
144137
<Compile Include="Tags\InlineCommentTagger.cs" />
145138
<Compile Include="Tags\InlineCommentTaggerProvider.cs" />
146139
<Compile Include="ViewModels\InlineCommentThreadViewModel.cs" />
147-
<Compile Include="ViewModels\ICommentViewModel.cs" />
148-
<Compile Include="Views\CommentThreadView.xaml.cs">
149-
<DependentUpon>CommentThreadView.xaml</DependentUpon>
150-
</Compile>
151-
<Compile Include="Views\CommentView.xaml.cs">
152-
<DependentUpon>CommentView.xaml</DependentUpon>
153-
</Compile>
154140
<Compile Include="Views\PullRequestStatusView.xaml.cs">
155141
<DependentUpon>PullRequestStatusView.xaml</DependentUpon>
156142
</Compile>
@@ -460,14 +446,6 @@
460446
<Generator>MSBuild:Compile</Generator>
461447
<SubType>Designer</SubType>
462448
</Page>
463-
<Page Include="Views\CommentThreadView.xaml">
464-
<Generator>MSBuild:Compile</Generator>
465-
<SubType>Designer</SubType>
466-
</Page>
467-
<Page Include="Views\CommentView.xaml">
468-
<Generator>MSBuild:Compile</Generator>
469-
<SubType>Designer</SubType>
470-
</Page>
471449
<Page Include="Views\PullRequestStatusView.xaml">
472450
<SubType>Designer</SubType>
473451
<Generator>MSBuild:Compile</Generator>
@@ -481,7 +459,9 @@
481459
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
482460
</Content>
483461
</ItemGroup>
484-
<ItemGroup />
462+
<ItemGroup>
463+
<Folder Include="SampleData\" />
464+
</ItemGroup>
485465
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
486466
<Import Project="$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets" Condition="'$(VSToolsPath)' != '' And '$(NCrunch)' != '1'" />
487467
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">

src/GitHub.InlineReviews/ViewModels/IPullRequestReviewCommentViewModel.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System;
22
using System.Reactive;
3+
using GitHub.ViewModels;
34
using ReactiveUI;
45

56
namespace GitHub.InlineReviews.ViewModels

0 commit comments

Comments
 (0)