fix: web-core touch event cloning#2636
Conversation
🦋 Changeset detectedLatest commit: 96cbb39 The changes in this PR will be included in the next version bump. This PR includes changesets to release 9 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughTouch event handling in ChangesTouch Event Cloning
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Merging this PR will degrade performance by 25.87%
|
| Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|
| ❌ | 008-many-use-state-destroyBackground |
8 ms | 9.5 ms | -16.12% |
| ⚡ | transform 1000 view elements |
47.2 ms | 44.7 ms | +5.43% |
| ❌ | basic-performance-large-css |
16.1 ms | 35.1 ms | -53.93% |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing PupilTong:codex/clone-touch-events (96cbb39) with main (66f6ecf)
Footnotes
-
26 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩
React Example#8208 Bundle Size — 236.51KiB (0%).96cbb39(current) vs 66f6ecf main#8200(baseline) Bundle metrics
|
| Current #8208 |
Baseline #8200 |
|
|---|---|---|
0B |
0B |
|
0B |
0B |
|
0% |
0% |
|
0 |
0 |
|
4 |
4 |
|
197 |
197 |
|
80 |
80 |
|
44.87% |
44.87% |
|
2 |
2 |
|
0 |
0 |
Bundle size by type no changes
| Current #8208 |
Baseline #8200 |
|
|---|---|---|
145.76KiB |
145.76KiB |
|
90.75KiB |
90.75KiB |
Bundle analysis report Branch PupilTong:codex/clone-touch-even... Project dashboard
Generated by RelativeCI Documentation Report issue
React External#1322 Bundle Size — 693.04KiB (0%).96cbb39(current) vs 66f6ecf main#1314(baseline) Bundle metrics
|
| Current #1322 |
Baseline #1314 |
|
|---|---|---|
0B |
0B |
|
0B |
0B |
|
0% |
0% |
|
0 |
0 |
|
3 |
3 |
|
17 |
17 |
|
5 |
5 |
|
8.59% |
8.59% |
|
0 |
0 |
|
0 |
0 |
Bundle analysis report Branch PupilTong:codex/clone-touch-even... Project dashboard
Generated by RelativeCI Documentation Report issue
React MTF Example#1341 Bundle Size — 207.46KiB (0%).96cbb39(current) vs 66f6ecf main#1333(baseline) Bundle metrics
|
| Current #1341 |
Baseline #1333 |
|
|---|---|---|
0B |
0B |
|
0B |
0B |
|
0% |
0% |
|
0 |
0 |
|
3 |
3 |
|
192 |
192 |
|
77 |
77 |
|
44.38% |
44.38% |
|
2 |
2 |
|
0 |
0 |
Bundle size by type no changes
| Current #1341 |
Baseline #1333 |
|
|---|---|---|
111.23KiB |
111.23KiB |
|
96.23KiB |
96.23KiB |
Bundle analysis report Branch PupilTong:codex/clone-touch-even... Project dashboard
Generated by RelativeCI Documentation Report issue
Web Explorer#9782 Bundle Size — 901.35KiB (~-0.01%).96cbb39(current) vs 66f6ecf main#9775(baseline) Bundle metrics
Bundle size by type
Bundle analysis report Branch PupilTong:codex/clone-touch-even... Project dashboard Generated by RelativeCI Documentation Report issue |
React Example with Element Template#474 Bundle Size — 199.83KiB (0%).96cbb39(current) vs 66f6ecf main#466(baseline) Bundle metrics
Bundle size by type
|
| Current #474 |
Baseline #466 |
|
|---|---|---|
145.76KiB |
145.76KiB |
|
54.08KiB |
54.08KiB |
Bundle analysis report Branch PupilTong:codex/clone-touch-even... Project dashboard
Generated by RelativeCI Documentation Report issue
After merging main (lynx-family#2636 dropped the isTrusted touch-cloning gate) the shifted touch helper became unused, breaking the Ubuntu/Windows build. Re-apply the lynx-view-relative shift as an addition rather than a replacement: every touch in `touches`/`targetTouches`/`changedTouches` now carries a new `x`/`y` pair in lynx-view-local space while keeping its original `clientX`/`clientY`/`pageX`/`pageY` (viewport/document). Same shape for mouse events (top-level `x`/`y` lynx-view-relative, `clientX`-and-friends untouched) and for `click`/`touch*` detail (gains `clientX`/`clientY`/`pageX`/`pageY` alongside `x`/`y`). This preserves Web interop (overlays, drag-drop, viewport alignment) while still giving Lynx handlers the local coordinates they expect. Touch e2e fixture and changeset updated to match.
Summary:
touches,targetTouches, andchangedTouchesthroughtoCloneableObjectincreateCrossThreadEvent.@lynx-js/web-core.Validation:
pnpm dprint check .changeset/clone-touch-events.md packages/web-platform/web-core/ts/client/mainthread/elementAPIs/createCrossThreadEvent.ts packages/web-platform/web-core/tests/element-apis.spec.tspnpm build:wasmpnpm exec tsc --build packages/tools/css-serializer/tsconfig.json packages/web-platform/web-worker-rpc/tsconfig.json packages/web-platform/web-elements/tsconfig.jsonpnpm test tests/element-apis.spec.ts(74 tests)pnpm changeset status --since=upstream/mainSummary by CodeRabbit
Bug Fixes
Tests