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

[WebdriverBidi] Remove invalid code points #40785

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jrandolf-2
Copy link
Contributor

The removed values are not single code points. They are not relevant to the test.

@jrandolf-2 jrandolf-2 requested a review from thiagowfx June 28, 2023 07:37
@jrandolf-2 jrandolf-2 changed the title Remove invalid code points [WebdriverBidi] Remove invalid code points Jun 28, 2023
The removed values are not single code points. They are not relevant to the test.
@jrandolf-2 jrandolf-2 force-pushed the jrandolf/remove-unsued branch from 5505905 to 8eca3ef Compare June 28, 2023 09:08
@jrandolf-2 jrandolf-2 enabled auto-merge (rebase) June 28, 2023 11:24
@jrandolf-2 jrandolf-2 disabled auto-merge June 28, 2023 11:25
@jrandolf-2 jrandolf-2 enabled auto-merge (rebase) June 28, 2023 11:25
@jgraham
Copy link
Contributor

jgraham commented Jul 7, 2023

I believe the intent is that they're all single grapheme clusters. The spec has an open issue about this. Instead of removing them, I suggest moving them to a separate test that's marked as tentative.

@jrandolf-2
Copy link
Contributor Author

I believe the intent is that they're all single grapheme clusters. The spec has an open issue about this. Instead of removing them, I suggest moving them to a separate test that's marked as tentative.

Could you please link the issue? Coming from UIEvents, this is not feasible given that key events can only contain single Unicode scalar values. Also, on all platforms, the maximum customizability provided by the OS to the user for keyboards is emitting single Unicode scalar values, not multiple.

I think we should still remove these tests. They are completely invalid and I would not say these tests will 'tentatively' be valid consider the above factors.

@jgraham
Copy link
Contributor

jgraham commented Jul 10, 2023

Could you please link the issue? Coming from UIEvents, this is not feasible given that key events can only contain single Unicode scalar values.

It's just an inline issue: https://w3c.github.io/webdriver/#dfn-process-a-key-action

Also, on all platforms, the maximum customizability provided by the OS to the user for keyboards is emitting single Unicode scalar values, not multiple.

Well that's arguably not true; something like a virtual keyboard can happily emit arbitrarily complex strings and in particular it's pretty normal to have a single user input emit something like a flag emoji which is multiple unicode scalar values. Presumably in terms of UI events this maps down to composition events rather than simple key events, but it's absolutely a case we have to deal with somehow because something like send_keys("🇪🇺") has to do what you'd expect.

So I think the most useful thing to do here would be to work out how to model character composition in WebDriver. Some time ago I put up a proposal focused on explicit IME support at w3c/webdriver#1683. Review of that would be appreciated. But maybe we should also support cases that don't exactly match the IME model.

@jrandolf-2
Copy link
Contributor Author

Could you please link the issue? Coming from UIEvents, this is not feasible given that key events can only contain single Unicode scalar values.

It's just an inline issue: https://w3c.github.io/webdriver/#dfn-process-a-key-action

Also, on all platforms, the maximum customizability provided by the OS to the user for keyboards is emitting single Unicode scalar values, not multiple.

Well that's arguably not true; something like a virtual keyboard can happily emit arbitrarily complex strings and in particular it's pretty normal to have a single user input emit something like a flag emoji which is multiple unicode scalar values. Presumably in terms of UI events this maps down to composition events rather than simple key events, but it's absolutely a case we have to deal with somehow because something like send_keys("🇪🇺") has to do what you'd expect.

So I think the most useful thing to do here would be to work out how to model character composition in WebDriver. Some time ago I put up a proposal focused on explicit IME support at w3c/webdriver#1683. Review of that would be appreciated. But maybe we should also support cases that don't exactly match the IME model.

Indeed we should work out some sort of composition model, however this PR is independent of that. More specifically, we should not provide the ability to send multi-code-point characters for the basic key actions.

Side note: Regarding composition, models are dependent on the OS and keyboard, so I think it'd be difficult to model a universal one for Webdriver. In Puppeteer, we solve this by just using "insertText" events on inputs. This assumes that users really only care about the "input" events that get created and nothing else such as composition events.

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

Successfully merging this pull request may close these issues.

4 participants