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
[WIP] Add arrow keys to navigate in step challenges #12832
[WIP] Add arrow keys to navigate in step challenges #12832
Conversation
import classnames from 'classnames'; | ||
import { connect } from 'react-redux'; | ||
import { createSelector } from 'reselect'; | ||
import PureComponent from 'react-pure-render/component'; | ||
import LightBox from 'react-images'; | ||
import MouseTrap from 'mousetrap'; |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
@systimotic what's the status of this PR? Have you had a chance to make the changes @BerkeleyTrue recommended? |
@QuincyLarson I've had a hard time getting to work over the past two weeks. You might be able to tell from the activity on my profile that I didn't get a whole lot of things done 😞 As it stands, it may take a little while before I have enough Redux knowledge to solve this issue the proper way. |
@systimotic I'm inexperienced with Redux myself. I would recommend asking @BerkeleyTrue or @Bouncey for help with this. It's not a super high priority, so take your time :) |
aba5f4d
to
9685a4d
Compare
9685a4d
to
5ac7193
Compare
@systimotic updated the pull request. |
* Add arrow keys to navigate in step challenges * fixed bind and unbind of arrow keys in line with component life cycle Did a rebase and merge conflict fixing, let's hope I didn't mess things up too bad 😅
@systimotic updated the pull request. |
Looking at this code it is apparent that we should have some defined way to add mouse events to components themselves and leave the mousetrap epic as a place to put global key events. Let me stew on this... |
Hey @systimotic We are going to need to rethink how we implement mousetrap in the codebase. I think I haven't expressed how mousetrap bindings should be added at the component level. This is unfortunately a low priority as we try to get beta launched. We are closing as many issues and PR's as possible to clear up the debt we have incurred so I'm closing this. |
@BerkeleyTrue 👍 I understand. Getting the beta launched is way more important than this. |
Pre-Submission Checklist
staging
branch of freeCodeCamp.fix/
,feature/
, ortranslate/
(e.g.fix/signin-issue
)npm test
. Usegit commit --amend
to amend any fixes.Type of Change
Checklist:
Description
Found this kind-of-old-but-fun issue. I was doing keyboard shortcut stuff today anyway, so I thought I'd go ahead and implement this.
Pressing the left arrow key goes to the previous slide, right arrow key goes to the next. If the next slide is blocked, you'll have to open the link first.
This is on
keyup
instead ofkeydown
, so that you don't accidentally skip over a bunch of stuff by holding down the key.I'm very, very new to React, so feedback would be awesome!