docs(examples): add human.clear to the primitives demo#50
Merged
Conversation
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).
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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".
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a
clearstep to thepnpm demo:primitivesshowcase, right aftertype: it wipes#type-inputwith 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.@humanjs/playwright/testfixture — a test-writing helper, not atsxdemo 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/examplesin scope). No changeset —@humanjs/examplesis private/unpublished.