Skip to content

preview the number of commits that will be rebased#7167

Merged
niik merged 27 commits intodevelopmentfrom
shiftkey/rebase/show-rebase-preview
Apr 4, 2019
Merged

preview the number of commits that will be rebased#7167
niik merged 27 commits intodevelopmentfrom
shiftkey/rebase/show-rebase-preview

Conversation

@shiftkey
Copy link
Member

@shiftkey shiftkey commented Mar 26, 2019

Overview

Closes #6959

Description

Similar to the Merge Branch flow, the Rebase Flow now shows the number of commits that will be moved as part of the operation:

#6960 is tracking detecting conflicts at this stage, so for now this PR is focused on just the happy path and it's testing.

Some additional polish related to this area while I'm in here testing:

  • extract MergeStatusHeader into a generalized UI component ActionStatusIcon (lots of internals are hard-coded to merge-status
  • render Emoji in the progress view if the commit message contains any :emoji:

Release notes

Notes: no-notes

@shiftkey shiftkey changed the title Shiftkey/rebase/show rebase preview preview the number of commits that will be rebased Mar 26, 2019
@shiftkey shiftkey force-pushed the shiftkey/rebase/show-rebase-preview branch 3 times, most recently from 2b2b31c to 2e49bf8 Compare March 28, 2019 18:00
@shiftkey shiftkey force-pushed the shiftkey/rebase/switch-to-multi-dialog-flow branch from 0c62cd0 to b519e06 Compare March 28, 2019 21:21
@shiftkey shiftkey force-pushed the shiftkey/rebase/show-rebase-preview branch from 56d51bb to e4fd487 Compare April 1, 2019 14:45
@shiftkey shiftkey changed the base branch from shiftkey/rebase/switch-to-multi-dialog-flow to git-plumbing-for-rebase-progress April 1, 2019 14:45
@shiftkey shiftkey force-pushed the shiftkey/rebase/show-rebase-preview branch 2 times, most recently from 442a074 to e98d9ea Compare April 1, 2019 17:49
@shiftkey shiftkey changed the base branch from git-plumbing-for-rebase-progress to development April 1, 2019 17:49
@shiftkey shiftkey added the ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Apr 1, 2019
@shiftkey shiftkey marked this pull request as ready for review April 1, 2019 18:04
@tierninho
Copy link
Contributor

For reference only, as we already discussed in chat.

When no merge hint is surfaced, selecting the branch leads to crash.
Screen Shot 2019-04-02 at 9 27 21 AM

TypeError: Cannot read property 'summary' of undefined
    at RebaseFlow.setState.prevState (app/src/ui/rebase/rebase-flow.tsx:289:60)
    at getStateFromUpdate (app/node_modules/react-dom/cjs/react-dom.development.js:6400:1)
    at processUpdateQueue (app/node_modules/react-dom/cjs/react-dom.development.js:6489:1)
    at updateClassInstance (app/node_modules/react-dom/cjs/react-dom.development.js:7143:1)
    at updateClassComponent (app/node_modules/react-dom/cjs/react-dom.development.js:8345:1)
    at beginWork (app/node_modules/react-dom/cjs/react-dom.development.js:8982:1)
    at performUnitOfWork (app/node_modules/react-dom/cjs/react-dom.development.js:11814:1)
    at workLoop (app/node_modules/react-dom/cjs/react-dom.development.js:11843:1)
    at HTMLUnknownElement.callCallback (app/node_modules/react-dom/cjs/react-dom.development.js:100:1)
    at Object.invokeGuardedCallbackDev (app/node_modules/react-dom/cjs/react-dom.development.js:138:1)

Version: 1.7.0-beta1
OS: Mac OS 10.14.4

3d1a057

@shiftkey shiftkey force-pushed the shiftkey/rebase/show-rebase-preview branch from 5474ee6 to 6d8d555 Compare April 2, 2019 19:31
@shiftkey
Copy link
Member Author

shiftkey commented Apr 2, 2019

@tierninho

When no merge hint is surfaced, selecting the branch leads to crash.

Any clue how I might trip this state? I gather something like "branch at the same commit" might be a way to trigger this visual state?

@shiftkey
Copy link
Member Author

shiftkey commented Apr 2, 2019

I've made a change in a83b297 that clarifies the UI and blocks the rebase from continuing - @tierninho let me know if you find new ways to break this path:

@shiftkey shiftkey requested a review from a team April 2, 2019 20:41
@shiftkey shiftkey added this to the 1.7.0 milestone Apr 2, 2019
@tierninho
Copy link
Contributor

So far looks good to me. 👍

@shiftkey shiftkey requested a review from niik April 3, 2019 12:30
@tierninho
Copy link
Contributor

For rebasing, did we want to update the green checkmark to a warning sign if conflicts are present?

Screen Shot 2019-04-03 at 2 02 18 PM

@shiftkey
Copy link
Member Author

shiftkey commented Apr 4, 2019

For rebasing, did we want to update the green checkmark to a warning sign if conflicts are present?

@tierninho this is captured in #6960 and is on my radar for post-rebase-MVP

Copy link
Member

@niik niik left a comment

Choose a reason for hiding this comment

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

Just one tiny ask and then we can land this. Thanks for bearing with me

border: solid transparent;
box-sizing: content-box;
position: relative;
z-index: 1;
Copy link
Member

Choose a reason for hiding this comment

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

I'm happy to leave this to someone with some bandwidth and CSS skills to figure out if it doesn't need to hold up this PR.

👍 Sounds good

@niik niik merged commit 5e3692a into development Apr 4, 2019
@shiftkey shiftkey deleted the shiftkey/rebase/show-rebase-preview branch April 4, 2019 21:12
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants