jmeter icon indicating copy to clipboard operation
jmeter copied to clipboard

Added Shortcut key event for Reset search - 66053

Open rollno748 opened this issue 2 years ago • 8 comments

Description

Shortcut key to Reset Search

Motivation and Context

This shortcut will help to Reset Search while enhancing or debugging the script

How Has This Been Tested?

Executed Unit test on core Validated the shortcut in local - works perfectly!

Screenshots (if appropriate):

image

Types of changes

  • Adding Keyevent to enable shortcut for reset search functionality (non-breaking change which uses existing functionality)

Checklist:

  • [ ] My code follows the [code style][style-guide] of this project.
  • [ ] I have updated the documentation accordingly.

rollno748 avatar May 06 '22 23:05 rollno748

Codecov Report

Merging #710 (2e0d9df) into master (a997ed2) will decrease coverage by 0.00%. The diff coverage is 22.22%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #710      +/-   ##
============================================
- Coverage     55.23%   55.22%   -0.01%     
  Complexity    10382    10382              
============================================
  Files          1061     1061              
  Lines         65763    65771       +8     
  Branches       7532     7531       -1     
============================================
+ Hits          36322    36323       +1     
- Misses        26841    26848       +7     
  Partials       2600     2600              
Impacted Files Coverage Δ
...org/apache/jmeter/gui/action/SearchTreeDialog.java 6.14% <0.00%> (-0.19%) :arrow_down:
.../java/org/apache/jmeter/gui/action/KeyStrokes.java 91.80% <100.00%> (+0.13%) :arrow_up:
...java/org/apache/jmeter/gui/util/JMeterMenuBar.java 78.25% <100.00%> (ø)
...isualizers/backend/influxdb/HttpMetricsSender.java 78.12% <0.00%> (-2.09%) :arrow_down:
.../apache/jmeter/threads/openmodel/scheduleParser.kt 69.60% <0.00%> (ø)
...a/org/apache/jmeter/timers/PoissonRandomTimer.java 78.37% <0.00%> (+5.40%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update a997ed2...2e0d9df. Read the comment docs.

codecov-commenter avatar May 06 '22 23:05 codecov-commenter

@vlsi - can you please review and approve Its just a minor change in adding shortcut

Also, added a reset search button to search dialog

rollno748 avatar May 07 '22 10:05 rollno748

Hello @rollno748 , Thanks for contributing. Can you run ./gradlew autostyleApply and commit the result please ?

Thank you

pmouawad avatar May 09 '22 19:05 pmouawad

Thanks for reviewing it @pmouawad I have applied the autostyle and committed it

rollno748 avatar May 09 '22 19:05 rollno748

Am I right the suggested shortcut is ctrl+alt+f to reset the search? Does it come from a standard?

Have you considered using esc shortcut to reset the search?

vlsi avatar May 09 '22 20:05 vlsi

Yes the current shortcut is assigned to ctrl+alt+f to reset the search. I haven't considered the esc to set it as reset search. I thought, It would be easier for us to remember to go with the same keys used to search (ctrl + f) - with an alternate key added for reset (ctrl + alt + f)

Happy to hear your thoughts as well please advise !

rollno748 avatar May 09 '22 20:05 rollno748

Frankly speaking, I think we should try using ESC shortcut for "resetting the search"

vlsi avatar May 10 '22 09:05 vlsi

Cool, Thanks for the inputs. I have verified the KeyStrokes.java -> It appears that the key is already assigned Upon checking the reference, its been used in the save property dialog.

@vlsi Do you still want me to assign the same key to the reset search ?

rollno748 avatar May 10 '22 10:05 rollno748

@rollno748 , thanks. For the next PR, please create a different branch. It is not a good idea to create PRs from master branch. For instance, in that case you won't be able to create two PRs at the same time.

vlsi avatar May 19 '23 13:05 vlsi