stopes icon indicating copy to clipboard operation
stopes copied to clipboard

Feat: play on paste .

Open greatsage-raphael opened this issue 1 year ago • 2 comments

Why ?

Usually when we paste something in the query textbox, the next action is to click on "fetch" or press enter. This feature detects a paste and automatically execute the query. Fixes #36

How ?

It uses the onPaste event listener of the input field to detect a paste operation and automatically executes the query by calling a function

Test plan

Paste filename into the input field and observe that the pasted filename automatically executes without manual intervention.

greatsage-raphael avatar Jul 12 '23 16:07 greatsage-raphael

it looks good. Can you install/run pre-commit and make sure the linter works on tsx files?

Also, is it possible to add a test for this new feature?

I'll install and rum pre-commit and write up the test as well

greatsage-raphael avatar Jul 19 '23 16:07 greatsage-raphael

Thank you @greatsage-raphael. There are too many files affected by the linter, and I am wondering if this is due to some version mismatch. In any case, can you run the linter only on the files that you modified? We can decide later if it makes sense to run it on all files, but it should be a separate commit anyway.

Celebio avatar Jul 27 '23 08:07 Celebio