Skip to content

fix: prevent doing some actions when committing on action - #7840

Merged
outofambit merged 13 commits into
desktop:developmentfrom
vhashimotoo:dont-try-doing-something-when-i-committing
Jul 29, 2019
Merged

outofambit merged 13 commits into
desktop:developmentfrom
vhashimotoo:dont-try-doing-something-when-i-committing

Conversation

@vhashimotoo

Copy link
Copy Markdown
Contributor

Overview

Closes #3814
Closes #5934

Description

This PR adds prevent doing actions with the application when we making a commit. Please notice, this not fixes all actions what we able to do when we committing, this fixes only some part of these bugs. 🦄

GIFs and actions what prevented:

  • Diff panel goes to read only
    diff-readonly

  • Opening the context menu
    context-menu

  • Clicking undo button
    dont try to undo

  • File selections from the keyboard ('Enter' or 'Spacebar')
    file-selections

  • 'Discard all changes' context menu
    discard-all-changes

Release notes

Notes: 🤔 💭

@shiftkey shiftkey added the ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Jun 20, 2019
@tierninho

Copy link
Copy Markdown
Contributor

@HashimotoYT Many thanks for the PR on this.

I tested all the scenarios and all passed expect the File selections from the keyboard ('Enter' or 'Spacebar') from a246352. The enter and space do not work anymore before/after committing.

I am going to consider other scenarios and circle back later. Thanks again!

@tierninho

Copy link
Copy Markdown
Contributor

The enter and space do not work anymore before/after committing.

Looks good now. Thanks.

@iAmWillShepherd iAmWillShepherd self-assigned this Jul 18, 2019

@iAmWillShepherd iAmWillShepherd left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

A few minor changes, but the code changes look good.

Comment thread app/src/ui/changes/changes.tsx Resolved
Comment thread app/src/ui/changes/changes.tsx Resolved
Comment thread app/src/ui/lib/list/list.tsx Outdated
this.props.onRowKeyDown(rowIndex, event)
}

if (event.defaultPrevented) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think this change is fine, but since this touches a core component, I'd like to get the thoughts of someone else from @desktop/engineering before giving this a full ✅

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

i'm not sure this if statement is really necessary. it looks like similar logic (on L430) should already take care of this. @HashimotoYT is there more context here that i'm missing?

@iAmWillShepherd

Copy link
Copy Markdown
Contributor

@HashimotoYT, I've gone ahead and pushed the requested changes up to your branch so we can get your PR merged 👍

@shiftkey
shiftkey requested review from outofambit and shiftkey July 25, 2019 14:43
@iAmWillShepherd
iAmWillShepherd requested a review from a team July 25, 2019 14:48
@iAmWillShepherd
iAmWillShepherd dismissed their stale review July 25, 2019 14:49

I've made changes to this PR, so someone else will have to take over review.

@shiftkey shiftkey left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I tested out the latest branch and it works as expected 🤘

I'd love an extra review from someone who has been following along the PR from the start, to ensure I haven't missed anything...

@outofambit outofambit self-assigned this Jul 25, 2019
@tierninho

Copy link
Copy Markdown
Contributor

Took another pass at it. LGTM!

@tierninho
tierninho self-requested a review July 25, 2019 22:02
@outofambit
outofambit merged commit 8b48476 into desktop:development Jul 29, 2019
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.

File selection of disabled entries possible with space lock the file/line selection controls while a commit is running

5 participants