Skip to content

use shared components for merge and rebase conflicts#7030

Merged
iAmWillShepherd merged 8 commits intodevelopmentfrom
shiftkey/rebase/use-shared-manual-conflicts
Mar 12, 2019
Merged

use shared components for merge and rebase conflicts#7030
iAmWillShepherd merged 8 commits intodevelopmentfrom
shiftkey/rebase/use-shared-manual-conflicts

Conversation

@shiftkey
Copy link
Member

@shiftkey shiftkey commented Mar 7, 2019

Overview

Closes #6904

Description

This PR addresses some cleanup post 1.6.3 that brings together the merge conflicts and rebase conflicts components, given how much overlap they have:

  • introduced app/src/ui/lib/conflicts/ module to contain shared functionality
  • moved small render functions as well as renderUnmergedFile into this directory
  • gutted most of RebaseConflictsDialog in favour of using shared components
  • tidied up some usages inside MergeConflictsDialog to use the render functions

Testing:

  • trigger merge conflicts, confirm visuals and behaviour is 💎
  • trigger manual merge conflicts, confirm visuals and behaviour is 💎
  • trigger rebase conflicts, confirm visuals and behaviour is 💎
  • trigger manual rebase conflicts, confirm visuals and behaviour is 💎

Release notes

Notes:

@shiftkey shiftkey added this to the 1.7.0 milestone Mar 7, 2019
@shiftkey shiftkey force-pushed the shiftkey/rebase/use-shared-manual-conflicts branch from 8e0f14d to 6798c57 Compare March 7, 2019 19:51
@shiftkey
Copy link
Member Author

shiftkey commented Mar 7, 2019

I added ec327ff to this branch because rebase terminology uses the opposite names for "ours" and "theirs" while doing a rebase. To illustrate before the change:

With that last commit, the change is correctly associated:

You'll also note that sometimes we lack the context for listing both branches when dealing with rebase conflicts - once Git kicks off the rebase it uses the base commit ID rather than ref, so in this case (with an in-progress rebase) we are unable to resolve the base branch to show in this context menu. Hopefully once we can get the full rebase flow baked we'll be able to track the branch name when the rebase started and flow that through to the other dialogs.

@shiftkey shiftkey changed the title use shared manual conflicts components use shared components for merge and rebase conflicts Mar 7, 2019
@shiftkey shiftkey added tech-debt Issues and pull requests related to addressing technical debt or improving the codebase ready-for-review Pull Requests that are ready to be reviewed by the maintainers labels Mar 7, 2019
openThisRepositoryInShell: () => void
): JSX.Element {
return (
<div>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we return a simple fragment (<>all the stuff</>) here since this div node doesn't have an Id or class.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want to leave this as-is because this is how it was written for use in Merge Conflicts, and cc @outofambit for feels when she returns next week.

@iAmWillShepherd iAmWillShepherd self-assigned this Mar 8, 2019
@shiftkey shiftkey marked this pull request as ready for review March 8, 2019 14:46
iAmWillShepherd
iAmWillShepherd previously approved these changes Mar 8, 2019
@tierninho
Copy link
Contributor

trigger merge conflicts, confirm visuals and behaviour is 💎
trigger manual merge conflicts, confirm visuals and behaviour is 💎
trigger rebase conflicts, confirm visuals and behaviour is 💎
trigger manual rebase conflicts, confirm visuals and behaviour is 💎

Tested the above scenarios and results were 💎as well.

@iAmWillShepherd
Copy link
Contributor

Merge early since the last changes were update to type signature and improved comments.

@iAmWillShepherd iAmWillShepherd merged commit fa83e8c into development Mar 12, 2019
@iAmWillShepherd iAmWillShepherd deleted the shiftkey/rebase/use-shared-manual-conflicts branch March 12, 2019 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-review Pull Requests that are ready to be reviewed by the maintainers tech-debt Issues and pull requests related to addressing technical debt or improving the codebase

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants