Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Backportable keymap changes #1847

Merged
merged 9 commits into from
Dec 18, 2018
Merged

Backportable keymap changes #1847

merged 9 commits into from
Dec 18, 2018

Conversation

smashwilson
Copy link
Contributor

Please be sure to read the contributor's guide to the GitHub package before submitting any pull requests.

Requirements

  • Filling out the template is required. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
  • Suggestion: You can use checklists to keep track of progress for the sections on metrics, tests, documentation, and user research.

Description of the Change

Restore MultiFilePatch navigation keybindings unadorned by cmd or ctrl that were removed by #1512. Specifically:

  • right and cmd-right or ctrl-right surface focus to the Git tab
  • backspace discards the selection
  • enter stages or unstages the selection
  • o jumps to file
  • / toggles between line and hunk selection mode

I've also separated the cmd and ctrl keybindings throughout the keymap by platform, guarding cmd bindings with .platform-darwin and ctrl alternatives with .platform-linux, .platform-win32. This opens up the ctrl- bindings on macOS in the future and prevents ambiguities in the binding that we render on buttons and tooltips.

Alternate Designs

Another alternative that we talked about was showing a notification the first time that you try to use one of the deprecated keystrokes (and letting the keystroke go through to the editor normally). I think we should do that as part of the diff editability work, personally.

Benefits

This keeps our keybinding changes from breaking users' muscle memory for another few releases.

Possible Drawbacks

If anyone on macOS learned the ctrl- keystrokes for some reason, those will be broken by this.

It also gives us a lot of redundancy in our keymap, which hurts maintainability. Hopefully this is just a temporary thing.

Applicable Issues

Related to #1820.

Metrics

Out of scope for the moment.

Tests

Our existing test suite should catch any regressions here.

Documentation

The flight manual already references unadorned keystrokes, which is a good reason to backport this. I've also already filed atom/flight-manual.atom.io#504 to update it to use the cmd or ctrl prefixes where appropriate, which we can merge while both work, so that new users learn the prefixed commands instead.

Release Notes

  • Restored unprefixed keyboard navigation commands to file patches in the GitHub package.

User Experience Research (Optional)

n/a

@smashwilson smashwilson requested a review from a team December 17, 2018 20:44
@codecov
Copy link

codecov bot commented Dec 17, 2018

Codecov Report

Merging #1847 into master will increase coverage by 0.05%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1847      +/-   ##
==========================================
+ Coverage   90.85%   90.91%   +0.05%     
==========================================
  Files         195      195              
  Lines       10727    10727              
  Branches     1570     1570              
==========================================
+ Hits         9746     9752       +6     
+ Misses        981      975       -6
Impacted Files Coverage Δ
lib/controllers/editor-conflict-controller.js 95.95% <0%> (+1.01%) ⬆️
lib/atom/decoration.js 86.74% <0%> (+2.4%) ⬆️
lib/models/conflicts/side.js 96.87% <0%> (+4.68%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 755132b...a5fe3a0. Read the comment docs.

Copy link

@annthurium annthurium left a comment

Choose a reason for hiding this comment

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

thanks for fixing this, @smashwilson !

I agree that we should cherry pick this into stable to avoid thrash with key bindings which would frustrate our users.

@smashwilson smashwilson merged commit 92065ee into master Dec 18, 2018
@smashwilson smashwilson deleted the aw/keymap branch December 18, 2018 13:48
smashwilson added a commit that referenced this pull request Dec 18, 2018
Backportable keymap changes
smashwilson added a commit that referenced this pull request Jan 4, 2019
Backportable keymap changes
@smashwilson smashwilson mentioned this pull request Jan 4, 2019
5 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants