-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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(issue-6229): added support for searching files using keyboard inputs based on OS #15388
feat(issue-6229): added support for searching files using keyboard inputs based on OS #15388
Conversation
Thanks for taking the time to open a PR!
|
} | ||
|
||
_isMac () { | ||
return (window.clientInformation['platform'] === 'MacIntel') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jennifer-shehane in case you're wondering about this. It's a workaround of a known issue.
…press into feat/issue-6229
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for opening a PR! It appears to be working in Mac. 👍 Will have to get someone to test in Windows.
Just some suggestions, mostly on naming and consolidating functions/variables.
onBlur={this._setBlur} | ||
onChange={this._updateFilter} | ||
onFocus={this._setFocus} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
onBlur={this._setBlur} | |
onChange={this._updateFilter} | |
onFocus={this._setFocus} | |
onBlur={this._toggleFocus} | |
onChange={this._updateFilter} | |
onFocus={this._toggleFocus} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment as above.
onKeyUp={this._executeFilterAction} | ||
/> | ||
|
||
{ window.addEventListener('keydown', this._executeSearch) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The function is focusing the input when search keys are detected. Think this naming is a bit clearer of the function.
{ window.addEventListener('keydown', this._executeSearch) } | |
{ window.addEventListener('keydown', this._focusWhenSearchKeys) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jennifer-shehane I have addressed the comment & pushed the changes.
Great comments @jennifer-shehane I have addressed all of them & pushed the latest changes. I have retested the new feature & it seems everything to be working just fine. I'll be waiting for your next review & your confirmation on the functionality of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again!
…uts based OS
User facing changelog
There's a new keyboard shortcut (
ctrl/cmd + f
) to searchspec
files in theTest Runner
based on theuser's OS
.Additional details
This PR allows users to perform a search for test files with the
ctrl/cmd + f
command based on the Operating System. The file where the implementation was added iscypress\packages\desktop-gui\src\specs\specs-list.jsx
. I used a method that uses the ternary operator & adds focus to the search input ifctrl/cmd + f
is pressed. Then I called the method onkeydown
on thewindow
object.How has the user experience changed?
filter-test-runner.mov
PR Tasks
issue-6269
?