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

Ctrl+F to set focus on the search bar #6229

Closed
Regnander opened this issue Jan 23, 2020 · 13 comments · Fixed by #15388
Closed

Ctrl+F to set focus on the search bar #6229

Regnander opened this issue Jan 23, 2020 · 13 comments · Fixed by #15388
Assignees
Labels
good first issue Good for newcomers pkg/desktop-gui This is due to an issue in the packages/desktop-gui directory type: enhancement Requested enhancement of existing feature

Comments

@Regnander
Copy link

Current behavior:

Pressing Ctrl+F does nothing at the moment as this keybinding seems not be bound to anything.

Desired behavior:

I want said keybinding to set focus on the search bar in the GUI (and select all existing text), since I'm using the search bar quite often to find files.

Test code to reproduce

N/A

Versions

3.8.2 and older

@cypress-bot cypress-bot bot added the stage: proposal 💡 No work has been done of this issue label Jan 24, 2020
@jennifer-shehane
Copy link
Member

jennifer-shehane commented Jan 24, 2020

Hey @Regnander Can you be more specific about where you're like to use ctrl+f? There are several parts to our application and I'm not sure where you're trying to use it.

Also, what browser are you running in if you want this within the area that logs the commands?

Here?

Screen Shot 2020-01-24 at 5 12 33 PM

Here?

Screen Shot 2020-01-24 at 5 12 44 PM

@jennifer-shehane jennifer-shehane added stage: needs information Not enough info to reproduce the issue and removed stage: proposal 💡 No work has been done of this issue labels Jan 24, 2020
@Regnander
Copy link
Author

Screen Shot 2020-01-24 at 5 12 33 PM

I meant this window. Sorry about that!

@jennifer-shehane jennifer-shehane added stage: proposal 💡 No work has been done of this issue pkg/desktop-gui This is due to an issue in the packages/desktop-gui directory good first issue Good for newcomers type: enhancement Requested enhancement of existing feature and removed stage: needs information Not enough info to reproduce the issue labels Jan 28, 2020
@Manuel-Suarez-Abascal
Copy link
Contributor

@jennifer-shehane @Regnander I would like to give it a go. Can you please guide me on where to find the related file to implement the enhancement? I would like to know which implementation do you have in mind?

@Regnander
Copy link
Author

I would like to know which implementation do you have in mind?

I don't quite follow. Do you want me to elaborate my suggestion?

@Manuel-Suarez-Abascal
Copy link
Contributor

I would like to know which implementation do you have in mind?

I don't quite follow. Do you want me to elaborate my suggestion?

@Regnander no, it's good. I understand the problem. It's more about implementation, if you guys are thinking a particular approach on how to implement the feature. If not, I would go ahead & start implementing the functionality.

@Manuel-Suarez-Abascal
Copy link
Contributor

Manuel-Suarez-Abascal commented Feb 4, 2020

@jennifer-shehane is this cypress\packages\desktop-gui\src\specs\specs-list.jsx the file related to the input search? If so, why I'm not able to see changes when I modify the file?

EDIT:
Nevermind, I'm able to see the changes now ;)

@jennifer-shehane
Copy link
Member

@Manuel-Suarez-Abascal Yes, that's the right file with the corresponding tests in Cypress found here: https://github.com/cypress-io/cypress/blob/develop/packages/desktop-gui/cypress/integration/specs_list_spec.js#L1:L1

There is a Contributing guide that covers how to contribute and get Cypress running locally in generally here: https://github.com/cypress-io/cypress/blob/develop/.github/CONTRIBUTING.md

To run the tests:

  • within cypress root, run npm i
  • cd to cypress/packages/desktop-gui and run npm run watch
  • In cypress/packages/desktop-gui run npm run cypress:open
  • click on the test you're writing to run it within Cypress

Instructions for running the desktop-gui tests can always be found here: https://github.com/cypress-io/cypress/blob/develop/packages/desktop-gui/README.md

@Manuel-Suarez-Abascal
Copy link
Contributor

@jennifer-shehane @Regnander I have created a PR for this feature here! 🎉

@cypress-bot cypress-bot bot added stage: needs a test and removed stage: proposal 💡 No work has been done of this issue labels Feb 5, 2020
@cypress-bot cypress-bot bot added the stage: needs review The PR code is done & tested, needs review label Feb 11, 2020
@panzarino
Copy link
Contributor

@jennifer-shehane @Manuel-Suarez-Abascal What is the future of this issue? Looks like the PR was getting somewhere but was abruptly closed.

If no one is working on this anymore, I feel like it would be pretty easy to just add the keyboard shortcut in the background and call it a day.

@phuong2020
Copy link

Thanks . I also often do this Ctrl + F is very convenient when searching
Friv 9 | Friv 1000 | Friv 1000

@jennifer-shehane
Copy link
Member

@panzarino The issue was more complex than originally thought, which is what the PR thread reflects.

  • Need to have different keyboard bindings per Windows / Mac
  • Need to surface in the UI that ctrl + f did something, (highlighting the internal search bar)
  • Need to surface that this keyboard shortcut exists to people that don't know about it (showing shortcut in search bar based on their current OS)

The PR was almost there but I think we got stuck at the end detecting their OS in the proper place and the Cypress team didn't have the time to implement ourselves. Feel free to pull the commits from the PR into a new PR to finish and attribute @Manuel-Suarez-Abascal for their work.

@Manuel-Suarez-Abascal
Copy link
Contributor

Manuel-Suarez-Abascal commented Mar 10, 2021

@jennifer-shehane @panzarino @Regnander I decided to finish this PR since I'm currently not too busy or overwhelmed at work. This is the new PR. Let me know if I need to do any changes! 😃

@jennifer-shehane jennifer-shehane added stage: pending release and removed stage: needs review The PR code is done & tested, needs review labels Mar 29, 2021
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Apr 5, 2021

Released in 7.0.0.

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

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Apr 5, 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/desktop-gui This is due to an issue in the packages/desktop-gui directory type: enhancement Requested enhancement of existing feature
Projects
None yet
5 participants