-
Notifications
You must be signed in to change notification settings - Fork 72
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
PerformanceEventTiming.interactionId #1069
Comments
Is there some explanation what is the use case for this? |
Here's the explainer https://github.com/w3c/event-timing/blob/main/interactionID-explainer.md |
It is not very well defined what is a "user interaction". |
Hey folks, thank you for taking a look and providing feedback here! The interactionID-explainer.md that Sean linked is an older document. I think it still does a good job summarizing the motivations, but not the latest details, and doesn't try to specify the semantics at all. We could update it, but I think that document is largely been obsoleted. Let me take a stab at making a quick summary of things here: Goal: A single "Interaction" should map to a single user "gesture" such as a Click, Tap, or Keypress.
Net/net, its not possible for a developer to just figure this out using the raw Event Timing API, but it is relatively easy for the Event Timing API to do it internally (as it already needs to observe these events) and expose hints via How?
In full transparency, the Chromium implementation has gone through some iteration over the last year as we discovered various details. Much of this is just internal complexity, but I do think it would be worthwhile for me to audit and update the Event Timing spec to document the latest implementation updates in Chromium, in case we have deviated and/or need to add extra clarity. (I.e. cases like composition events for virtual keyboards) I would love to work with @sefeng211 (I assume?) to make sure this matches FF behaviour well. Also, eventually, we might want to consider moving the specification of this concept up out of Event Timing and into e.g. UI Events spec itself (See: w3c/event-timing#114, w3c/event-timing#49). Then we can leave the Event Timing as just measuring and reporting rather than also defining. There have been many other docs published that summarize motivations, and summarize some developer feedback, for example: |
Click is not a user interaction. Click is an event dispatch based on (mouse/pointer)down/up events, or keypress. The draft probably needs some work. |
(I meant clicking on a physical mouse, which generates a stream of events, rather than just the |
Right, but the draft spec talks about click event. |
Hey @smaug---- I might be misinterpretting your feedback, apologies if so. Let me try one more time to clarify: Event Timing spec modifies DOM event dispatch algorithm where we add a call to compute interactionID and then use that to initialize event timing. The finalize event timing steps also include some handling for interactionID (potentially that could be refactored a bit). The following event types are are currently specced as involved in computing interactionID:
...with clear steps for how a flow of events maps to new interaction ids. Some of those events are not themselves assigned an interactionId but are used to determine if other events do get one. In Chromium we currently found it useful to observe the following stream of events in practice, in addition to the above:
I haven't audited to know if the above are chromium specific, due to existing event dispatch warts, or if the spec should be updated. |
So chromium is not following the current spec if it follows only some of the events? Why does it have different behavior than the spec draft? |
It follows all the events currently in the spec. We additionally found that observing a small number of extra events helped disambiguate some cases and/or improve metrics reporting in small ways.
This is not a desired gap. We should update draft spec (or chromium implementation), and I can try to do that. (I will take your feedback as a signal to prioritize that work.) FWIW, most of the changes are minor (such as |
Also: related to Event Timing already has |
I think we could be positive on this, but the spec needs tweaks so that implementations can be interoperable. |
Request for Mozilla Position on an Emerging Web Specification
@
-mention GitHub accounts): @mmocnyOther information
The text was updated successfully, but these errors were encountered: