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

Commit 2f3379b

Browse files
authored
Merge branch 'master' into fixes/2149-search-box-crash
2 parents 458b0d0 + 285c664 commit 2f3379b

File tree

4 files changed

+7
-15
lines changed

4 files changed

+7
-15
lines changed

src/GitHub.App/ViewModels/Dialog/Clone/RepositoryCloneViewModel.cs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@ public async Task InitializeAsync(IConnection connection)
137137

138138
this.WhenAnyValue(x => x.SelectedTabIndex).Subscribe(x => tabs[x].Activate().Forget());
139139

140-
// When a clipboard URL has been set or a user is in group A, show the URL tab by default
141-
if (!string.IsNullOrEmpty(UrlTab.Url) || await IsGroupA().ConfigureAwait(false))
140+
// When a clipboard URL has been set, show the URL tab by default
141+
if (!string.IsNullOrEmpty(UrlTab.Url))
142142
{
143143
SelectedTabIndex = 2;
144144
}
@@ -157,14 +157,6 @@ public async Task InitializeAsync(IConnection connection)
157157
}
158158
}
159159

160-
// Put 50% of users in group A
161-
async Task<bool> IsGroupA()
162-
{
163-
var userGuid = await usageService.GetUserGuid().ConfigureAwait(false);
164-
var lastByte = userGuid.ToByteArray().Last();
165-
return lastByte % 2 == 0;
166-
}
167-
168160
void BrowseForDirectory()
169161
{
170162
var result = os.Dialog.BrowseForDirectory(Path, Resources.BrowseForDirectory);

src/GitHub.VisualStudio.UI/Views/GitHubPane/GitHubPaneView.xaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
<uic:InfoPanel x:Name="infoPanel"
4444
DockPanel.Dock="Top"
4545
Message="{Binding Message}"
46+
ShowCloseButton="True"
4647
VerticalAlignment="Top"/>
4748
<StackPanel DockPanel.Dock="Top"
4849
Margin="6,9,9,5"

src/GitHub.VisualStudio.UI/Views/GitHubPane/GitHubPaneView.xaml.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ public GitHubPaneView(INotificationDispatcher notifications)
2727

2828
this.WhenActivated(d =>
2929
{
30-
infoPanel.Visibility = Visibility.Collapsed;
3130
d(notifications.Listen()
3231
.ObserveOnDispatcher(DispatcherPriority.Normal)
3332
.Subscribe(n =>

test/GitHub.App.UnitTests/ViewModels/Dialog/Clone/RepositoryCloneViewModelTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ public async Task GitHubPage_Is_Initialized()
3737

3838
[TestCase("https://github.com", null, false, 0)]
3939
[TestCase("https://enterprise.com", null, false, 1)]
40-
[TestCase("https://github.com", null, true, 2, Description = "Show URL tab for GitHub connections")]
41-
[TestCase("https://enterprise.com", null, true, 2, Description = "Show URL tab for Enterprise connections")]
40+
[TestCase("https://github.com", null, true, 0, Description = "Show URL tab for GitHub connections")]
41+
[TestCase("https://enterprise.com", null, true, 1, Description = "Show URL tab for Enterprise connections")]
4242
[TestCase("https://github.com", "https://github.com/github/visualstudio", false, 2)]
4343
[TestCase("https://enterprise.com", "https://enterprise.com/owner/repo", false, 2)]
4444
public async Task Default_SelectedTabIndex_For_Group(string address, string clipboardUrl, bool isGroupA, int expectTabIndex)
@@ -56,8 +56,8 @@ public async Task Default_SelectedTabIndex_For_Group(string address, string clip
5656

5757
[TestCase("https://github.com", false, 1, nameof(UsageModel.MeasuresModel.NumberOfCloneViewGitHubTab))]
5858
[TestCase("https://enterprise.com", false, 1, nameof(UsageModel.MeasuresModel.NumberOfCloneViewEnterpriseTab))]
59-
[TestCase("https://github.com", true, 1, nameof(UsageModel.MeasuresModel.NumberOfCloneViewUrlTab))]
60-
[TestCase("https://enterprise.com", true, 1, nameof(UsageModel.MeasuresModel.NumberOfCloneViewUrlTab))]
59+
[TestCase("https://github.com", true, 1, nameof(UsageModel.MeasuresModel.NumberOfCloneViewGitHubTab))]
60+
[TestCase("https://enterprise.com", true, 1, nameof(UsageModel.MeasuresModel.NumberOfCloneViewEnterpriseTab))]
6161
public async Task IncrementCounter_Showing_Default_Tab(string address, bool isGroupA, int numberOfCalls, string counterName)
6262
{
6363
var cm = CreateConnectionManager(address);

0 commit comments

Comments
 (0)