Repository navigation
Integrate notification banner component into Compare View (NDDB) - #4874
Conversation
Co-Authored-By: Don Okuda <[email protected]>
| getRemotes, | ||
| compareState.aheadBehindCache | ||
| ) | ||
| aheadBehindOfInferredBranch = |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
|
||
| public _setDivergingBranchBannerVisibility(visibility: boolean) { | ||
| this.isDivergingBranchBannerVisible = visibility | ||
| this.emitUpdate() |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| if (ghRepo.parent !== null && ghRepo.parent.defaultBranch !== null) { | ||
| return getDefaultBranchOfForkedGitHubRepo(repository, branches, getRemotes) | ||
| } | ||
| const potentialdefaultBranchOfParent = await getDefaultBranchOfForkedGitHubRepo( |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| this.emitUpdate() | ||
| } | ||
|
|
||
| public _setDivergingBranchBannerVisibility(visibility: boolean) { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| const range = revRange(currentBranch.tip.sha, defaultBranch.tip.sha) | ||
| const aheadBehind = await getAheadBehind(repository, range) | ||
| if (aheadBehind !== null && aheadBehind.ahead > 0) { | ||
| // I need to keep track of ahead/behind of two branches and return based on which one has ahead > 0 |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| * from the current branch | ||
| */ | ||
| readonly baseBranch: Branch | ||
| readonly onDismiss: () => void |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
|
||
| let mockComparisonCache: ComparisonCache | ||
| beforeEach(() => { | ||
| mockComparisonCache = new ComparisonCache() |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
🥇 |
|
Needs a merge from |
|
|
||
| let comparisonCache: ComparisonCache | ||
| beforeEach(() => { | ||
| comparisonCache = new ComparisonCache() |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Co-Authored-By: Brendan Forster <[email protected]>
|
Nice work @iAmWillShepherd! |
🌵 🌵 🌵 This PR depends on PRs
#4794and#4783being merged first🌵 🌵 🌵Fixes #4767
This PR is just a continuation of the work done in ☝️ and integrates it into the Compare view UI.
See the gifs 👇 to see it in action.
Testing
If you notice the banner doesn't popup right away, try clicking on another tab or performing a manual fetch ([more info](https://github.com/desktop/desktop/projects/10#card-10732873))Unpublished repository
masteror another branch)mastermasterPublished repository (non-fork)
Published repository (non-fork) with PR
Published repository (fork) - Starting point for new project (origin/default-branch is ahead of current branch)
Published repository (fork) - Contributing to another project (origin/default-branch is not ahead of current branch)
upstream/master)