interaction-patterns-architect
Architect-level interaction design in code — choosing established patterns over invented ones, feedback and latency behaviour, destructive-action safeguards, navigation and overlay conventions, and the state model behind every interactive surface. Use when a screen has to behave, not just look.
- License 许可
- MIT
- 最近更新
- 2026-11-13
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- interaction-patterns-architect
- license
- MIT
- metadata
- { "crusor-path": "website-architect/ui-ux-implementation-architect/interaction-patterns-architect", "crusor-domain": "website-architect", "crusor-origin": "original", "crusor-sources": "nngroup.com/articles (interaction patterns); w3.org/WAI/ARIA/apg; apple.com/design/human-interface-guidelines", "crusor-triggers": "interaction design, ux patterns, modal, toast, confirmation dialog, destructive action, loading state, empty state", "crusor-verified-on": "2026-10-30" }
- description
- Architect-level interaction design in code — choosing established patterns over invented ones, feedback and latency behaviour, destructive-action safeguards, navigation and overlay conventions, and the state model behind every interactive surface. Use when a screen has to behave, not just look.
- compatibility
- Framework-agnostic
03 SKILL.md 正文
Interaction Patterns Architect
Users do not learn your interface; they recognise patterns. Invent a pattern and you spend the user's attention on your invention instead of their task.
When to use
- Designing a flow with overlays, destructive actions, async feedback, or forms.
- Users hesitate, double-submit, or miss confirmations.
- Choosing between a modal, a page, an inline edit, or a drawer.
When NOT to use
- Visual style questions (see the branch's design skills).
Decision 1 — Pick the established pattern
| Need | Pattern |
|---|---|
| short focused task, context preserved | modal dialog |
| long/complex task | its own page/route |
| secondary info, no commitment | drawer/side panel |
| quick edit of one field | inline edit with save/cancel |
| irreversible action | explicit confirm with the object named |
| background success | inline confirmation, not a toast alone |
| failure needing action | inline error with the fix, not a toast |
- Toasts are for non-blocking, ignorable information; they disappear, so they cannot carry decisions.
- Nested modals are a design bug — escalate to a page or a wizard.
Decision 2 — Feedback and latency
| Latency | Response |
|---|---|
| < 100 ms | no indicator needed |
| 100–1000 ms | immediate pressed/loading state on the control |
| > 1 s | skeleton or progress with context |
| > 10 s | background it; tell the user they can leave |
- Show the optimistic result only when a revert path exists and is visible.
- Disable-on-submit plus a clear in-flight label; never silent double-submit.
- Skeletons match the final layout; spinners on blank areas teach nothing.
Decision 3 — Destructive actions
- Name the object: "Delete 'Q3 report'?" — never "Are you sure?".
- Prefer undo over confirmation for reversible actions (soft delete + snackbar).
- Confirmation dialogs for irreversible actions only; repeated confirmations train users to click through.
- Bulk destructive actions state the count and offer a dry-run or summary.
Decision 4 — Navigation and overlays
- Back/close always does the expected thing;
Esccloses overlays; focus returns to the trigger. - Deep links exist for anything a user might share or bookmark; state in the URL survives refresh.
- Unsaved-changes guard on navigation away from a dirty form.
- Scroll restoration and preserved filter state on back navigation.
Decision 5 — The state model behind the screen
Every interactive surface names its states explicitly:
idle → submitting → success | error(retryable | terminal)
idle → loading → empty | list | error
- If a state is not in the model, it will appear as a bug in production.
- Errors say what happened and what to do next; they never expose internals.
- The same action keeps the same vocabulary everywhere (Save vs Update vs Submit — pick one).
Failure modes at scale
- Toasts carrying errors that vanish before they are read.
- Confirmation dialogs on every action, so nobody reads them.
- Modal inside a modal inside a drawer.
- Optimistic updates with no visible failure path — data silently lost.
- Every screen inventing its own loading style.
Verification receipts
- State model written per interactive surface, all states designed.
- Latency budget: skeleton/spinner thresholds implemented, not improvised.
- Destructive-action audit: named object, undo or confirm, count for bulk.
- Keyboard pass:
Esc, focus return, deep link, refresh preservation. - Vocabulary audit across the product (one verb per action).
04 同仓库更多 Skills
design-system-ops-architect
Architect-level operation of a design system in code — token pipelines and versioning, component API and variant policy, the catalogue as the contract, adoption metrics, and the governance that stops a system from forking into three. Use when a component library must survive several teams.
design-handoff-architect
Architect-level design handoff — what must be specified before implementation starts, tokens over raw values, responsive and content-limit contracts, state matrices, and the review loop that catches drift between design and code. Use when a design is about to become code.
content-microcopy-architect
Architect-level UI content — where strings live, voice and terminology consistency, error and empty-state copy as part of the interface, translation-ready authoring, and the content model a product needs before it multiplies screens. Use when the words in the interface matter as much as the pixels.
ui-ux-implementation-architect
Architect-level direction for turning a design into working UI — the handoff contract, component ownership versus screen-level layout, interaction and state conventions, design QA gates, and the review habits that keep an implementation faithful without frozen pixels. Use before any specific UI implementation skill.
test-strategy-architect
Architect-level test strategy — allocating assertions across unit, integration, contract and end-to-end layers, designing for testability through dependency boundaries, fixture and data strategy, and the flake and coverage policies that keep a suite trustworthy. Use when defining how a codebase is tested.
release-strategy-architect
Architect-level release practice — small-batch delivery, feature flag and canary strategy, expand/contract database changes, rollback versus roll-forward decisions, and the versioning and communication that keep releases boring. Use when deciding how code reaches users.