Sharing mockup: click flicker (2026-11-02) #864

Open
opened 2026-11-02 13:55:28 +00:00 by kayg · 3 comments
Author
Owner

Causes (measured, Chromium on dev-01, rAF sampling + video)

Before, click outside at t=0 (video, 40 ms steps):

  • Sheet: opacity 1 -> 0 in one strong ease-out: visible for ~2 frames, no shrink seen.
  • Dim: .scrim opacity stayed 1 for ~340 ms, then the element was removed and body background + page brightness jumped in one step (~677 ms). No exit transition at all.
  • Pill group (Share, ⋯): data-menu-open hid its layers (opacity 0) until the sheet was removed, then they popped back (0 -> 1 in one frame).
  • Cover Change/Reposition pill: pops in on hover once the pointer is over the cover (the outside click lands there); it also sat under the Share/⋯ pill.

before

Fix (commits 7e1aa03c, 02290403)

  • Sheet shrinks about the Share button (scale 1 -> 0.2, 240 ms ease-out), fades over the last 65 %.
  • Dim is its own layer, fades out in sync (240 ms) and is only removed when clear; dimPage(false) runs after it. Same one-way fade on open as before.
  • Pill group layers fade back in (150 ms) as the sheet reaches the button, no pop.
  • Cover tools pill moved left of the Share/⋯ pill on desktop so they never overlap.
  • Frames are stepped with paused Web Animations (exact 16.7 ms steps, no GPU needed). Exact real-GPU frame timing not measured on the Mac VM.

After, click outside (0 to 300 ms, 16.7 ms steps):
after outside

After, Esc:
after esc

Other clicks (role select, link menu, QR, New link, Copy): rAF sampling of dim/scrim, pills, body background and panel opacity shows no change on any of them (single constant row), so no flashes.

Guest page

"View only" is now a glass pill with a lock icon; pills' outer edges equal the card's outer edges (measured 0.00 px left and right, desktop 1440 and phone 390, light and dark, view and edit link).

desk dark
desk light
phone dark
phone light
edit phone light

Share sheet closed / open




## Causes (measured, Chromium on dev-01, rAF sampling + video) Before, click outside at t=0 (video, 40 ms steps): - **Sheet**: opacity 1 -> 0 in one strong ease-out: visible for ~2 frames, no shrink seen. - **Dim**: `.scrim` opacity stayed 1 for ~340 ms, then the element was removed and `body` background + page brightness jumped in one step (~677 ms). No exit transition at all. - **Pill group** (Share, ⋯): `data-menu-open` hid its layers (opacity 0) until the sheet was removed, then they popped back (0 -> 1 in one frame). - **Cover Change/Reposition pill**: pops in on hover once the pointer is over the cover (the outside click lands there); it also sat under the Share/⋯ pill. ![before](https://git.kayg.org/attachments/ddb1b839-7282-4e84-ba40-3525aef61ec5) ## Fix (commits 7e1aa03c, 02290403) - Sheet shrinks about the Share button (scale 1 -> 0.2, 240 ms ease-out), fades over the last 65 %. - Dim is its own layer, fades out in sync (240 ms) and is only removed when clear; `dimPage(false)` runs after it. Same one-way fade on open as before. - Pill group layers fade back in (150 ms) as the sheet reaches the button, no pop. - Cover tools pill moved left of the Share/⋯ pill on desktop so they never overlap. - Frames are stepped with paused Web Animations (exact 16.7 ms steps, no GPU needed). Exact real-GPU frame timing not measured on the Mac VM. After, click outside (0 to 300 ms, 16.7 ms steps): ![after outside](https://git.kayg.org/attachments/7a650f7f-0183-4c83-8c34-5a5e4d7d2613) After, Esc: ![after esc](https://git.kayg.org/attachments/de5441d2-41de-422c-b9eb-7ff4b9afb4fd) Other clicks (role select, link menu, QR, New link, Copy): rAF sampling of dim/scrim, pills, body background and panel opacity shows no change on any of them (single constant row), so no flashes. ## Guest page "View only" is now a glass pill with a lock icon; pills' outer edges equal the card's outer edges (measured 0.00 px left and right, desktop 1440 and phone 390, light and dark, view and edit link). ![desk dark](https://git.kayg.org/attachments/7c08a244-23a3-4ab5-89da-6aa08b64c2e6) ![desk light](https://git.kayg.org/attachments/6562ece8-aeb5-498c-8a47-a890002d570e) ![phone dark](https://git.kayg.org/attachments/f2172745-f169-4cb1-a423-cfc2bf83c97a) ![phone light](https://git.kayg.org/attachments/16acbb14-8297-485e-b114-02097f47d1a9) ![edit phone light](https://git.kayg.org/attachments/d233ed63-d92d-49b1-af51-2212f238936c) ## Share sheet closed / open ![](https://git.kayg.org/attachments/1ac2b0a0-4313-42fc-8f64-3e7a744ceea4) ![](https://git.kayg.org/attachments/47dd5993-7d71-479a-862a-16a75db2b30c) ![](https://git.kayg.org/attachments/8ab97ed8-5fcf-41ec-bac5-4e73a1935de0) ![](https://git.kayg.org/attachments/03ee4e76-bc1a-4932-b36a-2e1010b4d08c)
Author
Owner

Round 2 (share sheet design approved)

1. Can't click after dismissing: found and fixed. The tap catcher (.scrim) stayed over the page for the whole 240 ms close plus iOS's 400 ms "late click" wait, and every swallowed click restarted that wait. So clicks right after a dismiss were eaten (Chromium: a click on the note's text 60 ms after dismissing did nothing). Now, for a mouse, the catcher lets go as soon as the button is up; only a finger keeps it until the ghost-click window ends. Test apps/mockup/tests/share-close.spec.ts: dismiss (outside, outside on text, Esc), 60 ms later click a list row / the note's text, then nothing is left behind. 12/12 pass in Chromium and WebKit on dev-01; the same test on the previous commit (02290403) fails 3/6 in Chromium (the text clicks).
Note: the Share button can no longer close the sheet (it is under the sheet now, see 2), so that way is not tested.

2. The toolbar becomes the sheet (desktop). The sheet's top-right corner is the toolbar's (same top/right, read from the toolbar at open). Its glass starts as the toolbar's shape (72x32, round ends) and grows to the sheet (clip-path on the glass and on the words only, 300 ms; the words fade in after 90 ms); closing shrinks it back (240 ms) while the toolbar's own icons come back as it arrives. The phone is unchanged: it keeps the rule "an inset sheet always slides up from the bottom"; tell me if the phone should also grow from the top pills.
Open, stepped at 16.7 ms:
open
Close (click outside):
close

3. Icon size. The lock in "View only" is now a plain <Icon> (the one --glyph token: 16 px desktop, 22 px phone, same as the tab bar and block toolbar). Checked the sharing screens: link icon, QR, plus, close, back are all plain Icons; only the disclosure chevrons and the chip check are mini (the decided exception).

4. Add people is now at the top of the people list.

5. Ghosting: ?glass=v2 prototype (not shipped, mockup only). Global tokens, defined in apps/mockup/src/styles/glass.css, switched on by &glass=v2:

  • --glass-float-filter: blur(20px) -> blur(40px) (saturate/brightness unchanged: 180% / 1.04 light, 170% / 0.9 dark)
  • --glass-float-dense: rgb(253 250 245 / 0.32) -> 0.50 (light), rgb(36 32 28 / 0.32) -> 0.50 (dark)
  • --glass-float (non-dense) is unchanged.
    Each pair: left = today, right = v2; rows: share sheet, Style sheet, a menu, over the same cover.
    Desktop light:
    Desktop dark:
    Phone light (left to right: share, style, menu; today then v2):
    Phone dark:

Review links (toggle v2 live by adding &glass=v2):

Other shots: guest view (lock bigger), share open/closed.




## Round 2 (share sheet design approved) **1. Can't click after dismissing: found and fixed.** The tap catcher (`.scrim`) stayed over the page for the whole 240 ms close plus iOS's 400 ms "late click" wait, and every swallowed click restarted that wait. So clicks right after a dismiss were eaten (Chromium: a click on the note's text 60 ms after dismissing did nothing). Now, for a mouse, the catcher lets go as soon as the button is up; only a finger keeps it until the ghost-click window ends. Test `apps/mockup/tests/share-close.spec.ts`: dismiss (outside, outside on text, Esc), 60 ms later click a list row / the note's text, then nothing is left behind. 12/12 pass in Chromium and WebKit on dev-01; the same test on the previous commit (02290403) fails 3/6 in Chromium (the text clicks). Note: the Share button can no longer close the sheet (it is under the sheet now, see 2), so that way is not tested. **2. The toolbar becomes the sheet (desktop).** The sheet's top-right corner is the toolbar's (same top/right, read from the toolbar at open). Its glass starts as the toolbar's shape (72x32, round ends) and grows to the sheet (clip-path on the glass and on the words only, 300 ms; the words fade in after 90 ms); closing shrinks it back (240 ms) while the toolbar's own icons come back as it arrives. The phone is unchanged: it keeps the rule "an inset sheet always slides up from the bottom"; tell me if the phone should also grow from the top pills. Open, stepped at 16.7 ms: ![open](https://git.kayg.org/attachments/525ecba0-d8cb-4c9d-acec-02936f641896) Close (click outside): ![close](https://git.kayg.org/attachments/0c344cee-ef42-4b44-9a01-8ad1016c90b4) **3. Icon size.** The lock in "View only" is now a plain `<Icon>` (the one `--glyph` token: 16 px desktop, 22 px phone, same as the tab bar and block toolbar). Checked the sharing screens: link icon, QR, plus, close, back are all plain Icons; only the disclosure chevrons and the chip check are `mini` (the decided exception). **4. Add people** is now at the top of the people list. **5. Ghosting: `?glass=v2` prototype (not shipped, mockup only).** Global tokens, defined in `apps/mockup/src/styles/glass.css`, switched on by `&glass=v2`: - `--glass-float-filter`: `blur(20px)` -> `blur(40px)` (saturate/brightness unchanged: 180% / 1.04 light, 170% / 0.9 dark) - `--glass-float-dense`: `rgb(253 250 245 / 0.32)` -> `0.50` (light), `rgb(36 32 28 / 0.32)` -> `0.50` (dark) - `--glass-float` (non-dense) is unchanged. Each pair: left = today, right = v2; rows: share sheet, Style sheet, a menu, over the same cover. Desktop light: ![](https://git.kayg.org/attachments/2ce9a35c-4473-48e8-b619-287921e212fe) Desktop dark: ![](https://git.kayg.org/attachments/63d22369-19ac-40e0-b3b2-9f5e68d605b3) Phone light (left to right: share, style, menu; today then v2): ![](https://git.kayg.org/attachments/7f388df7-1ede-4e0c-b0bc-4b717234e650) Phone dark: ![](https://git.kayg.org/attachments/c8dd34e9-7d5f-48b5-aeef-02e9cd6f8c5e) Review links (toggle v2 live by adding `&glass=v2`): - share, today: https://preview.calternal.cloud/calendar-2/chrome.html#/note/spiti?list=all&share=1&slice=2 ; v2: https://preview.calternal.cloud/calendar-2/chrome.html#/note/spiti?list=all&share=1&slice=2&glass=v2 - Style sheet v2: https://preview.calternal.cloud/calendar-2/chrome.html#/note/spiti?list=all&bar=style&glass=v2 - guest page: https://preview.calternal.cloud/calendar-2/chrome.html#/s/spiti~l1?slice=2 and https://preview.calternal.cloud/calendar-2/chrome.html#/s/spiti~l2?slice=2 Other shots: guest view (lock bigger), share open/closed. ![](https://git.kayg.org/attachments/71aee13f-7b3a-4498-b097-fe55997df905) ![](https://git.kayg.org/attachments/fe8fc0af-2287-43d3-bf85-ada835cef7de) ![](https://git.kayg.org/attachments/cd3a504d-1fdf-43d5-90e1-dca3ac73101c) ![](https://git.kayg.org/attachments/f3c2b002-5a4b-49fb-849f-3fc165ea797e) ![](https://git.kayg.org/attachments/3b2ad6a1-667e-4bfe-9a3d-3290b05d7c65)
Author
Owner

Guest name sheet: the field has no fill now (computed background is transparent, the glass shows through, the accent focus ring stays). ?glass=v2 removed (CSS block and param handling); today's glass stays. Order: desktop light, desktop dark, phone light, phone dark.



Guest name sheet: the field has no fill now (computed background is transparent, the glass shows through, the accent focus ring stays). `?glass=v2` removed (CSS block and param handling); today's glass stays. Order: desktop light, desktop dark, phone light, phone dark. ![](https://git.kayg.org/attachments/1467e7a5-2de1-4ec7-9d8c-6ee1ac6ec2a5) ![](https://git.kayg.org/attachments/1d045f11-a04b-4533-814c-ad724a546e2f) ![](https://git.kayg.org/attachments/42b3f3a2-e430-4cca-b42f-37a12e6206d2) ![](https://git.kayg.org/attachments/715fbf85-0d5a-46c3-b360-270a2cfe5b23)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/calternal#864
No description provided.