|
3 | 3 | /** |
4 | 4 | * @file DropdownMenuTouchHandoff.interaction.browser.spec.ts |
5 | 5 | * @input The built Default DropdownMenu story under the harness's phone |
6 | | - * profile, real touch input (Chromium CDP / WebKit's input command), and |
7 | | - * UIMenu's handoff distance from the UIKit constants table |
| 6 | + * profile, with real touch input (Chromium CDP / WebKit's input command). |
| 7 | + * UIMenu's handoff distance comes from the UIKit constants table. |
8 | 8 | * @output Interaction proofs for the finger that opened DropdownMenu from its |
9 | | - * trigger (`spec:AST-094` FR29): once the menu is open under the held |
10 | | - * finger, a move shorter than the handoff onto a row and a lift act on |
11 | | - * nothing and leave the menu open, however long the finger rested; a |
12 | | - * finger that travels past it picks the row it lifts on, once |
| 9 | + * trigger (`spec:AST-094` FR29). Once the menu is open under the held |
| 10 | + * finger, a move shorter than the handoff onto a row, and a lift, act on |
| 11 | + * nothing. The menu stays open, however long the finger rested. A finger |
| 12 | + * that travels past the handoff picks the row it lifts on, once. |
13 | 13 | * @position Evidence for the handoff in DropdownMenu (and MoreMenu, which |
14 | 14 | * renders it); the machine itself is unit-tested in menuPressGesture.test.ts |
15 | 15 | * and useMenuPress.test.tsx |
@@ -77,8 +77,8 @@ interface Layout { |
77 | 77 |
|
78 | 78 | /** |
79 | 79 | * The story under a finger, with the open menu's rows measured once its |
80 | | - * entrance has come to rest: a tap opens it (its lift's click), Escape |
81 | | - * closes it again. |
| 80 | + * entrance has come to rest. A tap opens the menu (its lift's click), and |
| 81 | + * Escape closes it again. |
82 | 82 | */ |
83 | 83 | async function openLayout(page: Page): Promise<Layout> { |
84 | 84 | await openStory(page, storybook(), 'core-dropdownmenu--default'); |
@@ -111,9 +111,9 @@ test('a move shorter than the handoff onto a row, after the menu opened under th |
111 | 111 | throw new Error('no Edit row'); |
112 | 112 | } |
113 | 113 | // The finger rests on the trigger's edge nearest the menu until the menu |
114 | | - // is open and the press has long settled, then moves 1 px (the first |
115 | | - // sample the menu sees, where the distance counts from) and on, short of |
116 | | - // the handoff, onto the first row. |
| 114 | + // is open and the press has long settled. Then it moves 1 px: the first |
| 115 | + // sample the menu sees, where the distance counts from. It goes on, short |
| 116 | + // of the handoff, onto the first row. |
117 | 117 | const start = {x: layout.x, y: Math.floor(layout.triggerBottom) - 1}; |
118 | 118 | const origin = {x: layout.x, y: start.y + 1}; |
119 | 119 | const end = {x: layout.x, y: Math.ceil(edit.top) + 1}; |
|
0 commit comments