Repository navigation
chore(Layer): the outside-press watch can close on a pan, follow chosen pointer types, and judge a press in a closed shadow root - #9814
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report🔎 Preview ·
|
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| LayerProvider | 4.1 kB (0) · 20 B CSS (0) | — | ✓ · ✓ · ✗ |
| Tokenizer | 88.0 kB (+597 B) · 18.2 kB CSS (0) | — | — · — · — |
| DateTimeInput | 201.8 kB (+549 B) · 18.3 kB CSS (0) | — | — · — · — |
136 more components
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| DateInput | 179.3 kB (+528 B) · 16.6 kB CSS (0) | — | — · — · — |
| ChatComposer | 74.3 kB (+500 B) · 11.7 kB CSS (0) | — | — · — · — |
| PowerSearch | 278.8 kB (+494 B) · 23.3 kB CSS (0) | — | — · — · — |
| BaseTypeahead | 67.9 kB (+492 B) · 10.8 kB CSS (0) | — | — · — · — |
| ChatComposerInput | 72.3 kB (+488 B) · 11.1 kB CSS (0) | — | — · — · — |
| ChatComposerTokenElement | 72.3 kB (+488 B) · 11.1 kB CSS (0) | — | — · — · — |
| Typeahead | 76.4 kB (+488 B) · 12.3 kB CSS (0) | — | — · — · — |
| ChatMessageList | 26.9 kB (+456 B) · 7.0 kB CSS (0) | — | — · — · — |
| Heading | 11.3 kB (+456 B) · 5.4 kB CSS (0) | — | — · — · — |
| Spinner | 23.5 kB (+456 B) · 6.1 kB CSS (0) | — | — · — · — |
| Timer | 12.8 kB (+455 B) · 5.9 kB CSS (0) | — | — · — · — |
| ChatToolCalls | 30.8 kB (+454 B) · 8.3 kB CSS (0) | — | — · — · — |
| Text | 10.7 kB (+453 B) · 5.4 kB CSS (0) | — | — · — · — |
| CommandPaletteInput | 30.5 kB (+443 B) · 7.5 kB CSS (0) | — | — · — · — |
| Slider | 103.5 kB (+128 B) · 8.7 kB CSS (0) | — | — · — · — |
| Lightbox | 108.5 kB (+124 B) · 10.3 kB CSS (0) | — | — · — · — |
| Toast | 94.8 kB (+85 B) · 10.1 kB CSS (0) | — | — · — · — |
| Switch | 98.1 kB (+82 B) · 9.9 kB CSS (0) | — | — · — · — |
| TimeInput | 155.7 kB (+81 B) · 15.7 kB CSS (0) | — | — · — · — |
| AlertDialog | 101.4 kB (+67 B) · 14.2 kB CSS (0) | — | — · — · — |
| ButtonGroup | 40.1 kB (+31 B) · 3.7 kB CSS (0) | — | — · — · — |
| DropdownMenuSubMenu | 67.1 kB (+22 B) · 9.6 kB CSS (0) | — | — · — · — |
| SegmentedControl | 90.5 kB (+14 B) · 6.8 kB CSS (0) | — | — · — · — |
| Timestamp | 31.1 kB (+10 B) · 10.1 kB CSS (0) | — | — · — · — |
| TableCell | 93.9 kB (+5 B) · 17.3 kB CSS (0) | — | — · — · — |
| TableHeaderCell | 93.5 kB (+5 B) · 17.0 kB CSS (0) | — | — · — · — |
| CheckboxInput | 61.3 kB (+4 B) · 9.1 kB CSS (0) | — | — · — · — |
| AvatarGroup | 43.0 kB (+3 B) · 5.6 kB CSS (0) | — | — · — · — |
| FieldLabel | 47.9 kB (+3 B) · 5.6 kB CSS (0) | — | — · — · — |
| Markdown | 164.7 kB (+3 B) · 19.8 kB CSS (0) | — | — · — · — |
| MoreMenu | 92.8 kB (+3 B) · 17.0 kB CSS (0) | — | — · — · — |
| Table | 102.0 kB (+3 B) · 17.5 kB CSS (0) | — | — · — · — |
| Carousel | 66.1 kB (+2 B) · 10.8 kB CSS (0) | — | — · — · — |
| CheckboxListItem | 67.5 kB (+2 B) · 11.1 kB CSS (0) | — | — · — · — |
| MobileNav | 67.1 kB (+2 B) · 10.5 kB CSS (0) | — | — · — · — |
| Selector | 95.7 kB (+2 B) · 17.1 kB CSS (0) | — | — · — · — |
| TopNavHeading | 71.6 kB (+2 B) · 10.9 kB CSS (0) | — | — · — · — |
| AppShell | 87.3 kB (+1 B) · 13.3 kB CSS (0) | — | — · — · — |
| AvatarGroupOverflow | 45.4 kB (+1 B) · 5.5 kB CSS (0) | — | — · — · — |
| ChatLayout | 60.5 kB (+1 B) · 10.4 kB CSS (0) | — | — · — · — |
| DialogHeader | 60.0 kB (+1 B) · 11.4 kB CSS (0) | — | — · — · — |
| DropdownMenu | 92.6 kB (+1 B) · 17.0 kB CSS (0) | — | — · — · — |
| InputGroup | 53.4 kB (+1 B) · 7.8 kB CSS (0) | — | — · — · — |
| ListItem | 66.5 kB (+1 B) · 11.1 kB CSS (0) | — | — · — · — |
| MultiSelector | 91.1 kB (+1 B) · 16.5 kB CSS (0) | — | — · — · — |
| RadioListItem | 64.2 kB (+1 B) · 10.0 kB CSS (0) | — | — · — · — |
| SideNav | 86.7 kB (+1 B) · 11.2 kB CSS (0) | — | — · — · — |
| SideNavHeading | 72.2 kB (+1 B) · 11.1 kB CSS (0) | — | — · — · — |
| StatusDot | 28.3 kB (+1 B) · 5.3 kB CSS (0) | — | — · — · — |
| Stepper | 58.9 kB (+1 B) · 10.0 kB CSS (0) | — | — · — · — |
| TabMenu | 68.4 kB (+1 B) · 11.0 kB CSS (0) | — | — · — · — |
| TopNav | 68.7 kB (+1 B) · 10.8 kB CSS (0) | — | — · — · — |
| TopNavMenu | 71.2 kB (+1 B) · 11.1 kB CSS (0) | — | — · — · — |
| TreeList | 42.8 kB (+1 B) · 5.6 kB CSS (0) | — | — · — · — |
| Avatar | 40.2 kB (0) · 5.5 kB CSS (0) | — | — · — · — |
| Banner | 59.3 kB (0) · 10.4 kB CSS (0) | — | — · — · — |
| BottomSheet | 63.8 kB (0) · 7.5 kB CSS (0) | — | — · — · — |
| BottomSheetSwitcher | 17.5 kB (0) · 3.4 kB CSS (0) | — | — · — · — |
| Button | 57.2 kB (0) · 9.8 kB CSS (0) | — | — · — · — |
| ChatDictationButton | 57.8 kB (0) · 9.9 kB CSS (0) | — | — · — · — |
| ChatSendButton | 57.7 kB (0) · 9.8 kB CSS (0) | — | — · — · — |
| CheckboxList | 55.6 kB (0) · 8.0 kB CSS (0) | — | — · — · — |
| ClickableCard | 16.9 kB (0) · 7.1 kB CSS (0) | — | — · — · — |
| CommandPaletteItem | 12.1 kB (0) · 3.6 kB CSS (0) | — | — · — · — |
| ComplexSelector | 67.6 kB (0) · 11.6 kB CSS (0) | — | — · — · — |
| DropdownMenuItem | 20.8 kB (0) · 6.2 kB CSS (0) | — | — · — · — |
| DropdownMenuRadioItem | 21.6 kB (0) · 6.6 kB CSS (0) | — | — · — · — |
| Field | 51.8 kB (0) · 7.2 kB CSS (0) | — | — · — · — |
| HoverCard | 25.0 kB (0) · 4.3 kB CSS (0) | — | — · — · — |
| IconButton | 57.3 kB (0) · 9.8 kB CSS (0) | — | — · — · — |
| InfoTip | 44.1 kB (0) · 5.3 kB CSS (0) | — | — · — · — |
| Item | 16.4 kB (0) · 5.5 kB CSS (0) | — | — · — · — |
| Link | 50.2 kB (0) · 7.0 kB CSS (0) | — | — · — · — |
| Outline | 23.9 kB (0) · 4.1 kB CSS (0) | — | — · — · — |
| Pagination | 105.8 kB (0) · 17.4 kB CSS (0) | — | — · — · — |
| ProgressBar | 11.5 kB (0) · 6.2 kB CSS (0) | — | — · — · — |
| RadioList | 53.1 kB (0) · 7.2 kB CSS (0) | — | — · — · — |
| SegmentedControlItem | 16.4 kB (0) · 4.3 kB CSS (0) | — | — · — · — |
| SelectorOption | 19.8 kB (0) · 6.0 kB CSS (0) | — | — · — · — |
| SideNavCollapseButton | 58.1 kB (0) · 9.9 kB CSS (0) | — | — · — · — |
| Tab | 13.5 kB (0) · 4.2 kB CSS (0) | — | — · — · — |
| TableSelectionToolbar | 66.8 kB (0) · 13.0 kB CSS (0) | — | — · — · — |
| Thumbnail | 61.6 kB (0) · 11.4 kB CSS (0) | — | — · — · — |
| Token | 27.5 kB (0) · 4.7 kB CSS (0) | — | — · — · — |
| TopNavMegaMenu | 66.4 kB (0) · 11.7 kB CSS (0) | — | — · — · — |
| TopNavMegaMenuItem | 12.9 kB (0) · 4.2 kB CSS (0) | — | — · — · — |
| BreadcrumbItem | 81.2 kB (−1 B) · 12.0 kB CSS (0) | — | — · — · — |
| Calendar | 68.2 kB (−1 B) · 10.4 kB CSS (0) | — | — · — · — |
| ChatLayoutScrollButton | 57.8 kB (−1 B) · 10.0 kB CSS (0) | — | — · — · — |
| CodeBlock | 71.9 kB (−1 B) · 11.1 kB CSS (0) | — | — · — · — |
| Collapsible | 26.3 kB (−1 B) · 4.5 kB CSS (0) | — | — · — · — |
| Drawer | 47.2 kB (−1 B) · 8.2 kB CSS (0) | — | — · — · — |
| DrawerHeader | 60.2 kB (−1 B) · 12.8 kB CSS (0) | — | — · — · — |
| FileInput | 66.1 kB (−1 B) · 10.8 kB CSS (0) | — | — · — · — |
| MobileNavToggle | 57.6 kB (−1 B) · 9.8 kB CSS (0) | — | — · — · — |
| Step | 30.0 kB (−1 B) · 5.6 kB CSS (0) | — | — · — · — |
| TextArea | 59.2 kB (−1 B) · 9.2 kB CSS (0) | — | — · — · — |
| TextInput | 64.7 kB (−1 B) · 11.0 kB CSS (0) | — | — · — · — |
| ToggleButton | 58.1 kB (−1 B) · 9.9 kB CSS (0) | — | — · — · — |
| Tooltip | 26.6 kB (−1 B) · 4.3 kB CSS (0) | — | — · — · — |
| TopNavItem | 12.8 kB (−1 B) · 4.0 kB CSS (0) | — | — · — · — |
| Dialog | 22.7 kB (−2 B) · 6.7 kB CSS (0) | — | — · — · — |
| DropdownMenuCheckboxItem | 21.6 kB (−2 B) · 6.6 kB CSS (0) | — | — · — · — |
| SelectableCard | 17.1 kB (−2 B) · 7.3 kB CSS (0) | — | — · — · — |
| ContextMenuItem | 27.2 kB (−3 B) · 6.3 kB CSS (0) | — | — · — · — |
| NumberInput | 68.7 kB (−3 B) · 11.2 kB CSS (0) | — | — · — · — |
| SideNavItem | 67.1 kB (−3 B) · 10.9 kB CSS (0) | — | — · — · — |
| Popover | 85.0 kB (−6 B) · 13.9 kB CSS (0) | — | — · — · — |
| DateRangeInput | 88.6 kB (−7 B) · 12.3 kB CSS (0) | — | — · — · — |
| CommandPalette | 69.4 kB (−8 B) · 12.4 kB CSS (0) | — | — · — · — |
| ContextMenu | 92.7 kB (−11 B) · 16.8 kB CSS (0) | — | — · — · — |
| charts/Chart | 182.2 kB (new) · 494 B CSS (new) | — | — · — · — |
| charts/ChartLegend | 46.5 kB (new) · 224 B CSS (new) | — | — · — · — |
| charts/ChartTooltip | 159.6 kB (new) · 423 B CSS (new) | — | — · — · — |
| layer | — | — | — · ✓ · — |
| Layer | — | — | ✓ · ✓ · — |
| lab/ChatEmojiPicker | 99.5 kB (new) · 773 B CSS (new) | — | — · — · — |
| lab/ChatReactionBar | 100.6 kB (new) · 1.1 kB CSS (new) | — | — · — · — |
| lab/CommentComposer | 141.7 kB (new) · 1.9 kB CSS (new) | — | — · — · — |
| lab/CommentPin | 53.6 kB (new) · 1.2 kB CSS (new) | — | — · — · — |
| lab/Comments | 310.2 kB (new) · 2.5 kB CSS (new) | — | — · — · — |
| lab/CommentThread | 305.2 kB (new) · 2.4 kB CSS (new) | — | — · — · — |
| lab/DiffViewer | 83.6 kB (new) · 2.1 kB CSS (new) | — | — · — · — |
| lab/EmojiPicker | 83.2 kB (new) · 751 B CSS (new) | — | — · — · — |
| lab/ListInput | 98.1 kB (new) · 1.6 kB CSS (new) | — | — · — · — |
| lab/NavigationScreen | 78.6 kB (new) · 1.5 kB CSS (new) | — | — · — · — |
| lab/NavigationStack | 78.6 kB (new) · 1.5 kB CSS (new) | — | — · — · — |
| lab/PageControl | 71.9 kB (new) · 709 B CSS (new) | — | — · — · — |
| lab/Schedule | 101.6 kB (new) · 3.9 kB CSS (new) | — | — · — · — |
| lab/SelectableCardGroup | 61.2 kB (new) · 162 B CSS (new) | — | — · — · — |
| lab/TourStep | 91.4 kB (new) · 590 B CSS (new) | — | — · — · — |
| lab/TransferList | 92.7 kB (new) · 1.7 kB CSS (new) | — | — · — · — |
| lab/TransferListSelector | 99.7 kB (new) · 1.9 kB CSS (new) | — | — · — · — |
| richtext/RichTextEditor | 293.3 kB (new) · 2.6 kB CSS (new) | — | — · — · — |
| richtext/RichTextEditorToolbar | 247.2 kB (new) · 454 B CSS (new) | — | — · — · — |
| richtext/RichTextView | 273.0 kB (new) · 2.3 kB CSS (new) | — | — · — · — |
Package size: measured; main has no measurement of the merge base to compare yet.
API changes: cli +14 · ~5 · −0 (against the merge base's committed report)
Committed API report behind this build: cli 19 rows, core 24 rows; run pnpm api:report.
19 API changes (advisory)
| Package | Where | Signature | Usage | |
|---|---|---|---|---|
| + | cli |
./api · Types · type SearchResultEntry |
deprecated?: ComponentDeprecation | undefined |
import type {SearchResultEntry} from '@astryxdesign/cli/api'; const x: SearchResultEntry = {deprecated: …} |
| + | cli |
./authoring · Types · interface ComponentDeprecation |
interface ComponentDeprecation |
import type {ComponentDeprecation} from '@astryxdesign/cli/authoring' |
| + | cli |
./authoring · Types · interface ComponentIconSlotDoc |
interface ComponentIconSlotDoc |
import type {ComponentIconSlotDoc} from '@astryxdesign/cli/authoring' |
| + | cli |
./authoring · Types · interface ComponentIconSlotStateDoc |
interface ComponentIconSlotStateDoc |
import type {ComponentIconSlotStateDoc} from '@astryxdesign/cli/authoring' |
| + | cli |
./authoring · Types · interface MultiComponentDoc |
deprecated?: ComponentDeprecation |
import type {MultiComponentDoc} from '@astryxdesign/cli/authoring'; const x: MultiComponentDoc = {deprecated: …} |
| + | cli |
./authoring · Types · interface SingleComponentDoc |
deprecated?: ComponentDeprecation |
import type {SingleComponentDoc} from '@astryxdesign/cli/authoring'; const x: SingleComponentDoc = {deprecated: …} |
| + | cli |
./doc · Types · interface ComponentBaseDoc |
deprecated?: ComponentDeprecation |
import type {ComponentBaseDoc} from '@astryxdesign/cli/doc'; const x: ComponentBaseDoc = {deprecated: …} |
| + | cli |
./doc · Types · interface SubComponentDoc |
deprecated?: ComponentDeprecation |
import type {SubComponentDoc} from '@astryxdesign/cli/doc'; const x: SubComponentDoc = {deprecated: …} |
| + | cli |
./doc · Also exported from an earlier entry point · ComponentDeprecation |
ComponentDeprecation (./authoring) |
import {ComponentDeprecation} from '@astryxdesign/cli/doc' |
| + | cli |
./doc · Also exported from an earlier entry point · ComponentIconSlotDoc |
ComponentIconSlotDoc (./authoring) |
import {ComponentIconSlotDoc} from '@astryxdesign/cli/doc' |
| + | cli |
./doc · Also exported from an earlier entry point · ComponentIconSlotStateDoc |
ComponentIconSlotStateDoc (./authoring) |
import {ComponentIconSlotStateDoc} from '@astryxdesign/cli/doc' |
| + | cli |
./template · Also exported from an earlier entry point · ComponentDeprecation |
ComponentDeprecation (./authoring) |
import {ComponentDeprecation} from '@astryxdesign/cli/template' |
| + | cli |
./template · Also exported from an earlier entry point · ComponentIconSlotDoc |
ComponentIconSlotDoc (./authoring) |
import {ComponentIconSlotDoc} from '@astryxdesign/cli/template' |
| + | cli |
./template · Also exported from an earlier entry point · ComponentIconSlotStateDoc |
ComponentIconSlotStateDoc (./authoring) |
import {ComponentIconSlotStateDoc} from '@astryxdesign/cli/template' |
| ~ | cli |
./api · Functions · function search |
function search: (query: string, options?: { cwd?: string | undefined; type?: "template" | "component" | "hook" | "theme" | "doc" | undefined; limit?: number | undefined }) => Promise<SearchResponse> → function search: (query: string, options?: { cwd?: string | undefined; type?: "template" | "component" | "doc" | "theme" | "hook" | undefined; limit?: number | undefined }) => Promise<SearchResponse> |
import {search} from '@astryxdesign/cli/api'; search(…) |
| ~ | cli |
./authoring · Types · interface MultiComponentDoc |
theming?: { container?: boolean; targets: ComponentThemingTarget[]; vars?: ComponentThemingVar[]; derived?: ComponentThemingDerivedVar[] } → theming?: { container?: boolean; targets: ComponentThemingTarget[]; vars?: ComponentThemingVar[]; derived?: ComponentThemingDerivedVar[]; componentIcons?: ComponentIconSlotDoc[] } |
import type {MultiComponentDoc} from '@astryxdesign/cli/authoring'; const x: MultiComponentDoc = {theming: …} |
| ~ | cli |
./authoring · Types · interface SingleComponentDoc |
theming?: { container?: boolean; targets: ComponentThemingTarget[]; vars?: ComponentThemingVar[]; derived?: ComponentThemingDerivedVar[] } → theming?: { container?: boolean; targets: ComponentThemingTarget[]; vars?: ComponentThemingVar[]; derived?: ComponentThemingDerivedVar[]; componentIcons?: ComponentIconSlotDoc[] } |
import type {SingleComponentDoc} from '@astryxdesign/cli/authoring'; const x: SingleComponentDoc = {theming: …} |
| ~ | cli |
./doc · Types · interface ComponentBaseDoc |
theming?: { container?: boolean; targets: ComponentThemingTarget[]; vars?: ComponentThemingVar[]; derived?: ComponentThemingDerivedVar[] } → theming?: { container?: boolean; targets: ComponentThemingTarget[]; vars?: ComponentThemingVar[]; derived?: ComponentThemingDerivedVar[]; componentIcons?: ComponentIconSlotDoc[] } |
import type {ComponentBaseDoc} from '@astryxdesign/cli/doc'; const x: ComponentBaseDoc = {theming: …} |
| ~ | cli |
./doc · Types · interface SubComponentDoc |
theming?: { container?: boolean; targets: ComponentThemingTarget[]; vars?: ComponentThemingVar[]; derived?: ComponentThemingDerivedVar[] } → theming?: { container?: boolean; targets: ComponentThemingTarget[]; vars?: ComponentThemingVar[]; derived?: ComponentThemingDerivedVar[]; componentIcons?: ComponentIconSlotDoc[] } |
import type {SubComponentDoc} from '@astryxdesign/cli/doc'; const x: SubComponentDoc = {theming: …} |
Touched components checked; add ci:run-visual, ci:run-a11y or ci:run-rtl to run the full suites.
Generated by PR Enrichment workflow | View full report
There was a problem hiding this comment.
Requesting changes for one fix in the new root option.
- In a closed shadow root,
rootjudges only where a press starts, so a press that starts outside the layer and lifts on it closes the layer while the same press leaves a light-DOM or open-root layer open; judge the lift at the root as well (for example, registerhandleUponrootand, at the document, skip a lift whose composed path holdsroot.host) and add a test for that press.
Non-blocking: handleCancel does not check pointerTypes when closesOnPan is off, and the onOutside JSDoc and the file header still describe only the lift-and-cancel model. The pan close, its 10 px threshold on either axis, the second-finger handling and the unchanged default watches all check out.
[Automated review]
There was a problem hiding this comment.
Requesting changes for two fixes in the new root option.
- In a closed shadow root that sits inside another closed shadow root, the document sees a press as a press on the outer host, so the document's skip test and the host listener, which use the root's own host, miss it and a press that starts outside the layer and lifts on it closes the layer; use the outermost shadow host for both and add a nested case, since ContextMenu judges nested closed roots today.
shadowHostOftestsinstanceof ShadowRoot, which is false for a shadow root from a same-origin iframe or a Picture-in-Picture window, so the root's lift listener is never added and the same press closes the layer there; check bynodeType, as this module'sisShadowRootdoes, and add an iframe case.
Non-blocking: the closesOnPan JSDoc says only the first pointer counts, but a second finger outside is followed when the first went down inside the layer, and the move subscription could start at the outside press instead of with the watch. The single closed-root lift fix, the pan close at 10 px on either axis, the pointer-type filter and the unchanged default watches check out.
[Automated review]
There was a problem hiding this comment.
Requesting changes for two fixes in the new root option.
- In a closed root nested inside another, a lift on the outer root's content is judged only by the outermost host's bubble-phase listener, so a control there whose
pointeruphandler stops propagation leaves the layer open, and withclosesOnPanthe stale press then makes the watch ignore every later touch; judging those lifts in the capture phase (the same listener on each closed root betweenrootand the outermost host, each skipping a lift whose path holds the host below it) and a test that taps such a control would fix it. - The new
shadowHostOfinutils/flatTreerepeats the host check thatisShadowRootalready does inoutsidePress.ts, soisWithinLayershould walk withshadowHostOfand the privateisShadowRootshould go, leaving one realm-safe check.
Non-blocking: a few comments could follow the comment style more closely (the "An anchored menu closes so under a finger" sentence, the "on the way down / back up" idioms, and the long file header). The nested and other-window host lookups, the pan close at 10 px on either axis, the pointer-type filter and the unchanged default watches check out.
[Automated review]
There was a problem hiding this comment.
Requesting changes for one fix.
shadowRootsOutwardinutils/flatTreewalks the same shadow-root chain asopenShadowRootsOfinutils/selectionLock(whose host lookup for text under a shadow root also repeatsshadowHostOf), so the selection lock should call the two shared helpers, filtering to open roots, and drop its own copies; that change keeps today's behavior.
The capture-phase lift judgment on every closed root and the new-primary-pointer rule resolve the last round's findings. Non-blocking: the comment above shadowRootsOutward(root) in outsidePress.ts repeats the helper's JSDoc and can go.
[Automated review]
There was a problem hiding this comment.
No blocking findings: the three opt-in options for the outside-press watch are internal and passed by no component yet, and the selection lock now calls the shared shadowHostOf and shadowRootsOutward helpers, which resolves the last round's finding.
The pan close at 10 px on either axis, the pointer-type filter and the closed-shadow-root judgment each have tests that fail before the change, and the existing callers' suites pass.
- Non-blocking: the
outsidePress.tsfile header grows to 20 lines and its prose still says a cancelled press is forgotten, which no longer holds withclosesOnPan; trimming it to its tags (see the inline note) fixes both.
[Automated review]
abee181 to
ed150e2
Compare
There was a problem hiding this comment.
Changes requested for one wording fix; the new options, their tests and the unchanged no-options path look right.
- Miss: the title and changeset say the watch can now "judge a press inside a shadow root", but a press inside an open shadow root was already judged correctly before this change and every new test uses a closed root, so say "closed shadow root" in both (for example "…and judge a press inside a closed shadow root, which the document sees as its host").
Non-blocking: the outsidePress.ts file header is still 20 lines, and its prose says a cancelled press is forgotten, which no longer holds with closesOnPan; see the earlier inline note on line 9.
[Automated review]
ad8e81b to
3e95544
Compare
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet.
The title and changeset now say "closed shadow root", which resolves the last review's only blocking finding, and the outsidePress.ts header keeps only its tags. The three options stay opt-in and no component passes them yet, so today's outside-press dismissal is unchanged.
Next step: CI skips drafts and unlabelled forks, so mark the pull request ready for review and have a maintainer add the ci:run label (it takes effect on the next push, or a close and reopen) so CI runs.
[Automated review]
3e95544 to
ae1d74a
Compare
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet. The pull request is a draft, so marking it ready for review starts its CI run (the ci:run label is already applied).
The three opt-in options for the layer's outside-press watch (closesOnPan, pointerTypes and root) follow the touch-presentation spec's pan, cancel and finger-or-pen rules, stay internal, and are passed by no component yet, so every existing watch keeps today's behavior; the new tests fail against the watch on main and pass here.
- Non-blocking: the
flatTree.tsheader's gloss "a shadow root's host" restatesshadowHostOf's name; the earlier inline suggestion still applies. - Non-blocking, for the caller in #8125:
closesOnPanfollows every pointer type unlesspointerTypesnarrows it, so pass both to keep a mouse's close at the release.
[Automated review]
There was a problem hiding this comment.
Approved pending CI: the unit, typecheck, lint, interaction, accessibility and visual checks pass on this head, and the final test check is still running.
The three opt-in options for the layer's outside-press watch (closesOnPan, pointerTypes and root) follow the touch-presentation spec's rule that a finger or pen outside a menu closes it as it begins to pan, stay internal, and are passed by no component yet, so every existing watch keeps today's behavior; the new cases fail against the watch on main and pass here.
- Non-blocking, for the caller in #8125:
closesOnPanfollows every pointer type unlesspointerTypesnarrows it, so pass both to keep a mouse's close at its release. - Non-blocking: the
flatTree.tsheader's "a shadow root's host" repeatsshadowHostOf's name; the earlier inline suggestion still applies. - #8125's branch does not contain this head yet; it still builds on this pull request's previous revision.
[Automated review]
|
/approve-spec 57f4e92 |
|
/approve-spec 10ae071 |
There was a problem hiding this comment.
Approved: the test, build, typecheck, lint and interaction checks all pass on this head.
The three opt-in options for the layer's outside-press watch (closesOnPan, pointerTypes and root) follow the touch-presentation spec's pan-outside rule, stay internal, and are passed by no component yet, so every existing watch keeps today's behavior; the new cases fail against the current watch and pass here.
- Non-blocking: the
flatTree.tsheader's "a shadow root's host" repeatsshadowHostOf's name; the earlier inline suggestion still applies. - #8125's branch still builds on this pull request's previous revision, so the stack line does not hold yet and this pull request was reviewed on its own.
[Automated review]
Where a coarse pointer's held finger opens the menu, the same finger slides onto an item, which lights under it, and its lift selects it. A presentation="popover" or fine-pointer long press hands nothing over. This commit carries the pull request's own diff from bc4efd0, replayed on main after meta#9814's squash.
Where a coarse pointer's held finger opens the menu, the same finger slides onto an item, which lights under it, and its lift selects it. A presentation="popover" or fine-pointer long press hands nothing over. It carries this pull request's own diff from bc4efd0, replayed on main after meta#9814's squash, and folds these 11 commits (the history of bc4efd0 has each one): - test(useMenuPress): a pointer that went down elsewhere is the menu's opening press - feat(useMenuPress): a pointer that went down elsewhere is the menu's opening press - test(ContextMenu): the finger a long press opened the menu under slides onto an item and its lift selects it - feat(ContextMenu): the finger a long press opened the menu under slides onto an item, and its lift selects it - docs(ContextMenu): FR12 records the slide onto an item after a long press opens the menu - docs(ContextMenu): the slide's release note and docs say the menu opens at the finger - docs(ContextMenu): FR12's slide follows a long press that opens the menu at the finger - docs(ContextMenu): FR5 points the slide to FR13 - docs(core): useMenuPress's @output keeps main's sentence - docs(ContextMenu): the slide changeset names where the slide applies - docs(ContextMenu): the slide changeset covers adaptive popovers too
Where a coarse pointer's held finger opens the menu, the same finger slides onto an item, which lights under it, and its lift selects it. A presentation="popover" or fine-pointer long press hands nothing over. It carries this pull request's own diff from bc4efd0, replayed on main after meta#9814's squash, and folds these 11 commits (the history of bc4efd0 has each one): - test(useMenuPress): a pointer that went down elsewhere is the menu's opening press - feat(useMenuPress): a pointer that went down elsewhere is the menu's opening press - test(ContextMenu): the finger a long press opened the menu under slides onto an item and its lift selects it - feat(ContextMenu): the finger a long press opened the menu under slides onto an item, and its lift selects it - docs(ContextMenu): FR12 records the slide onto an item after a long press opens the menu - docs(ContextMenu): the slide's release note and docs say the menu opens at the finger - docs(ContextMenu): FR12's slide follows a long press that opens the menu at the finger - docs(ContextMenu): FR5 points the slide to FR13 - docs(core): useMenuPress's @output keeps main's sentence - docs(ContextMenu): the slide changeset names where the slide applies - docs(ContextMenu): the slide changeset covers adaptive popovers too
Where a coarse pointer's held finger opens the menu, the same finger slides onto an item, which lights under it, and its lift selects it. A presentation="popover" or fine-pointer long press hands nothing over. It carries this pull request's own diff from bc4efd0, replayed on main after meta#9814's squash, and folds these 11 commits (the history of bc4efd0 has each one): - test(useMenuPress): a pointer that went down elsewhere is the menu's opening press - feat(useMenuPress): a pointer that went down elsewhere is the menu's opening press - test(ContextMenu): the finger a long press opened the menu under slides onto an item and its lift selects it - feat(ContextMenu): the finger a long press opened the menu under slides onto an item, and its lift selects it - docs(ContextMenu): FR12 records the slide onto an item after a long press opens the menu - docs(ContextMenu): the slide's release note and docs say the menu opens at the finger - docs(ContextMenu): FR12's slide follows a long press that opens the menu at the finger - docs(ContextMenu): FR5 points the slide to FR13 - docs(core): useMenuPress's @output keeps main's sentence - docs(ContextMenu): the slide changeset names where the slide applies - docs(ContextMenu): the slide changeset covers adaptive popovers too
Stack: #9814 → #8125 → #9816 → #8133
Maintainer impact
ContextMenu's touch model keeps the page free to scroll while its menu is up, so a touch outside the menu must close it as that touch begins to pan, as UIKit does (
spec:AST-094FR32). Today the layer's outside-press watch hears only presses and lifts, and it cannot follow one pointer type or judge a press inside a closed shadow root. #8125 needs all three. This pull request adds them alone, for size.Intended invariant
User impact on its own: none. This is groundwork: Layer's outside-press watch gains optional
pointerTypes,closesOnPanandroot, no component passes them yet, and every existing watch behaves as today; #8125 is the first user.Change
watchOutsidePressanduseOutsidePresstake an optionalOutsidePressOptions:pointerTypes: the pointer types the watch follows; every type when omitted.closesOnPan: a press that starts outside also closes the layer as it begins to pan, once its larger axis reaches core's pan threshold (UIKIT_PAN.hysteresis, the pan recognizer's own test), or when the browser takes the press. While one press outside is followed, other pointers wait; a new primary pointer starts a new press. Its moves come through core's input stream (subscribeInput), not a new window listener.root: the shadow root the layer renders in, from any window. The document sees a press inside a closed root as a press on its host. So each root from it out to the document judges presses in the capture phase too: an inner root's judgment of a press's start stands, and each skips a lift that goes into the root below it. A host judges a lift on itself. Core's flat-tree owner gainsshadowHostOfandshadowRootsOutwardfor it, and the selection lock now walks shadow roots through them.Evidence
outsidePress.test.tscases fail at the test commit (6 failures), and the dismissal-count case fails before its fix.Scope
The changeset is
[chore] Internal:; the watch is not exported from the package.Testing
Rebased onto main 9e559e9, which it conflicted with: #9988 added the per-document outside-dismissal count to
outsidePress.tsand its test, so the test file imports both and keeps both describe blocks, and the header lists both. The pan and the cancel close now count as a dismissal too, as #9988's lift does (two commits; red first, 1 of 22 cases fails before the fix).git range-diffagainst ae1d74a shows no other change. Local checks at e11abfe, on main 9e559e9: core typecheck and the Layer, ContextMenu, DropdownMenu, utils and motion units (2,779 passed); the full ui (21,278 passed) and node (16,672 passed) suites,CI=true pnpm lint(0 errors), check:changesets, check:knowledge, the Chromium interaction specs for ContextMenu, Layer, DropdownMenu, Dialog and Drawer (60 passed, 1 skipped), WebKit's ContextMenuLongPress, inputHold, preserveAnimations and DropdownMenuDragHighlight (35 passed, 8 skipped), and the ContextMenu, Layer and DropdownMenu a11y contracts (249 passed) ran at the stack's top, 6b4f1dc. Size (INV6), gzip: ContextMenu's import 85,035 → 85,016 B, DropdownMenu's unchanged (79,767 B), CSS unchanged. Red first: pointer-type filtering, the pan close (on each axis and at the threshold itself), the browser's cancel, the second finger, a new primary pointer after an unseen lift, the shadow-root judgment of a press and of a lift on the layer (in a closed root, in one inside another, and in a same-origin iframe's), a lift on an outer root's control that stops it, an unfollowed pointer's cancel,shadowHostOffor another window's root, and the pan or cancel close's dismissal count each fail before the change.