Repository navigation
Conversation
VisualsScreen.Recording.2026-10-29.at.8.45.40.PM.mov |
There was a problem hiding this comment.
Reviewed 273f1fc79772ea88559146bb337a5f21b2430893 with AI assistance.
One finding in examples/example-dockpanel-iife/test/touch-resize.spec.ts: loadWidgets() always injects pkg.main. For @lumino/coreutils, that is dist/index.node.js, whose CommonJS require() throws in the browser. The package already declares browser: "dist/index.js".
I independently ran all four new native-CDP touch cases: they pass despite that uncaught require is not defined error. Adding a temporary pageerror assertion makes all four fail. In a temporary test copy, selecting the string browser entry with a main fallback, plus the same error assertion, passes all four with no page errors.
Could IPackage include the optional browser entry, and the loader select it before addScriptTag? Checking pageerror would also prevent a dependency script failing silently in these regressions.
The production change has useful failing-before coverage: temporarily removing just the two added click listeners from the built widgets bundle makes both horizontal resize cases fail; both vertical cases still pass. The original bundle was restored byte-for-byte and tracked files are unchanged. yarn build:src passed.
Environment: Linux, Node 24.22.1, Playwright 1.61.0 with local Chromium 153.0.8010.0, one fresh browser per case. The bundled Chrome download was unavailable here. I did not verify a physical Windows touch device or run the full widgets suite.
Fixes jupyterlab/jupyterlab#16061
Lumino #835 added
touch-action: noneto prevent browsers from taking over resize gestures, but JupyterLab #16061 remained reproducible after the Lumino update in #20010. Testing Launchers, notebooks, and Lumino’s dock-panel example showed that Chromium can target neighboring interactive content instead of the divider, preventing resizing from starting. Registering a click listener on the default dock and split handles makes them recognizable touch targets while preserving the existing CSS and pointer-based resizing.Adds native browser-touch regression coverage to the existing Playwright example suite, checking both panel types, both orientations, and content scrolling afterward.