Skip to content

Build Help, Copy's confirmation and the format radios from the platform - #21

Merged
ericchernuka merged 3 commits into
masterfrom
ec/native-popups
Nov 10, 2026
Merged

ericchernuka merged 3 commits into
masterfrom
ec/native-popups

Conversation

@ericchernuka

Copy link
Copy Markdown
Owner

Summary

Base UI was 135 KB of a 492 KB script, and we only used it for three parts. They now come from the platform.

 <Header>
-  <Popover.Root> <Popover.Trigger> <Popover.Portal> <Popover.Positioner> <Popover.Popup>
+  <button popovertarget>
+  <dialog popover="auto">        # CSS anchor positioning, @starting-style
 <ColorCard.Root>
-  <Toast.Provider> <Toast.Viewport> <Toast.Positioner> <Toast.Root>
+  confirmation.ts                # timer store, read through useSyncExternalStore
+  <div popover="manual">         # anchored to Copy, spoken through the Announcer
   <ColorCard.Format>
-    <RadioGroup> <Radio.Root>
+    <label><input type="radio">

ADR 0007 has the reasoning. CODING_STANDARDS and the verify-huebo recipes no longer point at Base UI.

A second commit adds a ↗ after links that open a new tab. Screen readers hear "Link to external site" instead of the arrow.

Evidence

  • Before: index.js 491.9 KB, 164.7 KB gzipped
    After: index.js 356.9 KB, 117.8 KB gzipped (−27.4%, −28.5%)

I ran one agent-browser script against master and against this branch, in the same Chromium:

  • Opacity and scale, sampled every frame, match for Help opening, Help closing and the confirmation's spring. The largest gap is 0.001.
  • Help at 1280×900 and 390×844: 0 pixels differ.
  • The confirmation sits within 0.2 px of where Base UI put it. Base UI rounded to whole pixels, so only the text antialiasing differs.
  • Behaviour matched on every row: Escape, click outside, Tab out, clicking Help again, the arrow keys across the format radios, three fast copies giving one confirmation, and the 1.8 s lifetime.

The new browser tests pass on both builds:

given help is shut, when Help is pressed, then the help opens with focus inside it
given help is open, when Escape is pressed, then it shuts and focus is back on Help
given help is open, when the page outside it is clicked, then it shuts and focus is back on Help
given help is open, when focus tabs out of it, then it shuts
given help is open, when Help is pressed again, then it shuts
given a pick, when Copy is pressed, then a screen reader hears the confirmation
master: 12 passed   this branch: 12 passed

pnpm check passes, with 140 tests.

Merge Danger

Door: two-way

A revert brings Base UI back, and nothing stored or linked depends on this change.

Blast Radius: popups

  • The confirmation is no longer a focusable dialog in a Notifications landmark, so F6, swipe to dismiss and pause on hover are gone.
  • Browsers without CSS anchor positioning show Help and the confirmation in the middle of the screen.
  • Browsers without overlay transitions drop the popup out of the top layer as soon as it starts to close.
  • Help's link is now named "Louie Mantia Link to external site".

Base UI was 135 KB of a 492 KB script, and we used it for three small
parts. Help is now a <dialog popover>, the confirmation is a manual
popover anchored to Copy, and the format picker is plain radio inputs.
The script drops to 357 KB (165 KB to 118 KB gzipped).

I ran the same script against master and this branch. The animations
match frame for frame, Help's screenshots match pixel for pixel, and
the new Help and card tests pass on both. Two Base UI behaviours had
to be added by hand: focus moves to the link when Help opens, and goes
back to Help after a click outside or a Tab out.

What we give up: the confirmation is no longer a focusable dialog in a
Notifications landmark, so F6, swipe to dismiss and pause on hover are
gone. Screen readers now hear it through the app's announcer. ADR 0007
has the reasoning, and CODING_STANDARDS no longer points at Base UI.
Links with target="_blank" get a ↗ after them. CSS alt text makes
screen readers say "Link to external site" instead of the arrow. The
arrow is inline-block so the link's underline doesn't run under it.
@vercel

vercel Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
huebo Ready Ready Preview Nov 10, 2026 5:08am UTC

A test that works out its expected value the same way the code does
passes no matter what the code does. The standards now say so, and say
what to expect instead.
@ericchernuka
ericchernuka merged commit b817a4e into master Nov 10, 2026
3 checks passed
@ericchernuka
ericchernuka deleted the ec/native-popups branch November 12, 2026 04:01

This branch was successfully deployed

1 active deployment
Preview — 67f9283e Deployed Nov 10, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant