Skip to content

docs(examples): add human.clear to the primitives demo#50

Merged
totigm merged 5 commits into
mainfrom
demo/primitives-clear
Jun 2, 2026
Merged

docs(examples): add human.clear to the primitives demo#50
totigm merged 5 commits into
mainfrom
demo/primitives-clear

Conversation

@totigm

@totigm totigm commented Jun 2, 2026

Copy link
Copy Markdown
Owner

What

Adds a clear step to the pnpm demo:primitives showcase, right after type: it wipes #type-input with the humanized select-all → delete gesture, then retypes a corrected value — the realistic "edit an existing value" flow. Following steps are renumbered (6→11).

Honest note on scope

While here, I dropped the header's claim that the demo "exercises every Human primitive" — it never actually did. The form primitives (doubleClick / check / uncheck / selectOption / upload) aren't shown here either, so the header now says "core humanized primitives" and explicitly notes the form ones are excluded.

Deliberately not added:

  • outline — no motion (a YAML inspection getter); its home is the MCP, not a visual motion demo.
  • the @humanjs/playwright/test fixture — a test-writing helper, not a tsx demo script.

Adding the visual form primitives (doubleClick/check/selectOption) to this demo is a reasonable follow-up — it needs new DOM (checkbox, select, dbl-click target) and is worth its own pass; I left it out to keep this focused and not delay the release.

Verification

Steps run 1→11 (no dupes), lint clean, typecheck 9/9 (@humanjs/examples in scope). No changeset — @humanjs/examples is private/unpublished.

Inserts a clear step after type (select-all + delete, then retype — the
"edit an existing value" flow) so the gesture is visible alongside the
other primitives. Renumbers the following steps. Also drops the header's
"every primitive" claim, which the demo never actually met (the form
primitives — doubleClick/check/selectOption/upload — aren't shown here).
@vercel

vercel Bot commented Jun 2, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
humanjs Ready Ready Preview, Comment Jun 2, 2026 9:32pm

clear has no element of its own — it reuses #type-input — so it belongs
with type, not as a separate numbered step. This also fixes the on-page
card labels I'd left out of sync (they still numbered press=6..scroll=10
with no clear card). Now the cards and console logs both run 1..10 with
step 5 = "type & clear".
@totigm totigm merged commit d04f97e into main Jun 2, 2026
6 checks passed
@totigm totigm deleted the demo/primitives-clear branch June 2, 2026 21:33
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