Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(app): Add keyboard shortcuts to jog controls #1761

Merged
merged 1 commit into from
Jun 27, 2018

Conversation

mcous
Copy link
Contributor

@mcous mcous commented Jun 26, 2018

overview

This PR adds keyboard shortcuts to the JogControls component used by both Deck Calibration jogging and Labware Calibration jogging.

Closes #1476

changelog

  • feat(app): Add keyboard shortcuts to jog controls

review requests

We added a <HandleKeypress> wrapper component to the component library to attach keyup listeners on component mount and unmount. We then refactored the app's generic <JogControls> component to be class based and use <HandleKeypress>.

The JogControls refactor also involved trying to make the button construction more readable, so let me know what you think of renderJogControls.

Otherwise:

  • Keyboard shortcuts work in deck calibration according to UI description
  • Keyboard shortcuts work in labware calibration according to UI description

@mcous mcous added feature Ticket is a feature request / PR introduces a feature app Affects the `app` project ready for review labels Jun 26, 2018
@mcous mcous requested review from Kadee80, b-cooper and IanLondon June 26, 2018 20:38
}
}

getJogHandlers () {
Copy link
Contributor

Choose a reason for hiding this comment

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

🍾

Copy link
Contributor

@Kadee80 Kadee80 left a comment

Choose a reason for hiding this comment

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

🧀 🍰

@codecov
Copy link

codecov bot commented Jun 26, 2018

Codecov Report

Merging #1761 into edge will decrease coverage by 0.17%.
The diff coverage is 2.85%.

Impacted file tree graph

@@            Coverage Diff             @@
##             edge    #1761      +/-   ##
==========================================
- Coverage   34.91%   34.73%   -0.18%     
==========================================
  Files         347      348       +1     
  Lines        5729     5761      +32     
==========================================
+ Hits         2000     2001       +1     
- Misses       3729     3760      +31
Impacted Files Coverage Δ
components/src/forms/RadioGroup.js 100% <ø> (ø) ⬆️
app/src/components/JogControls/index.js 0% <0%> (ø) ⬆️
...onents/src/interaction-enhancers/HandleKeypress.js 7.69% <7.69%> (ø)

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 b6999a8...0c0f8e6. Read the comment docs.

Copy link
Contributor

@IanLondon IanLondon left a comment

Choose a reason for hiding this comment

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

Now that I can use arrow keys I really wanna hit Enter to proceed 🙊

@mcous mcous merged commit 7c51e98 into edge Jun 27, 2018
@mcous mcous deleted the app_jog-keyboard-controls branch June 27, 2018 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app Affects the `app` project feature Ticket is a feature request / PR introduces a feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants