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

Control+Enter keyboard shortcut should unlock the "Code locked. Unlock?" button and show a toast #16250

Closed
QuincyLarson opened this issue Dec 21, 2017 · 9 comments
Labels
help wanted Open for all. You do not need permission to work on these.

Comments

@QuincyLarson
Copy link
Contributor

Scrolling to the bottom of lesson to unlock the code is tedious.

learn_to_code___freecodecamp

For power users who use the control+enter shortcut to run their code, the first time they press the control+enter shortcut, it should:

  1. unlock their code
  2. pop up a toast that says: "You've unlocked your code. Careful! Only run code you trust. You can now run your code with ctrl+enter shortcut."
@raisedadead
Copy link
Member

"You've unlocked your code. Careful! Only run code you trust. You can now run your code with ctrl+enter shortcut."

That's too big for a toast message, and most certainly is going to break on all screens.

@raisedadead raisedadead added the help wanted Open for all. You do not need permission to work on these. label Dec 21, 2017
@QuincyLarson
Copy link
Contributor Author

@raisedadead OK how about we assume that if they know the shortcut, they've previously run that warning, and we just run the code. No toast.

@raisedadead
Copy link
Member

Hi @QuincyLarson

May be a simpler way is to just update the button label from Code Locked. Unlock? to something more meaningful? like Code Locked. Unlock? (Ctrl + Enter)

And the tooltip is already identifying the warning.

So, yup we could be safe without a toast. 😅 !

@QuincyLarson
Copy link
Contributor Author

@raisedadead I'm not a fan of tooltips, as they don't even work on touch screens. I agree that instead we should change the copy. Perhaps something like: "Code locked. Only run code you trust. Unlock? (Ctrl + Enter)" That will make it a multi-line button, but I still think it's better and more clear.

@raisedadead
Copy link
Member

Yes.. it seems logical to me.

@theoutlander
Copy link
Contributor

Is the work here to simply trigger a mouse click on the unlock button when the user presses Control + Enter??

@QuincyLarson
Copy link
Contributor Author

@theoutlander I suspect there would be a more elegant way than simulating a mouse click on a button. I think you'd want to find how the control+enter logic currently works and make that trigger the unlocking of the code in the same way.

@freeCodeCamp freeCodeCamp deleted a comment from lijin3096 Dec 28, 2017
@theoutlander
Copy link
Contributor

I'm working on this one

@QuincyLarson
Copy link
Contributor Author

@theoutlander Awesome! Thanks for keeping us posted on your progress :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Open for all. You do not need permission to work on these.
Projects
None yet
Development

No branches or pull requests

3 participants