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

Add keyboard shortcuts #248

Closed
chrisbreiding opened this issue Sep 27, 2016 · 17 comments · Fixed by #16411
Closed

Add keyboard shortcuts #248

chrisbreiding opened this issue Sep 27, 2016 · 17 comments · Fixed by #16411
Labels
good first issue Good for newcomers pkg/reporter This is due to an issue in the packages/reporter directory type: feature New feature that does not currently exist

Comments

@chrisbreiding
Copy link
Contributor

chrisbreiding commented Sep 27, 2016

Add keyboard shortcuts for common actions in the Cypress UI. Examples (with possible shortcuts) are:

Also, evaluate the keyboard-friendliness of the UI. Is it easy to tab through various UI elements? Do UI elements have proper focus styles? We may need to add enhancements like responding to down arrow, left arrow, etc to focus tests and commands, move through them, expand/collapse them, etc.


Since the shortcuts map exactly to the UI elements we already have - there should be updates to the UI to help indicate to users which key to press. As it stands, there's no way for users to have any idea these exist at all (or what they do).

@chrisbreiding chrisbreiding added the type: feature New feature that does not currently exist label Sep 27, 2016
@fvanwijk
Copy link
Contributor

And ? to popup a panel with all the shortcuts

@richdouglasevans
Copy link
Contributor

richdouglasevans commented Aug 15, 2018

Those Feels When you've done some prep work for an issue, paused it for a bit to work on something else, come back to the issue ready to start work in earnest... and then you spot the first timers only tag that's been added in the interim.

Just kidding 😛

For the first timer that picks this up the Cypress package in which you might choose to add implementation is the reporter.

That package has Cypress tests: you might start by writing some Cypress tests that'll initially fail -- 'cos you'll not have added the keyboard shortcuts yet -- but will go green once you do.

Have fun! Tag me when this is done so that I might sing your name to the heavens 😄

@jennifer-shehane jennifer-shehane added the pkg/reporter This is due to an issue in the packages/reporter directory label Aug 15, 2018
@jennifer-shehane jennifer-shehane added the stage: ready for work The issue is reproducible and in scope label Sep 14, 2018
@durangatan
Copy link

Hi! is it cool if I work on this for Hacktoberfest?

@chrisbreiding
Copy link
Contributor Author

@durangatan Absolutely!

@durangatan
Copy link

I'm having a hard time getting the cypress tests in the reporter package to run; when they start up I get Uncaught Error: Cannot find module 'mobx'. I've tried running npm install in the root directory and in the reporter directory as well as running link-packages. Am I missing a setup step somewhere?

@chrisbreiding
Copy link
Contributor Author

Sorry about that. The reporter's Cypress tests needed some attention. Historically, the reporter has only been unit tested and the 2 Cypress tests are more recent additions. They weren't set up to run in CI, which is why we never caught this issue.

That said, I think this it's good to add Cypress tests for this feature. I've fixed the issues and the reporter's Cypress tests now run in CI. Pull down the latest develop branch, re-build the reporter, and you should be good to go.

@jennifer-shehane
Copy link
Member

Some work has been done on this issue, but requires being handed off to someone else, so this is free to be picked up and finished.

@jennifer-shehane jennifer-shehane added good first issue Good for newcomers and removed good first issue Good for newcomers help wanted labels Jan 29, 2019
@timidak
Copy link
Contributor

timidak commented Feb 21, 2019

I think that would be a great feature and would like to try to implement it. Is that cool for everyone?
If it is, I just need to know where exactly to implement it, I'm guessing the desktop-gui package, am I right? 🙂

edit: After reading your code guide I found that pkg/reporter is already tagged 😄 so this might be the package where I should start to look 😅

@jennifer-shehane
Copy link
Member

Hey @timidak, yes, these keyboard shortcuts would work within the reporter package - see the README for guidance on getting started.

@timidak
Copy link
Contributor

timidak commented Apr 6, 2019

I was wondering which component would be the best one to listen to keyBoardEvents and emit events with with the events lib. 🙂I saw how it works in packages/reporter/header/controls.jsx but I don't really know where to implement the functionality.

@chrisbreiding
Copy link
Contributor Author

There was a PR created to address this but the author wasn't able to finish it. I'd take a look at that for an idea, but start fresh. Check out my comment on where/how I'd recommend implementing this.

grabartley pushed a commit to grabartley/cypress that referenced this issue Oct 6, 2019
* add keyboard shortcuts lib to the reporter

cypress-io#248

* add shortcuts to main.jsx

cypress-io#248

* add appState param and other cases to shortcuts.js

* remove events that are not coded to work yet

* Write tests for shortcuts in reporter


Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
@fixcik
Copy link

fixcik commented Jan 27, 2020

Can you add shortcut for selector playground? I think it will be very useful.

@jennifer-shehane
Copy link
Member

This is very low priority for us, so our team will likely not pick this up. You're welcome to open a PR - even one that is a work in progress is fine. Check out our contributing doc and ask us if you get stuck.

@Manuel-Suarez-Abascal
Copy link
Contributor

Manuel-Suarez-Abascal commented May 10, 2021

@chrisbreiding @jennifer-shehane I have opened this PR to address this issue 🚀

@cypress-bot cypress-bot bot added stage: needs review The PR code is done & tested, needs review stage: work in progress and removed stage: work in progress stage: needs review The PR code is done & tested, needs review labels May 10, 2021
@cypress-bot cypress-bot bot added stage: work in progress stage: needs review The PR code is done & tested, needs review and removed stage: needs review The PR code is done & tested, needs review stage: work in progress labels May 17, 2021
@cypress-bot
Copy link
Contributor

cypress-bot bot commented May 20, 2021

The code for this is done in cypress-io/cypress#16411, but has yet to be released.
We'll update this issue and reference the changelog when it's released.

@cypress-bot cypress-bot bot removed the stage: needs review The PR code is done & tested, needs review label May 20, 2021
@cypress-bot
Copy link
Contributor

cypress-bot bot commented May 24, 2021

Released in 7.4.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v7.4.0, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators May 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Good for newcomers pkg/reporter This is due to an issue in the packages/reporter directory type: feature New feature that does not currently exist
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants