Skip to content

feat: add multiple click#1295

Merged
B4nan merged 4 commits intoapify:masterfrom
audiBookning:feat-add-double-click
Mar 14, 2022
Merged

feat: add multiple click#1295
B4nan merged 4 commits intoapify:masterfrom
audiBookning:feat-add-double-click

Conversation

@audiBookning
Copy link
Copy Markdown
Contributor

Here is the feature i was trying to introduce as mentioned in #1294.
It adds the option for multiple clicks.

Use cases:

  • A normal use would be for example to handle dblclick events. They have been introduced for many years and have high compatibility with most browsers.

  • In my personal use case, i was considering supporting some existing "application like" web interactions for an utility app aiming at organizing and managing some private files in the cloud.

I only added tests for dblclick events (coping the existing ones). I think they should apply for most of the situations. But one probably should consider adding some kind of "limited" tests for more dynamic click counts or simply limiting the feature to a maximum of 2 clicks (more limited but also more realistic?).

@B4nan
Copy link
Copy Markdown
Member

B4nan commented Feb 14, 2022

But one probably should consider adding

It is your PR and your proposal, so please add those tests :] We should definitely test that on something that is using the dblclick event to see if this actually helps for the use case it is supposed to help with.

edit: But your last test seems to be already doing that, or not? What other tests would you envision?

Otherwise it looks good to me, just few missing trailing commas.

@audiBookning
Copy link
Copy Markdown
Contributor Author

audiBookning commented Feb 15, 2022

Fixed the missing trailing commas

But your last test seems to be already doing that, or not? What other tests would you envision?

I added the tests for the double click event. What i was talking about, was about testing more than just two clicks.
This PR is just passing through the click options that already come with Puppeteer and Playwright. They include the possibility of an unlimited number of clicks on an Element; meaning double click, triple, quad, ..., unlimited.

I just did a check on Puppeteer and Playwright repo tests and the two only test a maximum of 3 clicks when selecting a whole line of text.

Earlier i was arguing that more than 2 clicks was not a realistic use case, but i forgot the text selection option.
I will add a test for that as well.

Edit: test added. I used the same that Puppeteer used (also similar to Playwright test).

@B4nan B4nan merged commit 09eeb28 into apify:master Mar 14, 2022
@B4nan
Copy link
Copy Markdown
Member

B4nan commented Mar 14, 2022

Thanks and sorry it took so long, totally forgot about this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants