@wazir-dev/cli 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +111 -0
- package/CHANGELOG.md +14 -0
- package/CONTRIBUTING.md +101 -0
- package/LICENSE +21 -0
- package/README.md +314 -0
- package/assets/composition-engine.mmd +34 -0
- package/assets/demo-script.sh +17 -0
- package/assets/logo-dark.svg +14 -0
- package/assets/logo.svg +14 -0
- package/assets/pipeline.mmd +39 -0
- package/assets/record-demo.sh +51 -0
- package/docs/README.md +51 -0
- package/docs/adapters/context-mode.md +60 -0
- package/docs/concepts/architecture.md +87 -0
- package/docs/concepts/artifact-model.md +60 -0
- package/docs/concepts/composition-engine.md +36 -0
- package/docs/concepts/indexing-and-recall.md +160 -0
- package/docs/concepts/observability.md +41 -0
- package/docs/concepts/roles-and-workflows.md +59 -0
- package/docs/concepts/terminology-policy.md +27 -0
- package/docs/getting-started/01-installation.md +78 -0
- package/docs/getting-started/02-first-run.md +102 -0
- package/docs/getting-started/03-adding-to-project.md +15 -0
- package/docs/getting-started/04-host-setup.md +15 -0
- package/docs/guides/ci-integration.md +15 -0
- package/docs/guides/creating-skills.md +15 -0
- package/docs/guides/expertise-module-authoring.md +15 -0
- package/docs/guides/hook-development.md +15 -0
- package/docs/guides/memory-and-learnings.md +34 -0
- package/docs/guides/multi-host-export.md +15 -0
- package/docs/guides/troubleshooting.md +101 -0
- package/docs/guides/writing-custom-roles.md +15 -0
- package/docs/plans/2026-03-15-cli-pipeline-integration-design.md +592 -0
- package/docs/plans/2026-03-15-cli-pipeline-integration-plan.md +598 -0
- package/docs/plans/2026-03-15-docs-enforcement-plan.md +238 -0
- package/docs/readmes/INDEX.md +99 -0
- package/docs/readmes/features/expertise/README.md +171 -0
- package/docs/readmes/features/exports/README.md +222 -0
- package/docs/readmes/features/hooks/README.md +103 -0
- package/docs/readmes/features/hooks/loop-cap-guard.md +133 -0
- package/docs/readmes/features/hooks/post-tool-capture.md +121 -0
- package/docs/readmes/features/hooks/post-tool-lint.md +130 -0
- package/docs/readmes/features/hooks/pre-compact-summary.md +122 -0
- package/docs/readmes/features/hooks/pre-tool-capture-route.md +100 -0
- package/docs/readmes/features/hooks/protected-path-write-guard.md +128 -0
- package/docs/readmes/features/hooks/session-start.md +119 -0
- package/docs/readmes/features/hooks/stop-handoff-harvest.md +125 -0
- package/docs/readmes/features/roles/README.md +157 -0
- package/docs/readmes/features/roles/clarifier.md +152 -0
- package/docs/readmes/features/roles/content-author.md +190 -0
- package/docs/readmes/features/roles/designer.md +193 -0
- package/docs/readmes/features/roles/executor.md +184 -0
- package/docs/readmes/features/roles/learner.md +210 -0
- package/docs/readmes/features/roles/planner.md +182 -0
- package/docs/readmes/features/roles/researcher.md +164 -0
- package/docs/readmes/features/roles/reviewer.md +184 -0
- package/docs/readmes/features/roles/specifier.md +162 -0
- package/docs/readmes/features/roles/verifier.md +215 -0
- package/docs/readmes/features/schemas/README.md +178 -0
- package/docs/readmes/features/skills/README.md +63 -0
- package/docs/readmes/features/skills/brainstorming.md +96 -0
- package/docs/readmes/features/skills/debugging.md +148 -0
- package/docs/readmes/features/skills/design.md +120 -0
- package/docs/readmes/features/skills/prepare-next.md +109 -0
- package/docs/readmes/features/skills/run-audit.md +159 -0
- package/docs/readmes/features/skills/scan-project.md +109 -0
- package/docs/readmes/features/skills/self-audit.md +176 -0
- package/docs/readmes/features/skills/tdd.md +137 -0
- package/docs/readmes/features/skills/using-skills.md +92 -0
- package/docs/readmes/features/skills/verification.md +120 -0
- package/docs/readmes/features/skills/writing-plans.md +104 -0
- package/docs/readmes/features/tooling/README.md +320 -0
- package/docs/readmes/features/workflows/README.md +186 -0
- package/docs/readmes/features/workflows/author.md +181 -0
- package/docs/readmes/features/workflows/clarify.md +154 -0
- package/docs/readmes/features/workflows/design-review.md +171 -0
- package/docs/readmes/features/workflows/design.md +169 -0
- package/docs/readmes/features/workflows/discover.md +162 -0
- package/docs/readmes/features/workflows/execute.md +173 -0
- package/docs/readmes/features/workflows/learn.md +167 -0
- package/docs/readmes/features/workflows/plan-review.md +165 -0
- package/docs/readmes/features/workflows/plan.md +170 -0
- package/docs/readmes/features/workflows/prepare-next.md +167 -0
- package/docs/readmes/features/workflows/review.md +169 -0
- package/docs/readmes/features/workflows/run-audit.md +191 -0
- package/docs/readmes/features/workflows/spec-challenge.md +159 -0
- package/docs/readmes/features/workflows/specify.md +160 -0
- package/docs/readmes/features/workflows/verify.md +177 -0
- package/docs/readmes/packages/README.md +50 -0
- package/docs/readmes/packages/ajv.md +117 -0
- package/docs/readmes/packages/context-mode.md +118 -0
- package/docs/readmes/packages/gray-matter.md +116 -0
- package/docs/readmes/packages/node-test.md +137 -0
- package/docs/readmes/packages/yaml.md +112 -0
- package/docs/reference/configuration-reference.md +159 -0
- package/docs/reference/expertise-index.md +52 -0
- package/docs/reference/git-flow.md +43 -0
- package/docs/reference/hooks.md +87 -0
- package/docs/reference/host-exports.md +50 -0
- package/docs/reference/launch-checklist.md +172 -0
- package/docs/reference/marketplace-listings.md +76 -0
- package/docs/reference/release-process.md +34 -0
- package/docs/reference/roles-reference.md +77 -0
- package/docs/reference/skills.md +33 -0
- package/docs/reference/templates.md +29 -0
- package/docs/reference/tooling-cli.md +94 -0
- package/docs/truth-claims.yaml +222 -0
- package/expertise/PROGRESS.md +63 -0
- package/expertise/README.md +18 -0
- package/expertise/antipatterns/PROGRESS.md +56 -0
- package/expertise/antipatterns/backend/api-design-antipatterns.md +1271 -0
- package/expertise/antipatterns/backend/auth-antipatterns.md +1195 -0
- package/expertise/antipatterns/backend/caching-antipatterns.md +622 -0
- package/expertise/antipatterns/backend/database-antipatterns.md +1038 -0
- package/expertise/antipatterns/backend/index.md +24 -0
- package/expertise/antipatterns/backend/microservices-antipatterns.md +850 -0
- package/expertise/antipatterns/code/architecture-antipatterns.md +919 -0
- package/expertise/antipatterns/code/async-antipatterns.md +622 -0
- package/expertise/antipatterns/code/code-smells.md +1186 -0
- package/expertise/antipatterns/code/dependency-antipatterns.md +1209 -0
- package/expertise/antipatterns/code/error-handling-antipatterns.md +1360 -0
- package/expertise/antipatterns/code/index.md +27 -0
- package/expertise/antipatterns/code/naming-and-abstraction.md +1118 -0
- package/expertise/antipatterns/code/state-management-antipatterns.md +1076 -0
- package/expertise/antipatterns/code/testing-antipatterns.md +1053 -0
- package/expertise/antipatterns/design/accessibility-antipatterns.md +1136 -0
- package/expertise/antipatterns/design/dark-patterns.md +1121 -0
- package/expertise/antipatterns/design/index.md +22 -0
- package/expertise/antipatterns/design/ui-antipatterns.md +1202 -0
- package/expertise/antipatterns/design/ux-antipatterns.md +680 -0
- package/expertise/antipatterns/frontend/css-layout-antipatterns.md +691 -0
- package/expertise/antipatterns/frontend/flutter-antipatterns.md +1827 -0
- package/expertise/antipatterns/frontend/index.md +23 -0
- package/expertise/antipatterns/frontend/mobile-antipatterns.md +573 -0
- package/expertise/antipatterns/frontend/react-antipatterns.md +1128 -0
- package/expertise/antipatterns/frontend/spa-antipatterns.md +1235 -0
- package/expertise/antipatterns/index.md +31 -0
- package/expertise/antipatterns/performance/index.md +20 -0
- package/expertise/antipatterns/performance/performance-antipatterns.md +1013 -0
- package/expertise/antipatterns/performance/premature-optimization.md +623 -0
- package/expertise/antipatterns/performance/scaling-antipatterns.md +785 -0
- package/expertise/antipatterns/process/ai-coding-antipatterns.md +853 -0
- package/expertise/antipatterns/process/code-review-antipatterns.md +656 -0
- package/expertise/antipatterns/process/deployment-antipatterns.md +920 -0
- package/expertise/antipatterns/process/index.md +23 -0
- package/expertise/antipatterns/process/technical-debt-antipatterns.md +647 -0
- package/expertise/antipatterns/security/index.md +20 -0
- package/expertise/antipatterns/security/secrets-antipatterns.md +849 -0
- package/expertise/antipatterns/security/security-theater.md +843 -0
- package/expertise/antipatterns/security/vulnerability-patterns.md +801 -0
- package/expertise/architecture/PROGRESS.md +70 -0
- package/expertise/architecture/data/caching-architecture.md +671 -0
- package/expertise/architecture/data/data-consistency.md +574 -0
- package/expertise/architecture/data/data-modeling.md +536 -0
- package/expertise/architecture/data/event-streams-and-queues.md +634 -0
- package/expertise/architecture/data/index.md +25 -0
- package/expertise/architecture/data/search-architecture.md +663 -0
- package/expertise/architecture/data/sql-vs-nosql.md +708 -0
- package/expertise/architecture/decisions/architecture-decision-records.md +640 -0
- package/expertise/architecture/decisions/build-vs-buy.md +616 -0
- package/expertise/architecture/decisions/index.md +23 -0
- package/expertise/architecture/decisions/monolith-to-microservices.md +790 -0
- package/expertise/architecture/decisions/technology-selection.md +616 -0
- package/expertise/architecture/distributed/cap-theorem-and-tradeoffs.md +800 -0
- package/expertise/architecture/distributed/circuit-breaker-bulkhead.md +741 -0
- package/expertise/architecture/distributed/consensus-and-coordination.md +796 -0
- package/expertise/architecture/distributed/distributed-systems-fundamentals.md +564 -0
- package/expertise/architecture/distributed/idempotency-and-retry.md +796 -0
- package/expertise/architecture/distributed/index.md +25 -0
- package/expertise/architecture/distributed/saga-pattern.md +797 -0
- package/expertise/architecture/foundations/architectural-thinking.md +460 -0
- package/expertise/architecture/foundations/coupling-and-cohesion.md +770 -0
- package/expertise/architecture/foundations/design-principles-solid.md +649 -0
- package/expertise/architecture/foundations/domain-driven-design.md +719 -0
- package/expertise/architecture/foundations/index.md +25 -0
- package/expertise/architecture/foundations/separation-of-concerns.md +472 -0
- package/expertise/architecture/foundations/twelve-factor-app.md +797 -0
- package/expertise/architecture/index.md +34 -0
- package/expertise/architecture/integration/api-design-graphql.md +638 -0
- package/expertise/architecture/integration/api-design-grpc.md +804 -0
- package/expertise/architecture/integration/api-design-rest.md +892 -0
- package/expertise/architecture/integration/index.md +25 -0
- package/expertise/architecture/integration/third-party-integration.md +795 -0
- package/expertise/architecture/integration/webhooks-and-callbacks.md +1152 -0
- package/expertise/architecture/integration/websockets-realtime.md +791 -0
- package/expertise/architecture/mobile-architecture/index.md +22 -0
- package/expertise/architecture/mobile-architecture/mobile-app-architecture.md +780 -0
- package/expertise/architecture/mobile-architecture/mobile-backend-for-frontend.md +670 -0
- package/expertise/architecture/mobile-architecture/offline-first.md +719 -0
- package/expertise/architecture/mobile-architecture/push-and-sync.md +782 -0
- package/expertise/architecture/patterns/cqrs-event-sourcing.md +717 -0
- package/expertise/architecture/patterns/event-driven.md +797 -0
- package/expertise/architecture/patterns/hexagonal-clean-architecture.md +870 -0
- package/expertise/architecture/patterns/index.md +27 -0
- package/expertise/architecture/patterns/layered-architecture.md +736 -0
- package/expertise/architecture/patterns/microservices.md +753 -0
- package/expertise/architecture/patterns/modular-monolith.md +692 -0
- package/expertise/architecture/patterns/monolith.md +626 -0
- package/expertise/architecture/patterns/plugin-architecture.md +735 -0
- package/expertise/architecture/patterns/serverless.md +780 -0
- package/expertise/architecture/scaling/database-scaling.md +615 -0
- package/expertise/architecture/scaling/feature-flags-and-rollouts.md +757 -0
- package/expertise/architecture/scaling/horizontal-vs-vertical.md +606 -0
- package/expertise/architecture/scaling/index.md +24 -0
- package/expertise/architecture/scaling/multi-tenancy.md +800 -0
- package/expertise/architecture/scaling/stateless-design.md +787 -0
- package/expertise/backend/embedded-firmware.md +625 -0
- package/expertise/backend/go.md +853 -0
- package/expertise/backend/index.md +24 -0
- package/expertise/backend/java-spring.md +448 -0
- package/expertise/backend/node-typescript.md +625 -0
- package/expertise/backend/python-fastapi.md +724 -0
- package/expertise/backend/rust.md +458 -0
- package/expertise/backend/solidity.md +711 -0
- package/expertise/composition-map.yaml +443 -0
- package/expertise/content/foundations/content-modeling.md +395 -0
- package/expertise/content/foundations/editorial-standards.md +449 -0
- package/expertise/content/foundations/index.md +24 -0
- package/expertise/content/foundations/microcopy.md +455 -0
- package/expertise/content/foundations/terminology-governance.md +509 -0
- package/expertise/content/index.md +34 -0
- package/expertise/content/patterns/accessibility-copy.md +518 -0
- package/expertise/content/patterns/index.md +24 -0
- package/expertise/content/patterns/notification-content.md +433 -0
- package/expertise/content/patterns/sample-content.md +486 -0
- package/expertise/content/patterns/state-copy.md +439 -0
- package/expertise/design/PROGRESS.md +58 -0
- package/expertise/design/disciplines/dark-mode-theming.md +577 -0
- package/expertise/design/disciplines/design-systems.md +595 -0
- package/expertise/design/disciplines/index.md +25 -0
- package/expertise/design/disciplines/information-architecture.md +800 -0
- package/expertise/design/disciplines/interaction-design.md +788 -0
- package/expertise/design/disciplines/responsive-design.md +552 -0
- package/expertise/design/disciplines/usability-testing.md +516 -0
- package/expertise/design/disciplines/user-research.md +792 -0
- package/expertise/design/foundations/accessibility-design.md +796 -0
- package/expertise/design/foundations/color-theory.md +797 -0
- package/expertise/design/foundations/iconography.md +795 -0
- package/expertise/design/foundations/index.md +26 -0
- package/expertise/design/foundations/motion-and-animation.md +653 -0
- package/expertise/design/foundations/rtl-design.md +585 -0
- package/expertise/design/foundations/spacing-and-layout.md +607 -0
- package/expertise/design/foundations/typography.md +800 -0
- package/expertise/design/foundations/visual-hierarchy.md +761 -0
- package/expertise/design/index.md +32 -0
- package/expertise/design/patterns/authentication-flows.md +474 -0
- package/expertise/design/patterns/content-consumption.md +789 -0
- package/expertise/design/patterns/data-display.md +618 -0
- package/expertise/design/patterns/e-commerce.md +1494 -0
- package/expertise/design/patterns/feedback-and-states.md +642 -0
- package/expertise/design/patterns/forms-and-input.md +819 -0
- package/expertise/design/patterns/gamification.md +801 -0
- package/expertise/design/patterns/index.md +31 -0
- package/expertise/design/patterns/microinteractions.md +449 -0
- package/expertise/design/patterns/navigation.md +800 -0
- package/expertise/design/patterns/notifications.md +705 -0
- package/expertise/design/patterns/onboarding.md +700 -0
- package/expertise/design/patterns/search-and-filter.md +601 -0
- package/expertise/design/patterns/settings-and-preferences.md +768 -0
- package/expertise/design/patterns/social-and-community.md +748 -0
- package/expertise/design/platforms/desktop-native.md +612 -0
- package/expertise/design/platforms/index.md +25 -0
- package/expertise/design/platforms/mobile-android.md +825 -0
- package/expertise/design/platforms/mobile-cross-platform.md +983 -0
- package/expertise/design/platforms/mobile-ios.md +699 -0
- package/expertise/design/platforms/tablet.md +794 -0
- package/expertise/design/platforms/web-dashboard.md +790 -0
- package/expertise/design/platforms/web-responsive.md +550 -0
- package/expertise/design/psychology/behavioral-nudges.md +449 -0
- package/expertise/design/psychology/cognitive-load.md +1191 -0
- package/expertise/design/psychology/error-psychology.md +778 -0
- package/expertise/design/psychology/index.md +22 -0
- package/expertise/design/psychology/persuasive-design.md +736 -0
- package/expertise/design/psychology/user-mental-models.md +623 -0
- package/expertise/design/tooling/open-pencil.md +266 -0
- package/expertise/frontend/angular.md +1073 -0
- package/expertise/frontend/desktop-electron.md +546 -0
- package/expertise/frontend/flutter.md +782 -0
- package/expertise/frontend/index.md +27 -0
- package/expertise/frontend/native-android.md +409 -0
- package/expertise/frontend/native-ios.md +490 -0
- package/expertise/frontend/react-native.md +1160 -0
- package/expertise/frontend/react.md +808 -0
- package/expertise/frontend/vue.md +1089 -0
- package/expertise/humanize/domain-rules-code.md +79 -0
- package/expertise/humanize/domain-rules-content.md +67 -0
- package/expertise/humanize/domain-rules-technical-docs.md +56 -0
- package/expertise/humanize/index.md +35 -0
- package/expertise/humanize/self-audit-checklist.md +87 -0
- package/expertise/humanize/sentence-patterns.md +218 -0
- package/expertise/humanize/vocabulary-blacklist.md +105 -0
- package/expertise/i18n/PROGRESS.md +65 -0
- package/expertise/i18n/advanced/accessibility-and-i18n.md +28 -0
- package/expertise/i18n/advanced/bidirectional-text-algorithm.md +38 -0
- package/expertise/i18n/advanced/complex-scripts.md +30 -0
- package/expertise/i18n/advanced/performance-and-i18n.md +27 -0
- package/expertise/i18n/advanced/testing-i18n.md +28 -0
- package/expertise/i18n/content/content-adaptation.md +23 -0
- package/expertise/i18n/content/locale-specific-formatting.md +23 -0
- package/expertise/i18n/content/machine-translation-integration.md +28 -0
- package/expertise/i18n/content/translation-management.md +29 -0
- package/expertise/i18n/foundations/date-time-calendars.md +67 -0
- package/expertise/i18n/foundations/i18n-architecture.md +272 -0
- package/expertise/i18n/foundations/locale-and-language-tags.md +79 -0
- package/expertise/i18n/foundations/numbers-currency-units.md +61 -0
- package/expertise/i18n/foundations/pluralization-and-gender.md +109 -0
- package/expertise/i18n/foundations/string-externalization.md +236 -0
- package/expertise/i18n/foundations/text-direction-bidi.md +241 -0
- package/expertise/i18n/foundations/unicode-and-encoding.md +86 -0
- package/expertise/i18n/index.md +38 -0
- package/expertise/i18n/platform/backend-i18n.md +31 -0
- package/expertise/i18n/platform/flutter-i18n.md +148 -0
- package/expertise/i18n/platform/native-android-i18n.md +36 -0
- package/expertise/i18n/platform/native-ios-i18n.md +36 -0
- package/expertise/i18n/platform/react-i18n.md +103 -0
- package/expertise/i18n/platform/web-css-i18n.md +81 -0
- package/expertise/i18n/rtl/arabic-specific.md +175 -0
- package/expertise/i18n/rtl/hebrew-specific.md +149 -0
- package/expertise/i18n/rtl/rtl-animations-and-transitions.md +111 -0
- package/expertise/i18n/rtl/rtl-forms-and-input.md +161 -0
- package/expertise/i18n/rtl/rtl-fundamentals.md +211 -0
- package/expertise/i18n/rtl/rtl-icons-and-images.md +181 -0
- package/expertise/i18n/rtl/rtl-layout-mirroring.md +252 -0
- package/expertise/i18n/rtl/rtl-navigation-and-gestures.md +107 -0
- package/expertise/i18n/rtl/rtl-testing-and-qa.md +147 -0
- package/expertise/i18n/rtl/rtl-typography.md +160 -0
- package/expertise/index.md +113 -0
- package/expertise/index.yaml +216 -0
- package/expertise/infrastructure/cloud-aws.md +597 -0
- package/expertise/infrastructure/cloud-gcp.md +599 -0
- package/expertise/infrastructure/cybersecurity.md +816 -0
- package/expertise/infrastructure/database-mongodb.md +447 -0
- package/expertise/infrastructure/database-postgres.md +400 -0
- package/expertise/infrastructure/devops-cicd.md +787 -0
- package/expertise/infrastructure/index.md +27 -0
- package/expertise/performance/PROGRESS.md +50 -0
- package/expertise/performance/backend/api-latency.md +1204 -0
- package/expertise/performance/backend/background-jobs.md +506 -0
- package/expertise/performance/backend/connection-pooling.md +1209 -0
- package/expertise/performance/backend/database-query-optimization.md +515 -0
- package/expertise/performance/backend/index.md +23 -0
- package/expertise/performance/backend/rate-limiting-and-throttling.md +971 -0
- package/expertise/performance/foundations/algorithmic-complexity.md +954 -0
- package/expertise/performance/foundations/caching-strategies.md +489 -0
- package/expertise/performance/foundations/concurrency-and-parallelism.md +847 -0
- package/expertise/performance/foundations/index.md +24 -0
- package/expertise/performance/foundations/measuring-and-profiling.md +440 -0
- package/expertise/performance/foundations/memory-management.md +964 -0
- package/expertise/performance/foundations/performance-budgets.md +1314 -0
- package/expertise/performance/index.md +31 -0
- package/expertise/performance/infrastructure/auto-scaling.md +1059 -0
- package/expertise/performance/infrastructure/cdn-and-edge.md +1081 -0
- package/expertise/performance/infrastructure/index.md +22 -0
- package/expertise/performance/infrastructure/load-balancing.md +1081 -0
- package/expertise/performance/infrastructure/observability.md +1079 -0
- package/expertise/performance/mobile/index.md +23 -0
- package/expertise/performance/mobile/mobile-animations.md +544 -0
- package/expertise/performance/mobile/mobile-memory-battery.md +416 -0
- package/expertise/performance/mobile/mobile-network.md +452 -0
- package/expertise/performance/mobile/mobile-rendering.md +599 -0
- package/expertise/performance/mobile/mobile-startup-time.md +505 -0
- package/expertise/performance/platform-specific/flutter-performance.md +647 -0
- package/expertise/performance/platform-specific/index.md +22 -0
- package/expertise/performance/platform-specific/node-performance.md +1307 -0
- package/expertise/performance/platform-specific/postgres-performance.md +1366 -0
- package/expertise/performance/platform-specific/react-performance.md +1403 -0
- package/expertise/performance/web/bundle-optimization.md +1239 -0
- package/expertise/performance/web/image-and-media.md +636 -0
- package/expertise/performance/web/index.md +24 -0
- package/expertise/performance/web/network-optimization.md +1133 -0
- package/expertise/performance/web/rendering-performance.md +1098 -0
- package/expertise/performance/web/ssr-and-hydration.md +918 -0
- package/expertise/performance/web/web-vitals.md +1374 -0
- package/expertise/quality/accessibility.md +985 -0
- package/expertise/quality/evidence-based-verification.md +499 -0
- package/expertise/quality/index.md +24 -0
- package/expertise/quality/ml-model-audit.md +614 -0
- package/expertise/quality/performance.md +600 -0
- package/expertise/quality/testing-api.md +891 -0
- package/expertise/quality/testing-mobile.md +496 -0
- package/expertise/quality/testing-web.md +849 -0
- package/expertise/security/PROGRESS.md +54 -0
- package/expertise/security/agentic-identity.md +540 -0
- package/expertise/security/compliance-frameworks.md +601 -0
- package/expertise/security/data/data-encryption.md +364 -0
- package/expertise/security/data/data-privacy-gdpr.md +692 -0
- package/expertise/security/data/database-security.md +1171 -0
- package/expertise/security/data/index.md +22 -0
- package/expertise/security/data/pii-handling.md +531 -0
- package/expertise/security/foundations/authentication.md +1041 -0
- package/expertise/security/foundations/authorization.md +603 -0
- package/expertise/security/foundations/cryptography.md +1001 -0
- package/expertise/security/foundations/index.md +25 -0
- package/expertise/security/foundations/owasp-top-10.md +1354 -0
- package/expertise/security/foundations/secrets-management.md +1217 -0
- package/expertise/security/foundations/secure-sdlc.md +700 -0
- package/expertise/security/foundations/supply-chain-security.md +698 -0
- package/expertise/security/index.md +31 -0
- package/expertise/security/infrastructure/cloud-security-aws.md +1296 -0
- package/expertise/security/infrastructure/cloud-security-gcp.md +1376 -0
- package/expertise/security/infrastructure/container-security.md +721 -0
- package/expertise/security/infrastructure/incident-response.md +1295 -0
- package/expertise/security/infrastructure/index.md +24 -0
- package/expertise/security/infrastructure/logging-and-monitoring.md +1618 -0
- package/expertise/security/infrastructure/network-security.md +1337 -0
- package/expertise/security/mobile/index.md +23 -0
- package/expertise/security/mobile/mobile-android-security.md +1218 -0
- package/expertise/security/mobile/mobile-binary-protection.md +1229 -0
- package/expertise/security/mobile/mobile-data-storage.md +1265 -0
- package/expertise/security/mobile/mobile-ios-security.md +1401 -0
- package/expertise/security/mobile/mobile-network-security.md +1520 -0
- package/expertise/security/smart-contract-security.md +594 -0
- package/expertise/security/testing/index.md +22 -0
- package/expertise/security/testing/penetration-testing.md +1258 -0
- package/expertise/security/testing/security-code-review.md +1765 -0
- package/expertise/security/testing/threat-modeling.md +1074 -0
- package/expertise/security/testing/vulnerability-scanning.md +1062 -0
- package/expertise/security/web/api-security.md +586 -0
- package/expertise/security/web/cors-and-headers.md +433 -0
- package/expertise/security/web/csrf.md +562 -0
- package/expertise/security/web/file-upload.md +1477 -0
- package/expertise/security/web/index.md +25 -0
- package/expertise/security/web/injection.md +1375 -0
- package/expertise/security/web/session-management.md +1101 -0
- package/expertise/security/web/xss.md +1158 -0
- package/exports/README.md +17 -0
- package/exports/hosts/claude/.claude/agents/clarifier.md +42 -0
- package/exports/hosts/claude/.claude/agents/content-author.md +63 -0
- package/exports/hosts/claude/.claude/agents/designer.md +55 -0
- package/exports/hosts/claude/.claude/agents/executor.md +55 -0
- package/exports/hosts/claude/.claude/agents/learner.md +51 -0
- package/exports/hosts/claude/.claude/agents/planner.md +53 -0
- package/exports/hosts/claude/.claude/agents/researcher.md +43 -0
- package/exports/hosts/claude/.claude/agents/reviewer.md +54 -0
- package/exports/hosts/claude/.claude/agents/specifier.md +47 -0
- package/exports/hosts/claude/.claude/agents/verifier.md +71 -0
- package/exports/hosts/claude/.claude/commands/author.md +42 -0
- package/exports/hosts/claude/.claude/commands/clarify.md +38 -0
- package/exports/hosts/claude/.claude/commands/design-review.md +46 -0
- package/exports/hosts/claude/.claude/commands/design.md +44 -0
- package/exports/hosts/claude/.claude/commands/discover.md +37 -0
- package/exports/hosts/claude/.claude/commands/execute.md +48 -0
- package/exports/hosts/claude/.claude/commands/learn.md +38 -0
- package/exports/hosts/claude/.claude/commands/plan-review.md +42 -0
- package/exports/hosts/claude/.claude/commands/plan.md +39 -0
- package/exports/hosts/claude/.claude/commands/prepare-next.md +37 -0
- package/exports/hosts/claude/.claude/commands/review.md +40 -0
- package/exports/hosts/claude/.claude/commands/run-audit.md +41 -0
- package/exports/hosts/claude/.claude/commands/spec-challenge.md +41 -0
- package/exports/hosts/claude/.claude/commands/specify.md +38 -0
- package/exports/hosts/claude/.claude/commands/verify.md +37 -0
- package/exports/hosts/claude/.claude/settings.json +34 -0
- package/exports/hosts/claude/CLAUDE.md +19 -0
- package/exports/hosts/claude/export.manifest.json +38 -0
- package/exports/hosts/claude/host-package.json +67 -0
- package/exports/hosts/codex/AGENTS.md +19 -0
- package/exports/hosts/codex/export.manifest.json +38 -0
- package/exports/hosts/codex/host-package.json +41 -0
- package/exports/hosts/cursor/.cursor/hooks.json +16 -0
- package/exports/hosts/cursor/.cursor/rules/wazir-core.mdc +19 -0
- package/exports/hosts/cursor/export.manifest.json +38 -0
- package/exports/hosts/cursor/host-package.json +42 -0
- package/exports/hosts/gemini/GEMINI.md +19 -0
- package/exports/hosts/gemini/export.manifest.json +38 -0
- package/exports/hosts/gemini/host-package.json +41 -0
- package/hooks/README.md +18 -0
- package/hooks/definitions/loop_cap_guard.yaml +21 -0
- package/hooks/definitions/post_tool_capture.yaml +24 -0
- package/hooks/definitions/pre_compact_summary.yaml +19 -0
- package/hooks/definitions/pre_tool_capture_route.yaml +19 -0
- package/hooks/definitions/protected_path_write_guard.yaml +19 -0
- package/hooks/definitions/session_start.yaml +19 -0
- package/hooks/definitions/stop_handoff_harvest.yaml +20 -0
- package/hooks/loop-cap-guard +17 -0
- package/hooks/post-tool-lint +36 -0
- package/hooks/protected-path-write-guard +17 -0
- package/hooks/session-start +41 -0
- package/llms-full.txt +2355 -0
- package/llms.txt +43 -0
- package/package.json +79 -0
- package/roles/README.md +20 -0
- package/roles/clarifier.md +42 -0
- package/roles/content-author.md +63 -0
- package/roles/designer.md +55 -0
- package/roles/executor.md +55 -0
- package/roles/learner.md +51 -0
- package/roles/planner.md +53 -0
- package/roles/researcher.md +43 -0
- package/roles/reviewer.md +54 -0
- package/roles/specifier.md +47 -0
- package/roles/verifier.md +71 -0
- package/schemas/README.md +24 -0
- package/schemas/accepted-learning.schema.json +20 -0
- package/schemas/author-artifact.schema.json +156 -0
- package/schemas/clarification.schema.json +19 -0
- package/schemas/design-artifact.schema.json +80 -0
- package/schemas/docs-claim.schema.json +18 -0
- package/schemas/export-manifest.schema.json +20 -0
- package/schemas/hook.schema.json +67 -0
- package/schemas/host-export-package.schema.json +18 -0
- package/schemas/implementation-plan.schema.json +19 -0
- package/schemas/proposed-learning.schema.json +19 -0
- package/schemas/research.schema.json +18 -0
- package/schemas/review.schema.json +29 -0
- package/schemas/run-manifest.schema.json +18 -0
- package/schemas/spec-challenge.schema.json +18 -0
- package/schemas/spec.schema.json +20 -0
- package/schemas/usage.schema.json +102 -0
- package/schemas/verification-proof.schema.json +29 -0
- package/schemas/wazir-manifest.schema.json +173 -0
- package/skills/README.md +40 -0
- package/skills/brainstorming/SKILL.md +77 -0
- package/skills/debugging/SKILL.md +50 -0
- package/skills/design/SKILL.md +61 -0
- package/skills/dispatching-parallel-agents/SKILL.md +128 -0
- package/skills/executing-plans/SKILL.md +70 -0
- package/skills/finishing-a-development-branch/SKILL.md +169 -0
- package/skills/humanize/SKILL.md +123 -0
- package/skills/init-pipeline/SKILL.md +124 -0
- package/skills/prepare-next/SKILL.md +20 -0
- package/skills/receiving-code-review/SKILL.md +123 -0
- package/skills/requesting-code-review/SKILL.md +105 -0
- package/skills/requesting-code-review/code-reviewer.md +108 -0
- package/skills/run-audit/SKILL.md +197 -0
- package/skills/scan-project/SKILL.md +41 -0
- package/skills/self-audit/SKILL.md +153 -0
- package/skills/subagent-driven-development/SKILL.md +154 -0
- package/skills/subagent-driven-development/code-quality-reviewer-prompt.md +26 -0
- package/skills/subagent-driven-development/implementer-prompt.md +102 -0
- package/skills/subagent-driven-development/spec-reviewer-prompt.md +61 -0
- package/skills/tdd/SKILL.md +23 -0
- package/skills/using-git-worktrees/SKILL.md +163 -0
- package/skills/using-skills/SKILL.md +95 -0
- package/skills/verification/SKILL.md +22 -0
- package/skills/wazir/SKILL.md +463 -0
- package/skills/writing-plans/SKILL.md +30 -0
- package/skills/writing-skills/SKILL.md +157 -0
- package/skills/writing-skills/anthropic-best-practices.md +122 -0
- package/skills/writing-skills/persuasion-principles.md +50 -0
- package/templates/README.md +20 -0
- package/templates/artifacts/README.md +10 -0
- package/templates/artifacts/accepted-learning.md +19 -0
- package/templates/artifacts/accepted-learning.template.json +12 -0
- package/templates/artifacts/author.md +74 -0
- package/templates/artifacts/author.template.json +19 -0
- package/templates/artifacts/clarification.md +21 -0
- package/templates/artifacts/clarification.template.json +12 -0
- package/templates/artifacts/execute-notes.md +19 -0
- package/templates/artifacts/implementation-plan.md +21 -0
- package/templates/artifacts/implementation-plan.template.json +11 -0
- package/templates/artifacts/learning-proposal.md +19 -0
- package/templates/artifacts/next-run-handoff.md +21 -0
- package/templates/artifacts/plan-review.md +19 -0
- package/templates/artifacts/proposed-learning.template.json +12 -0
- package/templates/artifacts/research.md +21 -0
- package/templates/artifacts/research.template.json +12 -0
- package/templates/artifacts/review-findings.md +19 -0
- package/templates/artifacts/review.template.json +11 -0
- package/templates/artifacts/run-manifest.template.json +8 -0
- package/templates/artifacts/spec-challenge.md +19 -0
- package/templates/artifacts/spec-challenge.template.json +11 -0
- package/templates/artifacts/spec.md +21 -0
- package/templates/artifacts/spec.template.json +12 -0
- package/templates/artifacts/verification-proof.md +19 -0
- package/templates/artifacts/verification-proof.template.json +11 -0
- package/templates/examples/accepted-learning.example.json +14 -0
- package/templates/examples/author.example.json +152 -0
- package/templates/examples/clarification.example.json +15 -0
- package/templates/examples/docs-claim.example.json +8 -0
- package/templates/examples/export-manifest.example.json +7 -0
- package/templates/examples/host-export-package.example.json +11 -0
- package/templates/examples/implementation-plan.example.json +17 -0
- package/templates/examples/proposed-learning.example.json +13 -0
- package/templates/examples/research.example.json +15 -0
- package/templates/examples/research.example.md +6 -0
- package/templates/examples/review.example.json +17 -0
- package/templates/examples/run-manifest.example.json +9 -0
- package/templates/examples/spec-challenge.example.json +14 -0
- package/templates/examples/spec.example.json +21 -0
- package/templates/examples/verification-proof.example.json +21 -0
- package/templates/examples/wazir-manifest.example.yaml +65 -0
- package/templates/task-definition-schema.md +99 -0
- package/tooling/README.md +20 -0
- package/tooling/src/adapters/context-mode.js +50 -0
- package/tooling/src/capture/command.js +376 -0
- package/tooling/src/capture/store.js +99 -0
- package/tooling/src/capture/usage.js +270 -0
- package/tooling/src/checks/branches.js +50 -0
- package/tooling/src/checks/brand-truth.js +110 -0
- package/tooling/src/checks/changelog.js +231 -0
- package/tooling/src/checks/command-registry.js +36 -0
- package/tooling/src/checks/commits.js +102 -0
- package/tooling/src/checks/docs-drift.js +103 -0
- package/tooling/src/checks/docs-truth.js +201 -0
- package/tooling/src/checks/runtime-surface.js +156 -0
- package/tooling/src/cli.js +116 -0
- package/tooling/src/command-options.js +56 -0
- package/tooling/src/commands/validate.js +320 -0
- package/tooling/src/doctor/command.js +91 -0
- package/tooling/src/export/command.js +77 -0
- package/tooling/src/export/compiler.js +498 -0
- package/tooling/src/guards/loop-cap-guard.js +52 -0
- package/tooling/src/guards/protected-path-write-guard.js +67 -0
- package/tooling/src/index/command.js +152 -0
- package/tooling/src/index/storage.js +1061 -0
- package/tooling/src/index/summarizers.js +261 -0
- package/tooling/src/loaders.js +18 -0
- package/tooling/src/project-root.js +22 -0
- package/tooling/src/recall/command.js +225 -0
- package/tooling/src/schema-validator.js +30 -0
- package/tooling/src/state-root.js +40 -0
- package/tooling/src/status/command.js +71 -0
- package/wazir.manifest.yaml +135 -0
- package/workflows/README.md +19 -0
- package/workflows/author.md +42 -0
- package/workflows/clarify.md +38 -0
- package/workflows/design-review.md +46 -0
- package/workflows/design.md +44 -0
- package/workflows/discover.md +37 -0
- package/workflows/execute.md +48 -0
- package/workflows/learn.md +38 -0
- package/workflows/plan-review.md +42 -0
- package/workflows/plan.md +39 -0
- package/workflows/prepare-next.md +37 -0
- package/workflows/review.md +40 -0
- package/workflows/run-audit.md +41 -0
- package/workflows/spec-challenge.md +41 -0
- package/workflows/specify.md +38 -0
- package/workflows/verify.md +37 -0
|
@@ -0,0 +1,642 @@
|
|
|
1
|
+
# Feedback and States Patterns
|
|
2
|
+
|
|
3
|
+
> **Module Type:** Pattern
|
|
4
|
+
> **Domain:** UI/UX Design -- System Feedback & State Communication
|
|
5
|
+
> **Authoritative Sources:** Material Design 3, Apple HIG, Nielsen Norman Group, WCAG 2.2, Carbon Design System
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Quick Reference Checklist
|
|
10
|
+
|
|
11
|
+
1. Every user action produces visible feedback within 100ms
|
|
12
|
+
2. Loading states appear after 300ms delay (avoid flash for fast loads)
|
|
13
|
+
3. Skeleton screens used for content-heavy pages loading under 10s
|
|
14
|
+
4. Progress bars used for operations exceeding 10s
|
|
15
|
+
5. Spinners reserved for 2-10s indeterminate waits only
|
|
16
|
+
6. Every empty state has a clear headline, explanation, and CTA
|
|
17
|
+
7. Toast/snackbar duration is 3-5s for text under 20 words
|
|
18
|
+
8. Toasts with actions use indefinite or extended duration
|
|
19
|
+
9. Error messages include what went wrong AND how to fix it
|
|
20
|
+
10. Inline validation triggers on blur (not on focus or first keystroke)
|
|
21
|
+
11. Only one snackbar displayed at a time; queue subsequent ones
|
|
22
|
+
12. ARIA live regions present before dynamic content injection
|
|
23
|
+
13. role="alert" for urgent errors; role="status" for non-urgent feedback
|
|
24
|
+
14. Focus moves to first error field on form submission failure
|
|
25
|
+
15. Optimistic updates include rollback logic for server failures
|
|
26
|
+
16. Offline state shows cached data age and available actions
|
|
27
|
+
17. Animations respect prefers-reduced-motion media query
|
|
28
|
+
18. Banner notifications persist until user dismisses or issue resolves
|
|
29
|
+
19. No feedback mechanism blocks the user unless truly critical
|
|
30
|
+
20. Every loading state has a timeout fallback with retry action
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## 1. Pattern Anatomy
|
|
35
|
+
|
|
36
|
+
Feedback and states patterns are how an interface communicates system status, action
|
|
37
|
+
outcomes, and available next steps. They are the conversational layer of a UI -- "I
|
|
38
|
+
heard you," "I'm working on it," "here's what happened," "here's what you can do next."
|
|
39
|
+
|
|
40
|
+
### 1.1 Loading States
|
|
41
|
+
|
|
42
|
+
#### Skeleton Screens
|
|
43
|
+
|
|
44
|
+
Low-fidelity wireframe placeholders (gray rectangles for text, circles for avatars)
|
|
45
|
+
shown before content loads. Best for predictable layouts loading under 10 seconds.
|
|
46
|
+
|
|
47
|
+
**Specifications:**
|
|
48
|
+
- Placeholder color: #E0E0E0 (light), #2A2A2A (dark)
|
|
49
|
+
- Shimmer: left-to-right gradient sweep, 1.5-2s cycle, linear easing
|
|
50
|
+
- Use CSS `transform` (not `background-position`) for GPU-accelerated shimmer
|
|
51
|
+
- Match skeleton shapes to actual content dimensions to prevent layout shift (CLS)
|
|
52
|
+
- Skip skeleton if content loads under 300ms
|
|
53
|
+
- NNG: Skeleton screens reduce perceived load time by letting users build a mental
|
|
54
|
+
model of the page structure before content arrives
|
|
55
|
+
|
|
56
|
+
#### Spinners (Activity Indicators)
|
|
57
|
+
|
|
58
|
+
Rotating circular animation for indeterminate progress. Use for 2-10s waits where
|
|
59
|
+
content structure is unpredictable or the loading area is too small for a skeleton.
|
|
60
|
+
|
|
61
|
+
- Size: 16-24px inline, 32-48px standalone
|
|
62
|
+
- Rotation: 0.8-1.2s per cycle, linear easing
|
|
63
|
+
- Always pair with descriptive text for accessibility ("Loading payments...")
|
|
64
|
+
- M3 Expressive: new looping shape-morph indicator (7 shapes) for waits under 5s
|
|
65
|
+
|
|
66
|
+
#### Progress Bars (Determinate)
|
|
67
|
+
|
|
68
|
+
Horizontal fill bar showing percentage completion. Use for operations over 10 seconds
|
|
69
|
+
where progress is measurable (uploads, exports, installations).
|
|
70
|
+
|
|
71
|
+
- Height: 4-8px; M3 Expressive supports thicker wavy variants with rounded ends
|
|
72
|
+
- Include percentage text for operations over 30 seconds
|
|
73
|
+
- Never let the bar appear stuck; use eased interpolation between updates
|
|
74
|
+
- NNG: Waits with visible feedback feel 11-15% faster than identical waits without
|
|
75
|
+
|
|
76
|
+
#### Shimmer / Pulse Effects
|
|
77
|
+
|
|
78
|
+
- **Shimmer:** Diagonal/horizontal light gradient sweep, 1.5-2.5s, linear, infinite
|
|
79
|
+
- **Pulse:** Opacity oscillation (0.4 to 1.0), 1.5-2s, ease-in-out
|
|
80
|
+
- Performance: use `transform: translateX()` with `will-change: transform`
|
|
81
|
+
|
|
82
|
+
### 1.2 Empty States
|
|
83
|
+
|
|
84
|
+
| Type | Components | Key Principle |
|
|
85
|
+
|------|-----------|---------------|
|
|
86
|
+
| **First-use** | Illustration + headline + value description + primary CTA | Invoke action; this is an onboarding moment |
|
|
87
|
+
| **No-results** | Echo query + suggestions + related content fallback | Never leave truly empty; present alternatives |
|
|
88
|
+
| **Error** | Error icon + plain-language explanation + recovery CTA | Include what happened and how to fix it |
|
|
89
|
+
| **Cleared** | Celebratory illustration + positive message | "All caught up!" -- optionally offer next action |
|
|
90
|
+
|
|
91
|
+
### 1.3 Success / Error / Warning / Info Feedback
|
|
92
|
+
|
|
93
|
+
| Level | Color | Icon | Urgency | Typical Use |
|
|
94
|
+
|---------|--------|------------------|---------|--------------------------------|
|
|
95
|
+
| Success | Green | Checkmark circle | Low | Action completed successfully |
|
|
96
|
+
| Error | Red | X circle / alert | High | Action failed, needs attention |
|
|
97
|
+
| Warning | Yellow | Triangle alert | Medium | Potential issue, proceed carefully |
|
|
98
|
+
| Info | Blue | Info circle | Low | Neutral system information |
|
|
99
|
+
|
|
100
|
+
Apple HIG: "Feedback helps people know what's happening, discover what they can do
|
|
101
|
+
next, understand the results of actions, and avoid mistakes."
|
|
102
|
+
|
|
103
|
+
### 1.4 Toast / Snackbar
|
|
104
|
+
|
|
105
|
+
Lightweight, temporary notifications at the edge of the screen that auto-dismiss.
|
|
106
|
+
|
|
107
|
+
**M3 Snackbar specs:** Bottom-positioned. SHORT (2s), LONG (3.5s), INDEFINITE. Max one
|
|
108
|
+
visible; queue subsequent. May contain one text action (never "Cancel"/"Dismiss").
|
|
109
|
+
|
|
110
|
+
**Duration guidelines:**
|
|
111
|
+
- Under 20 words: 3s | 20-35 words: 5s | Over 35 words: do not auto-dismiss
|
|
112
|
+
- Toasts with actions: 8-10s or indefinite
|
|
113
|
+
- Formula: 1 character per 100ms + 1000ms buffer
|
|
114
|
+
- Entry: slide up + fade in, 200-300ms, decelerate easing
|
|
115
|
+
- Exit: slide down + fade out, 150-200ms, accelerate easing
|
|
116
|
+
|
|
117
|
+
### 1.5 Inline Messages
|
|
118
|
+
|
|
119
|
+
Contextual feedback adjacent to the trigger element. Positioned below or beside the
|
|
120
|
+
relevant field -- never above it and never far from the trigger.
|
|
121
|
+
|
|
122
|
+
**Inline validation timing (Smashing Magazine / Baymard):**
|
|
123
|
+
- Validate on blur (when user leaves field), not on focus or first keystroke
|
|
124
|
+
- For complex inputs (passwords): validate on each keystroke after first blur
|
|
125
|
+
- Remove error message the instant input becomes valid
|
|
126
|
+
- Never validate empty fields until form submission
|
|
127
|
+
|
|
128
|
+
### 1.6 Banners
|
|
129
|
+
|
|
130
|
+
Persistent, full-width bars at the top of the page for system-wide announcements,
|
|
131
|
+
persistent warnings, or non-blocking important messages.
|
|
132
|
+
|
|
133
|
+
- Full width, 40-56px height, semantic background color
|
|
134
|
+
- Include dismiss action unless the condition must be resolved
|
|
135
|
+
- Stay visible across navigation until dismissed or resolved
|
|
136
|
+
- Do not stack more than 2 banners; prioritize by severity
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## 2. Best-in-Class Examples
|
|
141
|
+
|
|
142
|
+
### 2.1 Stripe
|
|
143
|
+
|
|
144
|
+
**Loading:** Delays UI display at launch, preferring to show a complete screen. Falls
|
|
145
|
+
back to UI frame with localized spinners if network is slow. Dashboard uses pulse-
|
|
146
|
+
animated skeleton screens for section-level loading.
|
|
147
|
+
|
|
148
|
+
**Empty states:** Minimal and action-oriented -- line illustration, one-sentence
|
|
149
|
+
explanation, primary CTA button. Stripe Apps design system provides explicit loading
|
|
150
|
+
components.
|
|
151
|
+
|
|
152
|
+
**Errors:** Inline form errors are precise and actionable ("Your card was declined.
|
|
153
|
+
Try a different payment method."). API errors map to human-readable dashboard messages.
|
|
154
|
+
|
|
155
|
+
### 2.2 Linear
|
|
156
|
+
|
|
157
|
+
**Optimistic updates:** Gold standard. Issue status, assignments, priorities, and labels
|
|
158
|
+
update instantly before server confirmation. On server rejection, the UI quietly reverts
|
|
159
|
+
with a subtle error toast. Keyboard shortcuts produce immediate visual feedback -- brief
|
|
160
|
+
highlight flash on affected items.
|
|
161
|
+
|
|
162
|
+
**Loading:** Skeleton screens precisely match list/board layout. View transitions use
|
|
163
|
+
smooth crossfades rather than full-page loading states.
|
|
164
|
+
|
|
165
|
+
### 2.3 Slack
|
|
166
|
+
|
|
167
|
+
**Empty states:** First-use experience uses conversational empty states ("This is the
|
|
168
|
+
very beginning of the #general channel"). Search no-results echoes the query and
|
|
169
|
+
suggests alternatives.
|
|
170
|
+
|
|
171
|
+
**Connectivity:** Reconnection after network loss shows inline banner ("Connecting...")
|
|
172
|
+
transitioning to success ("You're back online"). Message send is optimistic -- clock
|
|
173
|
+
icon while sending, checkmark on delivery, red warning with "Retry" on failure.
|
|
174
|
+
|
|
175
|
+
### 2.4 Notion
|
|
176
|
+
|
|
177
|
+
**Loading:** Page-level: minimal centered spinner. Block-level: inline skeleton
|
|
178
|
+
placeholders matching expected dimensions. Syncing shows "Saving..." in the top bar,
|
|
179
|
+
transitioning to "Saved" with subtle fade-out. Offline: "Offline" with cloud-slash
|
|
180
|
+
icon; queues changes for sync.
|
|
181
|
+
|
|
182
|
+
**Empty states:** Blank pages show faint prompt ("Press '/' for commands"). Database
|
|
183
|
+
views with no entries show "No results" with inline "+ New" button.
|
|
184
|
+
|
|
185
|
+
### 2.5 Figma
|
|
186
|
+
|
|
187
|
+
**Loading:** Progressive canvas rendering -- UI chrome first, then layers incrementally
|
|
188
|
+
(text/shapes before images). Determinate progress bar for large files.
|
|
189
|
+
|
|
190
|
+
**Multiplayer feedback:** Real-time cursors, selection highlights, presence avatars.
|
|
191
|
+
Network disconnection triggers persistent yellow banner ("Having trouble connecting.
|
|
192
|
+
Changes will be saved locally."). Reconnection auto-syncs with conflict resolution.
|
|
193
|
+
|
|
194
|
+
### 2.6 GitHub
|
|
195
|
+
|
|
196
|
+
**Loading:** Skeleton screens for repo file listings, PR pages, and activity feeds.
|
|
197
|
+
Check suite results load incrementally -- summary first, details on expansion.
|
|
198
|
+
|
|
199
|
+
**Empty states:** Repo empty states include step-by-step setup with copy-paste CLI
|
|
200
|
+
commands. Issue/PR empty states suggest broadening search criteria.
|
|
201
|
+
|
|
202
|
+
### 2.7 Shopify (Polaris)
|
|
203
|
+
|
|
204
|
+
**Loading:** Documented loading patterns -- skeleton pages for initial load, skeleton
|
|
205
|
+
body for section refreshes, inline spinners for actions with explicit usage criteria.
|
|
206
|
+
|
|
207
|
+
**Toast system:** Bottom center, 5s auto-dismiss, single action link, fixed queue.
|
|
208
|
+
Error separation: page-level banners (API failures), section-level inline messages
|
|
209
|
+
(data conflicts), field-level validation (form errors).
|
|
210
|
+
|
|
211
|
+
### 2.8 Vercel
|
|
212
|
+
|
|
213
|
+
**Deployment feedback:** Multi-phase progress with named stages (Building, Deploying,
|
|
214
|
+
Assigning domains). Each stage spinner converts to checkmark on completion. Build
|
|
215
|
+
failures highlight the specific failed step with log excerpt and "Redeploy" action.
|
|
216
|
+
|
|
217
|
+
---
|
|
218
|
+
|
|
219
|
+
## 3. User Flow Mapping
|
|
220
|
+
|
|
221
|
+
### 3.1 Happy Path
|
|
222
|
+
|
|
223
|
+
```
|
|
224
|
+
[Idle] -> User Action -> [Optimistic Update / Loading State]
|
|
225
|
+
|
|
|
226
|
+
Server responds (success)
|
|
227
|
+
|
|
|
228
|
+
[Success Feedback] -> [Updated Idle]
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
1. **Idle:** UI is interactive, data is current
|
|
232
|
+
2. **User triggers action** (click, submit, drag, shortcut)
|
|
233
|
+
3. **Immediate feedback (0-100ms):** Button enters loading state
|
|
234
|
+
4. **Optimistic update:** UI reflects expected result immediately
|
|
235
|
+
5. **Loading (100ms-10s):** Appropriate indicator based on duration
|
|
236
|
+
6. **Success (200-500ms):** Checkmark animation, toast, or inline update
|
|
237
|
+
7. **Return to idle:** UI settles with updated data
|
|
238
|
+
|
|
239
|
+
### 3.2 Error Recovery Flows
|
|
240
|
+
|
|
241
|
+
**Error severity tiers and responses:**
|
|
242
|
+
1. **Field-level:** Red border + inline message, focus moves to field
|
|
243
|
+
2. **Form-level:** Error summary banner at top + individual field markers
|
|
244
|
+
3. **Section-level:** Inline error panel with retry button
|
|
245
|
+
4. **Page-level:** Full error state with illustration and recovery CTA
|
|
246
|
+
5. **App-level:** Persistent banner or modal for critical failures
|
|
247
|
+
|
|
248
|
+
**Principles:** Always explain what went wrong in plain language. Always provide a
|
|
249
|
+
recovery action. Preserve user input so they can correct it. For persistent failures,
|
|
250
|
+
offer alternative actions or support contact.
|
|
251
|
+
|
|
252
|
+
### 3.3 Timeout Handling
|
|
253
|
+
|
|
254
|
+
| Duration | Action |
|
|
255
|
+
|-----------|--------|
|
|
256
|
+
| 0-300ms | No indicator (perceived instant) |
|
|
257
|
+
| 300ms-2s | Spinner or subtle indicator |
|
|
258
|
+
| 2s-10s | Skeleton screen or spinner with label |
|
|
259
|
+
| 10s-30s | Progress bar with cancel option |
|
|
260
|
+
| 30s-60s | Progress + "taking longer than expected" |
|
|
261
|
+
| 60s+ | Warning with cancel, retry, or continue options |
|
|
262
|
+
|
|
263
|
+
**Never leave a spinner running indefinitely.** Start a timer on request. At 15s show
|
|
264
|
+
"Taking longer than expected." At 30-60s, stop animation and show error with retry.
|
|
265
|
+
|
|
266
|
+
### 3.4 Offline States
|
|
267
|
+
|
|
268
|
+
1. **Banner:** Show persistent "You're offline" when connectivity is lost
|
|
269
|
+
2. **Available actions:** Indicate what works offline vs. requires connectivity
|
|
270
|
+
3. **Queued actions:** "Saved locally, will sync when online" confirmations
|
|
271
|
+
4. **Stale data:** Show when content was last refreshed ("Last updated 2 hours ago")
|
|
272
|
+
5. **Reconnection:** Brief "Back online" success banner, auto-sync queued changes
|
|
273
|
+
|
|
274
|
+
Google (web.dev): "When a network failure occurs, tell the user both the application's
|
|
275
|
+
state and the actions they can still take."
|
|
276
|
+
|
|
277
|
+
### 3.5 Partial Data Loading
|
|
278
|
+
|
|
279
|
+
- Load application shell (nav, layout chrome) immediately
|
|
280
|
+
- Load critical content first, secondary content asynchronously
|
|
281
|
+
- If secondary content fails, show section-level error with retry
|
|
282
|
+
- Never blank the entire page because one API call failed
|
|
283
|
+
- Provide section-level refresh, not just page-level
|
|
284
|
+
|
|
285
|
+
### 3.6 Optimistic Updates
|
|
286
|
+
|
|
287
|
+
**When to use:** High success rate actions (>99%), non-destructive operations, real-
|
|
288
|
+
time collaborative environments. Examples: likes, toggles, status changes, messages.
|
|
289
|
+
|
|
290
|
+
**When NOT to use:** Destructive actions (delete, payment), complex server validation,
|
|
291
|
+
operations where server generates critical data the UI needs immediately.
|
|
292
|
+
|
|
293
|
+
**Pattern:** Update local UI immediately -> send request to server -> on success do
|
|
294
|
+
nothing (UI is correct) -> on failure revert UI + show error toast with retry option.
|
|
295
|
+
|
|
296
|
+
---
|
|
297
|
+
|
|
298
|
+
## 4. Micro-Interactions
|
|
299
|
+
|
|
300
|
+
### 4.1 Timing Reference
|
|
301
|
+
|
|
302
|
+
| Animation Type | Duration | Easing | Notes |
|
|
303
|
+
|-----------------------------|-----------|---------------|-----------------------------|
|
|
304
|
+
| Immediate feedback (hover) | 50-100ms | Ease | Button color, cursor swap |
|
|
305
|
+
| Micro-interaction | 150-300ms | Ease-out | Toggle, checkbox, like |
|
|
306
|
+
| Standard transition | 200-400ms | Ease-in-out | Panel slide, dropdown |
|
|
307
|
+
| Success checkmark draw | 350-500ms | Ease-out | Circle + stroke sequence |
|
|
308
|
+
| Error shake | 300-400ms | Ease-in-out | 3-4 horizontal oscillations |
|
|
309
|
+
| Toast entry/exit | 200-300ms | Decelerate | Slide + fade |
|
|
310
|
+
| Skeleton shimmer cycle | 1500-2500ms | Linear | Full sweep pass |
|
|
311
|
+
| Spinner rotation | 800-1200ms | Linear | Per full cycle |
|
|
312
|
+
|
|
313
|
+
### 4.2 Skeleton Shimmer (CSS)
|
|
314
|
+
|
|
315
|
+
```css
|
|
316
|
+
@keyframes shimmer {
|
|
317
|
+
0% { transform: translateX(-100%); }
|
|
318
|
+
100% { transform: translateX(100%); }
|
|
319
|
+
}
|
|
320
|
+
.skeleton {
|
|
321
|
+
position: relative;
|
|
322
|
+
overflow: hidden;
|
|
323
|
+
background-color: #e0e0e0;
|
|
324
|
+
border-radius: 4px;
|
|
325
|
+
}
|
|
326
|
+
.skeleton::after {
|
|
327
|
+
content: '';
|
|
328
|
+
position: absolute;
|
|
329
|
+
inset: 0;
|
|
330
|
+
background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
|
|
331
|
+
animation: shimmer 1.8s linear infinite;
|
|
332
|
+
will-change: transform;
|
|
333
|
+
}
|
|
334
|
+
@media (prefers-color-scheme: dark) {
|
|
335
|
+
.skeleton { background-color: #2a2a2a; }
|
|
336
|
+
.skeleton::after {
|
|
337
|
+
background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
@media (prefers-reduced-motion: reduce) {
|
|
341
|
+
.skeleton::after { animation: none; }
|
|
342
|
+
}
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
### 4.3 Success Checkmark Animation
|
|
346
|
+
|
|
347
|
+
1. Circle draws clockwise from top (0-200ms, ease-out)
|
|
348
|
+
2. Brief pause (50ms)
|
|
349
|
+
3. Checkmark stroke draws bottom-left to top-right (150-250ms, ease-out)
|
|
350
|
+
4. Optional: subtle scale bounce (1.0 -> 1.1 -> 1.0) over 100ms
|
|
351
|
+
5. Total: 350-500ms. Hold completed state 500ms before transitioning.
|
|
352
|
+
|
|
353
|
+
### 4.4 Error Shake Animation
|
|
354
|
+
|
|
355
|
+
```css
|
|
356
|
+
@keyframes shake {
|
|
357
|
+
0%, 100% { transform: translateX(0); }
|
|
358
|
+
20% { transform: translateX(-8px); }
|
|
359
|
+
40% { transform: translateX(8px); }
|
|
360
|
+
60% { transform: translateX(-6px); }
|
|
361
|
+
80% { transform: translateX(6px); }
|
|
362
|
+
}
|
|
363
|
+
.field-error {
|
|
364
|
+
animation: shake 0.35s ease-in-out;
|
|
365
|
+
border-color: var(--color-error);
|
|
366
|
+
}
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
3-4 rapid horizontal translations, 6-10px displacement per direction, 300-400ms total.
|
|
370
|
+
Accompanied by red border and error message fade-in below field.
|
|
371
|
+
|
|
372
|
+
---
|
|
373
|
+
|
|
374
|
+
## 5. Anti-Patterns
|
|
375
|
+
|
|
376
|
+
### 5.1 Blank Loading Screens
|
|
377
|
+
Showing empty/white screen while loading. Users cannot distinguish "loading" from
|
|
378
|
+
"broken." **Fix:** Always show skeleton, spinner with text, or application shell.
|
|
379
|
+
|
|
380
|
+
### 5.2 Spinner Without Timeout
|
|
381
|
+
Indefinitely spinning indicator with no fallback or escape. **Fix:** At 15s show
|
|
382
|
+
"Taking longer than expected." At 30s show error with retry and cancel.
|
|
383
|
+
|
|
384
|
+
### 5.3 Error Messages Without Recovery Action
|
|
385
|
+
"Something went wrong." with no explanation or next step. **Fix:** Every error includes
|
|
386
|
+
what happened, why (if knowable), and at least one actionable step.
|
|
387
|
+
|
|
388
|
+
### 5.4 Success Messages That Block
|
|
389
|
+
Modal success dialogs requiring "OK" for routine confirmations. **Fix:** Use auto-
|
|
390
|
+
dismissing toasts. Reserve modals for critical consequences.
|
|
391
|
+
|
|
392
|
+
### 5.5 Alert Fatigue
|
|
393
|
+
Over-using notifications for low-importance info. Users desensitize and miss critical
|
|
394
|
+
alerts. Research: alert overload causes 40% productivity loss from task switching.
|
|
395
|
+
**Fix:** Severity tiers, passive indicators for low-priority, user-configurable prefs.
|
|
396
|
+
|
|
397
|
+
### 5.6 No Empty State Design
|
|
398
|
+
Blank areas or raw "null"/"No data" when content is absent. **Fix:** Design intentional
|
|
399
|
+
empty states with visual treatment, explanation, and CTA for every content area.
|
|
400
|
+
|
|
401
|
+
### 5.7 Premature Inline Validation
|
|
402
|
+
Errors while user is still typing ("Invalid email" after typing "j"). **Fix:** Validate
|
|
403
|
+
on blur. For real-time fields, start after first blur. Remove errors instantly on valid.
|
|
404
|
+
|
|
405
|
+
### 5.8 Inconsistent Feedback Positioning
|
|
406
|
+
Toasts appearing sometimes top-right, sometimes bottom. Users don't know where to look.
|
|
407
|
+
**Fix:** Single consistent position per feedback type, documented in design system.
|
|
408
|
+
|
|
409
|
+
### 5.9 Loading States That Lose Context
|
|
410
|
+
Full-page loading when only one section updates. User loses scroll position, selection,
|
|
411
|
+
and mental context. **Fix:** Scope loading to smallest relevant area. Preserve state.
|
|
412
|
+
|
|
413
|
+
### 5.10 Optimistic Updates Without Rollback
|
|
414
|
+
UI updates instantly but never reverts on server failure, leaving incorrect state.
|
|
415
|
+
**Fix:** Always implement rollback. Show error toast explaining what happened.
|
|
416
|
+
|
|
417
|
+
### 5.11 Stacking Multiple Notifications
|
|
418
|
+
Multiple toasts piled on screen, covering content. **Fix:** Queue and display one at a
|
|
419
|
+
time. Consolidate simultaneous messages ("3 items saved" vs. three toasts).
|
|
420
|
+
|
|
421
|
+
### 5.12 Using Modals for Non-Critical Feedback
|
|
422
|
+
Modal dialogs for routine confirmations ("Item added to cart!" + OK). **Fix:** Toasts
|
|
423
|
+
for non-critical, inline for validation, modals only for destructive confirmations.
|
|
424
|
+
|
|
425
|
+
### 5.13 Ignoring Motion Sensitivity
|
|
426
|
+
Aggressive animations with no opt-out. Users with vestibular disorders experience
|
|
427
|
+
discomfort. **Fix:** Respect `prefers-reduced-motion`. Replace with instant changes or
|
|
428
|
+
gentle fades. Never rely on animation as sole feedback mechanism.
|
|
429
|
+
|
|
430
|
+
### 5.14 Silent Failures
|
|
431
|
+
Server failure with no UI indication. User believes action succeeded. **Fix:** Every
|
|
432
|
+
server interaction has explicit success and failure handlers with user-visible feedback.
|
|
433
|
+
|
|
434
|
+
---
|
|
435
|
+
|
|
436
|
+
## 6. Accessibility
|
|
437
|
+
|
|
438
|
+
### 6.1 ARIA Live Regions
|
|
439
|
+
|
|
440
|
+
Live region containers must exist in the DOM before content is injected. Adding
|
|
441
|
+
`aria-live` simultaneously with content will not trigger announcements.
|
|
442
|
+
|
|
443
|
+
- `aria-live="polite"`: Announce when user is idle (non-urgent updates)
|
|
444
|
+
- `aria-live="assertive"`: Announce immediately, interrupting speech (urgent alerts)
|
|
445
|
+
- `aria-atomic="true"`: Announce entire region on any change
|
|
446
|
+
|
|
447
|
+
```html
|
|
448
|
+
<!-- Container exists on page load, empty -->
|
|
449
|
+
<div aria-live="polite" id="status-region"></div>
|
|
450
|
+
<!-- JS injects later: screen reader announces the text -->
|
|
451
|
+
```
|
|
452
|
+
|
|
453
|
+
### 6.2 Role Assignments
|
|
454
|
+
|
|
455
|
+
| Feedback Type | ARIA Role | Live Behavior | Use Case |
|
|
456
|
+
|--------------------|--------------------|---------------|------------------------------|
|
|
457
|
+
| Error alerts | `role="alert"` | Assertive | Form errors, system failures |
|
|
458
|
+
| Success messages | `role="status"` | Polite | Save confirmations |
|
|
459
|
+
| Loading indicators | `role="status"` | Polite | "Loading...", progress |
|
|
460
|
+
| Toast notifications| `role="status"` | Polite | Non-critical confirmations |
|
|
461
|
+
| Critical alerts | `role="alertdialog"` | Assertive | Requires acknowledgment |
|
|
462
|
+
| Progress updates | `role="progressbar"` | N/A | Use aria-valuenow/min/max |
|
|
463
|
+
|
|
464
|
+
`role="alert"` = `aria-live="assertive"` + `aria-atomic="true"`.
|
|
465
|
+
`role="status"` = `aria-live="polite"` + `aria-atomic="true"`.
|
|
466
|
+
Never use `role="alert"` for routine success -- it interrupts the user.
|
|
467
|
+
|
|
468
|
+
### 6.3 Focus Management After State Changes
|
|
469
|
+
|
|
470
|
+
| State Change | Focus Action |
|
|
471
|
+
|--------------------------|-----------------------------------------------------|
|
|
472
|
+
| Modal opens | Move to first focusable element inside modal |
|
|
473
|
+
| Modal closes | Return to element that triggered the modal |
|
|
474
|
+
| Inline error on submit | Move to first field with an error |
|
|
475
|
+
| Toast appears | Do NOT move focus (announced via live region) |
|
|
476
|
+
| Content finishes loading | Move to loaded content (if user-initiated) |
|
|
477
|
+
| Section removed | Move to next logical element |
|
|
478
|
+
|
|
479
|
+
WCAG 2.2 SC 2.4.11: Focused element must not be fully hidden behind sticky headers or
|
|
480
|
+
overlays. Do not move focus to loading indicators -- use live regions to announce
|
|
481
|
+
"Loading..." and move focus to result only after completion.
|
|
482
|
+
|
|
483
|
+
### 6.4 Screen Reader Patterns
|
|
484
|
+
|
|
485
|
+
```html
|
|
486
|
+
<!-- Form validation errors -->
|
|
487
|
+
<input id="email" aria-invalid="true" aria-describedby="email-error" />
|
|
488
|
+
<span id="email-error" role="alert">Please enter a valid email address.</span>
|
|
489
|
+
|
|
490
|
+
<!-- Progress bar -->
|
|
491
|
+
<div role="progressbar" aria-valuenow="65" aria-valuemin="0"
|
|
492
|
+
aria-valuemax="100" aria-label="Uploading: 65% complete"></div>
|
|
493
|
+
```
|
|
494
|
+
|
|
495
|
+
### 6.5 Additional Requirements
|
|
496
|
+
|
|
497
|
+
- Never use color alone to convey status; pair with icons and text
|
|
498
|
+
- Error text: 4.5:1 contrast minimum (WCAG SC 1.4.3)
|
|
499
|
+
- Auto-dismissing toasts must be pausable on hover/focus (WCAG SC 2.2.1)
|
|
500
|
+
- Minimum 5s display for screen reader announcement before auto-dismiss
|
|
501
|
+
- Use `aria-invalid="true"` on error fields alongside visual treatment
|
|
502
|
+
|
|
503
|
+
---
|
|
504
|
+
|
|
505
|
+
## 7. Cross-Platform Adaptation
|
|
506
|
+
|
|
507
|
+
### 7.1 iOS (Apple HIG)
|
|
508
|
+
|
|
509
|
+
| Component | Platform API | Notes |
|
|
510
|
+
|-----------|-------------|-------|
|
|
511
|
+
| Spinner | `UIActivityIndicatorView` | `.medium` (20pt), `.large` (36pt) |
|
|
512
|
+
| Progress | `ProgressView` | Determinate (bar) and indeterminate |
|
|
513
|
+
| Pull-to-refresh | `UIRefreshControl` | System-standard in scroll views |
|
|
514
|
+
| Alert | `UIAlertController` | `.alert` (centered), `.actionSheet` (bottom) |
|
|
515
|
+
| Haptics | `UIImpactFeedbackGenerator` | .success, .error, .warning feedback types |
|
|
516
|
+
| Banner | Custom implementation | No system component; position below nav bar |
|
|
517
|
+
|
|
518
|
+
Apple: "Use alerts sparingly. Match the importance of information to the interruption
|
|
519
|
+
level." Prefer determinate progress so users can estimate remaining wait time.
|
|
520
|
+
|
|
521
|
+
### 7.2 Android (Material Design)
|
|
522
|
+
|
|
523
|
+
| Component | Platform API | Notes |
|
|
524
|
+
|-----------|-------------|-------|
|
|
525
|
+
| Circular progress | `CircularProgressIndicator` | Determinate + indeterminate, M3 themed |
|
|
526
|
+
| Linear progress | `LinearProgressIndicator` | M3 Expressive: wavy, rounded, gap support |
|
|
527
|
+
| New loader | `LoadingIndicator` (M3E) | Shape-morph for <5s waits |
|
|
528
|
+
| Pull-to-refresh | `SwipeRefreshLayout` | Circular progress animation |
|
|
529
|
+
| Snackbar | `Snackbar` | SHORT 2s, LONG 3.5s, INDEFINITE; one action |
|
|
530
|
+
| Toast | `Toast` | Text-only, no action, prefer Snackbar |
|
|
531
|
+
| Alert | `AlertDialog` | Up to 3 buttons (positive, negative, neutral) |
|
|
532
|
+
|
|
533
|
+
### 7.3 Web
|
|
534
|
+
|
|
535
|
+
| Pattern | Implementation | Libraries |
|
|
536
|
+
|---------|---------------|-----------|
|
|
537
|
+
| Skeleton | CSS (see Section 4.2) | `react-loading-skeleton`, Shadcn Skeleton |
|
|
538
|
+
| Toast | Custom + ARIA | `react-hot-toast`, `sonner`, `vue-toastification` |
|
|
539
|
+
| Progress | `<progress>` or `role="progressbar"` | NProgress (YouTube/GitHub style) |
|
|
540
|
+
| Banner | `<div role="alert/status">` | Carbon Design System notification |
|
|
541
|
+
|
|
542
|
+
### 7.4 Cross-Platform Frameworks
|
|
543
|
+
|
|
544
|
+
**React Native:** `ActivityIndicator` (maps to native), `react-native-toast-message`,
|
|
545
|
+
`react-native-skeleton-placeholder`.
|
|
546
|
+
|
|
547
|
+
**Flutter:** `CircularProgressIndicator`/`LinearProgressIndicator` (M3), `Shimmer`
|
|
548
|
+
package, `SnackBar` via `ScaffoldMessenger`, `AlertDialog`/`CupertinoAlertDialog`.
|
|
549
|
+
Flutter architecture guide documents optimistic state pattern with `Result` types.
|
|
550
|
+
|
|
551
|
+
---
|
|
552
|
+
|
|
553
|
+
## 8. Decision Tree
|
|
554
|
+
|
|
555
|
+
### 8.1 Choosing a Loading Indicator
|
|
556
|
+
|
|
557
|
+
```
|
|
558
|
+
Is the operation duration known?
|
|
559
|
+
+-- YES (determinate)
|
|
560
|
+
| +-- < 10s --> Small progress bar or determinate spinner
|
|
561
|
+
| +-- > 10s --> Full progress bar + percentage + time estimate
|
|
562
|
+
+-- NO (indeterminate)
|
|
563
|
+
+-- Likely < 2s --> No indicator (perceived instant)
|
|
564
|
+
+-- Likely 2-5s --> Spinner or M3 Expressive loading indicator
|
|
565
|
+
+-- Likely 5-10s --> Skeleton screen (predictable layout) or labeled spinner
|
|
566
|
+
+-- Likely > 10s --> Indeterminate progress bar + timeout at 15s/30s
|
|
567
|
+
```
|
|
568
|
+
|
|
569
|
+
### 8.2 Choosing a Feedback Mechanism
|
|
570
|
+
|
|
571
|
+
```
|
|
572
|
+
Does the user need to take action?
|
|
573
|
+
+-- YES
|
|
574
|
+
| +-- Critical / destructive? --> Modal dialog (confirmation required)
|
|
575
|
+
| +-- Non-critical? --> Snackbar with action ("Undo")
|
|
576
|
+
| +-- Tied to specific element? --> Inline message adjacent to it
|
|
577
|
+
+-- NO (informational)
|
|
578
|
+
+-- Urgent? --> role="alert", banner or assertive toast
|
|
579
|
+
+-- System-wide? --> Persistent top-of-page banner
|
|
580
|
+
+-- Routine success? --> Auto-dismiss toast (3-5s)
|
|
581
|
+
+-- Other info? --> Inline status indicator or section notification
|
|
582
|
+
```
|
|
583
|
+
|
|
584
|
+
### 8.3 Choosing an Empty State
|
|
585
|
+
|
|
586
|
+
```
|
|
587
|
+
Why is content empty?
|
|
588
|
+
+-- First-time use --> Illustration + value prop + CTA to create
|
|
589
|
+
+-- No search results --> Echo query + modify suggestions + related content
|
|
590
|
+
+-- User cleared all --> Celebratory illustration + "All caught up"
|
|
591
|
+
+-- Error prevented load --> Error illustration + explanation + retry CTA
|
|
592
|
+
+-- Feature unavailable --> Prerequisite explanation + upgrade/enable CTA
|
|
593
|
+
```
|
|
594
|
+
|
|
595
|
+
### 8.4 Comparison Matrix
|
|
596
|
+
|
|
597
|
+
| Criterion | Inline Message | Toast/Snackbar | Banner | Modal Dialog |
|
|
598
|
+
|----------------------|----------------|----------------|---------------|---------------|
|
|
599
|
+
| Urgency | Medium | Low | Medium-High | Critical |
|
|
600
|
+
| Persistence | Until resolved | Auto-dismiss | Until dismissed| Until dismissed|
|
|
601
|
+
| Blocks interaction | No | No | No | Yes |
|
|
602
|
+
| Tied to element | Yes | No | No | No |
|
|
603
|
+
| User action required | Sometimes | Optional | Sometimes | Yes |
|
|
604
|
+
| Scope | Field/section | Page | Page/app | App |
|
|
605
|
+
| Example | Field error | "Saved" | "Trial expires"| "Delete?" |
|
|
606
|
+
|
|
607
|
+
---
|
|
608
|
+
|
|
609
|
+
## References
|
|
610
|
+
|
|
611
|
+
### Design System Guidelines
|
|
612
|
+
- [Material Design 3 -- Progress Indicators](https://m3.material.io/components/progress-indicators/guidelines)
|
|
613
|
+
- [Material Design 3 -- Loading Indicator](https://m3.material.io/components/loading-indicator/guidelines)
|
|
614
|
+
- [Material Design 3 -- Snackbar](https://m3.material.io/components/snackbar/guidelines)
|
|
615
|
+
- [Apple HIG -- Feedback](https://developer.apple.com/design/human-interface-guidelines/feedback)
|
|
616
|
+
- [Apple HIG -- Alerts](https://developer.apple.com/design/human-interface-guidelines/alerts)
|
|
617
|
+
- [Apple HIG -- Progress Indicators](https://developers.apple.com/design/human-interface-guidelines/components/status/progress-indicators/)
|
|
618
|
+
- [Carbon Design System -- Loading Pattern](https://carbondesignsystem.com/patterns/loading-pattern/)
|
|
619
|
+
- [Carbon Design System -- Notification Pattern](https://carbondesignsystem.com/patterns/notification-pattern/)
|
|
620
|
+
|
|
621
|
+
### Research
|
|
622
|
+
- [NNG -- Skeleton Screens 101](https://www.nngroup.com/articles/skeleton-screens/)
|
|
623
|
+
- [NNG -- Progress Indicators](https://www.nngroup.com/articles/progress-indicators/)
|
|
624
|
+
- [NNG -- Errors in Forms Design Guidelines](https://www.nngroup.com/articles/errors-forms-design-guidelines/)
|
|
625
|
+
- [Smashing Magazine -- Live Validation UX](https://www.smashingmagazine.com/2022/09/inline-validation-web-forms-ux/)
|
|
626
|
+
- [Baymard -- Inline Form Validation](https://baymard.com/blog/inline-form-validation)
|
|
627
|
+
- [web.dev -- Offline UX Design Guidelines](https://web.dev/articles/offline-ux-design-guidelines)
|
|
628
|
+
- [LogRocket -- Toast Notification Best Practices](https://blog.logrocket.com/ux-design/toast-notifications/)
|
|
629
|
+
|
|
630
|
+
### Accessibility
|
|
631
|
+
- [MDN -- ARIA Live Regions](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Guides/Live_regions)
|
|
632
|
+
- [MDN -- ARIA alert role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/alert_role)
|
|
633
|
+
- [MDN -- ARIA status role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/status_role)
|
|
634
|
+
- [Sara Soueidan -- Accessible Notifications with ARIA Live Regions](https://www.sarasoueidan.com/blog/accessible-notifications-with-aria-live-regions-part-1/)
|
|
635
|
+
- [W3C -- Understanding SC 2.4.3 Focus Order](https://www.w3.org/WAI/WCAG21/Understanding/focus-order.html)
|
|
636
|
+
- [VA.gov Design System -- Focus Management](https://design.va.gov/accessibility/focus-management)
|
|
637
|
+
|
|
638
|
+
### Design Patterns
|
|
639
|
+
- [Toptal -- Empty States UX](https://www.toptal.com/designers/ux/empty-state-ux-design)
|
|
640
|
+
- [MagicBell -- Alert Fatigue](https://www.magicbell.com/blog/alert-fatigue)
|
|
641
|
+
- [Stripe -- Design Patterns for Apps](https://docs.stripe.com/stripe-apps/patterns)
|
|
642
|
+
- [Adam Silver -- The Problem with Toast Messages](https://adamsilver.io/blog/the-problem-with-toast-messages-and-what-to-do-instead/)
|