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

Fixing Checks GraphQL query on GitHub Enterprise #2122

Merged
merged 7 commits into from
Dec 12, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
Prev Previous commit
Next Next commit
Revert "Hiding the checks section if there are no checks to display"
This reverts commit f3635e9.
  • Loading branch information
StanleyGoldman committed Dec 11, 2018
commit eaef6c687586c3b24dd9042409b99d5ea3fbe7d1
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ public PullRequestDetailViewModelDesigner()
Files = new PullRequestFilesViewModelDesigner();

Checks = Array.Empty<PullRequestCheckViewModelDesigner>();
HasChecks = false;
}

public PullRequestDetailModel Model { get; }
Expand Down Expand Up @@ -130,7 +129,6 @@ public PullRequestDetailViewModelDesigner()
public ReactiveCommand<IPullRequestCheckViewModel, Unit> ShowAnnotations { get; }

public IReadOnlyList<IPullRequestCheckViewModel> Checks { get; }
public bool HasChecks { get; }

public Task InitializeAsync(LocalRepositoryModel localRepository, IConnection connection, string owner, string repo, int number) => Task.CompletedTask;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ public sealed class PullRequestDetailViewModel : PanePageViewModelBase, IPullReq
Uri webUrl;
IDisposable sessionSubscription;
IReadOnlyList<IPullRequestCheckViewModel> checks;
bool hasChecks;

/// <summary>
/// Initializes a new instance of the <see cref="PullRequestDetailViewModel"/> class.
Expand Down Expand Up @@ -283,13 +282,6 @@ public IReadOnlyList<IPullRequestCheckViewModel> Checks
private set { this.RaiseAndSetIfChanged(ref checks, value); }
}

/// <inheritdoc/>
public bool HasChecks
{
get { return hasChecks; }
private set { this.RaiseAndSetIfChanged(ref hasChecks, value); }
}

/// <inheritdoc/>
public async Task InitializeAsync(
LocalRepositoryModel localRepository,
Expand Down Expand Up @@ -359,7 +351,6 @@ public async Task Load(PullRequestDetailModel pullRequest)
Reviews = PullRequestReviewSummaryViewModel.BuildByUser(Session.User, pullRequest).ToList();

Checks = PullRequestCheckViewModel.Build(viewViewModelFactory, pullRequest)?.ToList();
HasChecks = Checks?.Any() ?? false;

await Files.InitializeAsync(Session);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,6 @@ public interface IPullRequestDetailViewModel : IPanePageViewModel, IOpenInBrowse
/// </summary>
IReadOnlyList<IPullRequestCheckViewModel> Checks { get; }

/// <summary>
/// Flag that indicates if there are checks or statuses to display.
/// </summary>
bool HasChecks { get; }

/// <summary>
/// Initializes the view model.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,7 @@
HeaderText="Checks"
IsExpanded="True"
Margin="0 8 0 0"
ghfvs:ScrollingVerticalStackPanel.IsFixed="true"
Visibility="{Binding HasChecks, Converter={ghfvs:BooleanToVisibilityConverter}}">
ghfvs:ScrollingVerticalStackPanel.IsFixed="true">
<ItemsControl ItemsSource="{Binding Checks}" Margin="0 4 12 4">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
Expand Down