@starci/skills 1.1.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/INDEX.md +74 -0
- package/INDEX.vi.md +75 -0
- package/README.md +44 -0
- package/README.vi.md +43 -0
- package/SKILL.md +135 -0
- package/SKILL.vi.md +128 -0
- package/alias/INDEX.md +104 -0
- package/alias/INDEX.vi.md +104 -0
- package/alias/alias.json +297 -0
- package/bin/starci-skills.mjs +219 -0
- package/knowledge/INDEX.md +22 -0
- package/knowledge/INDEX.vi.md +22 -0
- package/knowledge/grammars/starci/DNA.md +146 -0
- package/knowledge/grammars/starci/DNA.vi.md +146 -0
- package/knowledge/grammars/starci/INDEX.md +25 -0
- package/knowledge/grammars/starci/INDEX.vi.md +25 -0
- package/knowledge/grammars/starci/family.md +50 -0
- package/knowledge/grammars/starci/family.vi.md +50 -0
- package/knowledge/grammars/starci/idioms.md +120 -0
- package/knowledge/grammars/starci/idioms.vi.md +121 -0
- package/knowledge/grammars/starci/playbook.md +36 -0
- package/knowledge/grammars/starci/playbook.vi.md +35 -0
- package/knowledge/patterns/be/INDEX.md +29 -0
- package/knowledge/patterns/be/INDEX.vi.md +29 -0
- package/knowledge/patterns/be/comment.md +80 -0
- package/knowledge/patterns/be/comment.vi.md +80 -0
- package/knowledge/patterns/be/error.md +86 -0
- package/knowledge/patterns/be/error.vi.md +86 -0
- package/knowledge/patterns/be/folder.md +87 -0
- package/knowledge/patterns/be/folder.vi.md +86 -0
- package/knowledge/patterns/be/function.md +80 -0
- package/knowledge/patterns/be/function.vi.md +80 -0
- package/knowledge/patterns/be/imports.md +79 -0
- package/knowledge/patterns/be/imports.vi.md +79 -0
- package/knowledge/patterns/be/naming.md +87 -0
- package/knowledge/patterns/be/naming.vi.md +87 -0
- package/knowledge/patterns/be/test.md +79 -0
- package/knowledge/patterns/be/test.vi.md +79 -0
- package/knowledge/patterns/be/typing.md +73 -0
- package/knowledge/patterns/be/typing.vi.md +73 -0
- package/knowledge/patterns/fe/INDEX.md +29 -0
- package/knowledge/patterns/fe/INDEX.vi.md +29 -0
- package/knowledge/patterns/fe/comment.md +70 -0
- package/knowledge/patterns/fe/comment.vi.md +70 -0
- package/knowledge/patterns/fe/error.md +61 -0
- package/knowledge/patterns/fe/error.vi.md +61 -0
- package/knowledge/patterns/fe/folder.md +98 -0
- package/knowledge/patterns/fe/folder.vi.md +95 -0
- package/knowledge/patterns/fe/function.md +70 -0
- package/knowledge/patterns/fe/function.vi.md +70 -0
- package/knowledge/patterns/fe/imports.md +87 -0
- package/knowledge/patterns/fe/imports.vi.md +87 -0
- package/knowledge/patterns/fe/naming.md +77 -0
- package/knowledge/patterns/fe/naming.vi.md +77 -0
- package/knowledge/patterns/fe/test.md +73 -0
- package/knowledge/patterns/fe/test.vi.md +73 -0
- package/knowledge/patterns/fe/typing.md +67 -0
- package/knowledge/patterns/fe/typing.vi.md +67 -0
- package/knowledge/ui/INDEX.md +101 -0
- package/knowledge/ui/INDEX.vi.md +101 -0
- package/knowledge/ui/composition/INDEX.md +60 -0
- package/knowledge/ui/composition/INDEX.vi.md +63 -0
- package/knowledge/ui/composition/accent.md +73 -0
- package/knowledge/ui/composition/accent.vi.md +74 -0
- package/knowledge/ui/composition/action.md +55 -0
- package/knowledge/ui/composition/action.vi.md +56 -0
- package/knowledge/ui/composition/coverage.md +37 -0
- package/knowledge/ui/composition/coverage.vi.md +37 -0
- package/knowledge/ui/composition/cta.md +79 -0
- package/knowledge/ui/composition/cta.vi.md +79 -0
- package/knowledge/ui/composition/feedback.md +55 -0
- package/knowledge/ui/composition/feedback.vi.md +56 -0
- package/knowledge/ui/composition/hierarchy.md +83 -0
- package/knowledge/ui/composition/hierarchy.vi.md +82 -0
- package/knowledge/ui/composition/layout.md +91 -0
- package/knowledge/ui/composition/layout.vi.md +93 -0
- package/knowledge/ui/composition/responsive.md +67 -0
- package/knowledge/ui/composition/responsive.vi.md +67 -0
- package/knowledge/ui/composition/state.md +105 -0
- package/knowledge/ui/composition/state.vi.md +106 -0
- package/knowledge/ui/presentation/INDEX.md +94 -0
- package/knowledge/ui/presentation/INDEX.vi.md +69 -0
- package/knowledge/ui/presentation/boundary.md +170 -0
- package/knowledge/ui/presentation/boundary.vi.md +169 -0
- package/knowledge/ui/presentation/font.md +155 -0
- package/knowledge/ui/presentation/font.vi.md +156 -0
- package/knowledge/ui/presentation/gap.md +181 -0
- package/knowledge/ui/presentation/gap.vi.md +181 -0
- package/knowledge/ui/presentation/margin.md +168 -0
- package/knowledge/ui/presentation/margin.vi.md +171 -0
- package/knowledge/ui/presentation/measure.md +174 -0
- package/knowledge/ui/presentation/measure.vi.md +178 -0
- package/knowledge/ui/presentation/overflow.md +142 -0
- package/knowledge/ui/presentation/overflow.vi.md +142 -0
- package/knowledge/ui/presentation/padding.md +293 -0
- package/knowledge/ui/presentation/padding.vi.md +292 -0
- package/knowledge/ui/presentation/surface.md +166 -0
- package/knowledge/ui/presentation/surface.vi.md +166 -0
- package/knowledge/ui/presentation/text-flow.md +123 -0
- package/knowledge/ui/presentation/text-flow.vi.md +123 -0
- package/knowledge/ui/presentation/tone.md +114 -0
- package/knowledge/ui/presentation/tone.vi.md +113 -0
- package/knowledge/ui/proof/INDEX.md +55 -0
- package/knowledge/ui/proof/INDEX.vi.md +55 -0
- package/knowledge/ui/proof/accessibility.md +67 -0
- package/knowledge/ui/proof/accessibility.vi.md +68 -0
- package/knowledge/ui/proof/contrast.md +58 -0
- package/knowledge/ui/proof/contrast.vi.md +57 -0
- package/knowledge/ui/proof/focus.md +76 -0
- package/knowledge/ui/proof/focus.vi.md +76 -0
- package/knowledge/ui/proof/motion.md +63 -0
- package/knowledge/ui/proof/motion.vi.md +64 -0
- package/knowledge/ui/proof/render-truth.md +63 -0
- package/knowledge/ui/proof/render-truth.vi.md +63 -0
- package/operators/INDEX.md +199 -0
- package/operators/INDEX.vi.md +199 -0
- package/operators/architecture-decide/errors.json +115 -0
- package/operators/architecture-decide/operator.json +20 -0
- package/operators/architecture-decide/operator.md +133 -0
- package/operators/architecture-decide/operator.vi.md +130 -0
- package/operators/architecture-decide/self-test.mjs +221 -0
- package/operators/architecture-decide/validate.mjs +112 -0
- package/operators/backend-source-apply/errors.json +66 -0
- package/operators/backend-source-apply/operator.json +20 -0
- package/operators/backend-source-apply/operator.md +189 -0
- package/operators/backend-source-apply/operator.vi.md +185 -0
- package/operators/backend-source-apply/self-test.mjs +257 -0
- package/operators/backend-source-apply/validate.mjs +240 -0
- package/operators/business-decide/errors.json +78 -0
- package/operators/business-decide/operator.json +20 -0
- package/operators/business-decide/operator.md +176 -0
- package/operators/business-decide/operator.vi.md +174 -0
- package/operators/business-decide/self-test.mjs +225 -0
- package/operators/business-decide/validate.mjs +277 -0
- package/operators/content-generate/errors.json +106 -0
- package/operators/content-generate/operator.json +21 -0
- package/operators/content-generate/operator.md +155 -0
- package/operators/content-generate/operator.vi.md +155 -0
- package/operators/content-generate/self-test.mjs +288 -0
- package/operators/content-generate/validate.mjs +196 -0
- package/operators/errors.json +178 -0
- package/operators/frontend-direction-decide/errors.json +135 -0
- package/operators/frontend-direction-decide/operator.json +21 -0
- package/operators/frontend-direction-decide/operator.md +167 -0
- package/operators/frontend-direction-decide/operator.vi.md +167 -0
- package/operators/frontend-direction-decide/self-test.mjs +226 -0
- package/operators/frontend-direction-decide/validate.mjs +146 -0
- package/operators/frontend-presentation-resolve/errors.json +42 -0
- package/operators/frontend-presentation-resolve/operator.json +19 -0
- package/operators/frontend-presentation-resolve/operator.md +142 -0
- package/operators/frontend-presentation-resolve/operator.vi.md +140 -0
- package/operators/frontend-presentation-resolve/self-test.mjs +163 -0
- package/operators/frontend-presentation-resolve/validate.mjs +143 -0
- package/operators/frontend-source-apply/errors.json +30 -0
- package/operators/frontend-source-apply/operator.json +20 -0
- package/operators/frontend-source-apply/operator.md +127 -0
- package/operators/frontend-source-apply/operator.vi.md +126 -0
- package/operators/frontend-source-apply/self-test.mjs +214 -0
- package/operators/frontend-source-apply/validate.mjs +133 -0
- package/operators/frontend-surface-audit/errors.json +5 -0
- package/operators/frontend-surface-audit/operator.json +22 -0
- package/operators/frontend-surface-audit/operator.md +121 -0
- package/operators/frontend-surface-audit/operator.vi.md +121 -0
- package/operators/frontend-surface-audit/self-test.mjs +185 -0
- package/operators/frontend-surface-audit/validate.mjs +127 -0
- package/operators/git-publish/errors.json +54 -0
- package/operators/git-publish/operator.json +20 -0
- package/operators/git-publish/operator.md +180 -0
- package/operators/git-publish/operator.vi.md +178 -0
- package/operators/git-publish/self-test.mjs +177 -0
- package/operators/git-publish/validate.mjs +106 -0
- package/operators/platform-operate/errors.json +90 -0
- package/operators/platform-operate/operator.json +22 -0
- package/operators/platform-operate/operator.md +162 -0
- package/operators/platform-operate/operator.vi.md +160 -0
- package/operators/platform-operate/self-test.mjs +202 -0
- package/operators/platform-operate/validate.mjs +193 -0
- package/operators/quality-verify/errors.json +54 -0
- package/operators/quality-verify/operator.json +20 -0
- package/operators/quality-verify/operator.md +185 -0
- package/operators/quality-verify/operator.vi.md +177 -0
- package/operators/quality-verify/self-test.mjs +210 -0
- package/operators/quality-verify/validate.mjs +197 -0
- package/operators/release-deploy/errors.json +158 -0
- package/operators/release-deploy/operator.json +23 -0
- package/operators/release-deploy/operator.md +183 -0
- package/operators/release-deploy/operator.vi.md +181 -0
- package/operators/release-deploy/self-test.mjs +235 -0
- package/operators/release-deploy/validate.mjs +129 -0
- package/operators/uat-verify/errors.json +78 -0
- package/operators/uat-verify/operator.json +25 -0
- package/operators/uat-verify/operator.md +162 -0
- package/operators/uat-verify/operator.vi.md +161 -0
- package/operators/uat-verify/self-test.mjs +270 -0
- package/operators/uat-verify/validate.mjs +202 -0
- package/operators/workspace-bind/errors.json +90 -0
- package/operators/workspace-bind/operator.json +21 -0
- package/operators/workspace-bind/operator.md +148 -0
- package/operators/workspace-bind/operator.vi.md +148 -0
- package/operators/workspace-bind/self-test.mjs +205 -0
- package/operators/workspace-bind/validate.mjs +152 -0
- package/package.json +50 -0
- package/readiness/initialization/workspaces/commit-policy.json +91 -0
- package/readiness/initialization/workspaces/config.schema.json +35 -0
- package/readiness/initialization/workspaces/device-state.schema.json +54 -0
- package/readiness/initialization/workspaces/local-route.schema.json +206 -0
- package/readiness/initialization/workspaces/portable-route.schema.json +200 -0
- package/resources/INDEX.md +96 -0
- package/resources/INDEX.vi.md +99 -0
- package/resources/agents/profiles/claude.json +131 -0
- package/resources/agents/profiles/openai.json +131 -0
- package/resources/orchestrator.json +71 -0
- package/resources/tools.json +85 -0
- package/routing.json +272 -0
- package/scripts/alias-registry.mjs +31 -0
- package/scripts/device-state.mjs +497 -0
- package/scripts/device-state.spec.mjs +18 -0
- package/scripts/errors-registry.mjs +68 -0
- package/scripts/generate-alias-doc.mjs +66 -0
- package/scripts/generate-grammar-dna.mjs +387 -0
- package/scripts/generate-operators-index.mjs +95 -0
- package/scripts/generate-presentation-owned.mjs +681 -0
- package/scripts/install-cli.spec.mjs +74 -0
- package/scripts/json-schema.mjs +94 -0
- package/scripts/operator-md.mjs +96 -0
- package/scripts/run-operator-self-tests.mjs +36 -0
- package/scripts/validate-alias.mjs +165 -0
- package/scripts/validate-defaults.mjs +72 -0
- package/scripts/validate-knowledge-citations.mjs +90 -0
- package/scripts/validate-operator.mjs +125 -0
- package/scripts/validate-request.mjs +80 -0
- package/scripts/validate-resources.mjs +117 -0
- package/scripts/validate-response.mjs +141 -0
- package/scripts/validate-routing.mjs +91 -0
- package/scripts/validate-step.mjs +50 -0
- package/scripts/validate-templates.mjs +226 -0
- package/scripts/validate-templates.spec.mjs +144 -0
- package/scripts/validate-workflows.mjs +106 -0
- package/scripts/workspace-portable.mjs +389 -0
- package/scripts/workspace-portable.spec.mjs +246 -0
- package/templates/README.md +47 -0
- package/templates/README.vi.md +45 -0
- package/templates/changes.example.md +27 -0
- package/templates/grammars.template.md +34 -0
- package/templates/kinds/architecture-decision.contract.json +14 -0
- package/templates/kinds/architecture-decision.skeleton.md +52 -0
- package/templates/kinds/backend-source-application.contract.json +10 -0
- package/templates/kinds/backend-source-application.skeleton.md +34 -0
- package/templates/kinds/business-promise-authority.contract.json +13 -0
- package/templates/kinds/business-promise-authority.skeleton.md +67 -0
- package/templates/kinds/capture.schema.json +33 -0
- package/templates/kinds/changes.contract.json +10 -0
- package/templates/kinds/changes.skeleton.md +26 -0
- package/templates/kinds/checks.schema.json +44 -0
- package/templates/kinds/claims.schema.json +165 -0
- package/templates/kinds/conformance.schema.json +15 -0
- package/templates/kinds/content-brief.contract.json +12 -0
- package/templates/kinds/content-brief.skeleton.md +45 -0
- package/templates/kinds/content-generation-receipt.contract.json +11 -0
- package/templates/kinds/content-generation-receipt.skeleton.md +40 -0
- package/templates/kinds/content-review.contract.json +11 -0
- package/templates/kinds/content-review.skeleton.md +45 -0
- package/templates/kinds/contract.schema.json +28 -0
- package/templates/kinds/coverage-matrix.schema.json +86 -0
- package/templates/kinds/coverage.schema.json +62 -0
- package/templates/kinds/current-state.schema.json +40 -0
- package/templates/kinds/delta.schema.json +95 -0
- package/templates/kinds/e2e.schema.json +63 -0
- package/templates/kinds/frontend-direction-decision.contract.json +93 -0
- package/templates/kinds/frontend-direction-decision.skeleton.md +68 -0
- package/templates/kinds/frontend-presentation-resolution.contract.json +11 -0
- package/templates/kinds/frontend-presentation-resolution.skeleton.md +32 -0
- package/templates/kinds/frontend-source-application.contract.json +10 -0
- package/templates/kinds/frontend-source-application.skeleton.md +30 -0
- package/templates/kinds/frontend-surface-audit.contract.json +52 -0
- package/templates/kinds/frontend-surface-audit.skeleton.md +32 -0
- package/templates/kinds/gate-result.schema.json +64 -0
- package/templates/kinds/git-publication.contract.json +82 -0
- package/templates/kinds/git-publication.skeleton.md +61 -0
- package/templates/kinds/independent-critique.contract.json +9 -0
- package/templates/kinds/independent-critique.skeleton.md +28 -0
- package/templates/kinds/inventory.schema.json +35 -0
- package/templates/kinds/model.schema.json +99 -0
- package/templates/kinds/mutations.schema.json +65 -0
- package/templates/kinds/platform-operation-receipt.contract.json +76 -0
- package/templates/kinds/platform-operation-receipt.skeleton.md +54 -0
- package/templates/kinds/probes.schema.json +130 -0
- package/templates/kinds/proof.schema.json +17 -0
- package/templates/kinds/quality-verification.contract.json +87 -0
- package/templates/kinds/quality-verification.skeleton.md +58 -0
- package/templates/kinds/release-deployment.contract.json +85 -0
- package/templates/kinds/release-deployment.skeleton.md +67 -0
- package/templates/kinds/route.schema.json +293 -0
- package/templates/kinds/stack-model.schema.json +90 -0
- package/templates/kinds/uat-capture.schema.json +35 -0
- package/templates/kinds/uat-flow-verification.contract.json +11 -0
- package/templates/kinds/uat-flow-verification.skeleton.md +47 -0
- package/templates/kinds/uat-snapshot.schema.json +96 -0
- package/templates/kinds/uat-verdicts.schema.json +41 -0
- package/templates/kinds/ui-coverage.schema.json +77 -0
- package/templates/kinds/verdicts.schema.json +39 -0
- package/templates/kinds/workspace-route-binding.contract.json +12 -0
- package/templates/kinds/workspace-route-binding.skeleton.md +60 -0
- package/templates/kinds/writes.schema.json +37 -0
- package/templates/operator.template.md +73 -0
- package/templates/patterns.template.md +31 -0
- package/templates/step/request.schema.json +42 -0
- package/templates/step/response.schema.json +144 -0
- package/templates/ui-composition.template.md +36 -0
- package/templates/ui-presentation.template.md +57 -0
- package/templates/ui-proof.template.md +34 -0
- package/workflows/README.md +37 -0
- package/workflows/README.vi.md +37 -0
- package/workflows/backend-feature.json +59 -0
- package/workflows/content-unit.json +19 -0
- package/workflows/frontend-new-surface.json +81 -0
- package/workflows/frontend-reconstruct.json +67 -0
- package/workflows/frontend-refine.json +67 -0
- package/workflows/frontend-with-uat.json +78 -0
- package/workflows/full-feature.json +104 -0
- package/workflows/release.json +29 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Coverage composition
|
|
2
|
+
|
|
3
|
+
File này trả lời đúng một câu hỏi: receipt của direction phải liệt kê ra những gì, để một operator
|
|
4
|
+
về sau chạy được đúng direction đó thay vì phải đoán.
|
|
5
|
+
|
|
6
|
+
Mọi chủ đề composition khác ràng buộc từng quyết định một. Chủ đề này ràng buộc cả cái receipt. Năm
|
|
7
|
+
chủ đề từng khép lại bằng một rule phạm vi của riêng mình, và năm bản sao của cùng một ý tưởng thì
|
|
8
|
+
sớm muộn cũng trôi mỗi bản một hướng. Cả năm đã nghỉ, gộp vào rule bên dưới, và số của chúng không
|
|
9
|
+
được dùng lại; đã nghỉ là `ACTION-4`, `STATE-4`, `FEEDBACK-4`, `LAYOUT-5` và `RESPONSIVE-5`. Phần
|
|
10
|
+
liệt kê đó đáng giá tới đâu lại được quyết ở chỗ khác: bố cục và gu thẩm mỹ đến từ idiom và playbook
|
|
11
|
+
trong `knowledge/grammars/starci`, còn rule này chỉ khẳng định rằng receipt đã nói đủ để bất kỳ ai
|
|
12
|
+
cũng kiểm được.
|
|
13
|
+
|
|
14
|
+
## COVERAGE-1 — Receipt phải liệt kê những gì
|
|
15
|
+
|
|
16
|
+
Chi phối những trường mà một `frontend-direction-decision.json` đã quyết phải mang trước khi được phát ra.
|
|
17
|
+
|
|
18
|
+
| Case | Dùng khi | Khẳng định |
|
|
19
|
+
| --- | --- | --- |
|
|
20
|
+
| Case 1 | Direction giao bất kỳ action nào | `coverage.actions[]` không rỗng, và mỗi mục gọi tên đường chuột, đường bàn phím, cùng mọi state có tên chạm tới được của action đó, gồm enabled, disabled, pending và đã kết thúc, nên không đường nào và không state nào bị bỏ ngầm |
|
|
21
|
+
| Case 2 | Có action nhận việc mà việc không kết thúc ngay | Mọi đường pending trong `coverage.actions[]` đều gọi tên điểm kết thúc của nó, kể cả huỷ; không mục nào khai một đường pending mà thiếu điểm kết thúc |
|
|
22
|
+
| Case 3 | Direction khai báo các vùng | `coverage.regions[]` không rỗng và phủ hết mọi mục trong `regionModel`, và mỗi mục gọi tên một idiom trong `knowledge/grammars/starci/playbook.md` cùng một composition công khai; không vùng nào phân giải về một cách sắp xếp trần |
|
|
23
|
+
| Case 4 | Composition đổi hình dạng khi không gian đổi | `coverage.responsive[]` không rỗng và mỗi nhánh gọi tên đúng một owner, là một container query công khai hoặc một viewport query công khai; không nhánh nào gọi tên thiết bị và không nhánh nào gọi tên hai owner |
|
|
24
|
+
| Case 5 | Tính năng có hơn một điều kiện | `coverage.states[]` không rỗng, mỗi mục gọi tên ý nghĩa trước rồi mới tới carrier, và không carrier nào đứng cho hai ý nghĩa |
|
|
25
|
+
| Case 6 | Một family hoặc ứng dụng thêm delta lên trên một owner công khai | Từng tầng được liệt kê riêng, để một hiệu ứng bị nhân đôi, một state selected bị mất, một trigger gọn bị mất hay một thông báo bị lặp đều quy được về đúng tầng gây ra nó |
|
|
26
|
+
|
|
27
|
+
Không phải rule này: việc đo đạc, chạy mẫu và đếm thông báo là công việc của operator audit; rule
|
|
28
|
+
này chỉ cố định điều mà receipt đã hứa.
|
|
29
|
+
|
|
30
|
+
## File này không quyết định
|
|
31
|
+
|
|
32
|
+
Trang có những vùng nào và ai sở hữu track thuộc [Layout](layout.vi.md), còn nhánh nào sống sót qua
|
|
33
|
+
reflow thuộc [Responsive](responsive.vi.md). Có những điều kiện nào và carrier nào giữ từng cái
|
|
34
|
+
thuộc [State](state.vi.md). Một lần kích hoạt làm gì thuộc [Action](action.vi.md), và người đọc được
|
|
35
|
+
nói gì ở mỗi kết cục thuộc [Feedback](feedback.vi.md). Những đường đã liệt kê có đứng vững sau khi
|
|
36
|
+
render không thuộc [Focus](../proof/focus.vi.md), [Accessibility](../proof/accessibility.vi.md) và
|
|
37
|
+
[Render truth](../proof/render-truth.vi.md).
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# Call to action composition
|
|
2
|
+
|
|
3
|
+
This file answers one question: within a decision region, which action deserves the emphasis, and
|
|
4
|
+
what does its emphasis promise the reader about the consequence?
|
|
5
|
+
|
|
6
|
+
A call to action is settled from consequence, never from a wish for a larger or brighter control.
|
|
7
|
+
The variant, the semantics, the blocked states, and the order of an action group are all decided
|
|
8
|
+
before the region is built, because each of them is a promise the rendered page then has to keep.
|
|
9
|
+
|
|
10
|
+
## CTA-1 — Emphasis follows consequence
|
|
11
|
+
|
|
12
|
+
Governs which control carries the strongest treatment.
|
|
13
|
+
|
|
14
|
+
| Case | When | Assert |
|
|
15
|
+
| --- | --- | --- |
|
|
16
|
+
| Case 1 | A decision region has one clear next action | Exactly one `Button variant="primary"` sits in that decision owner, carrying `onPress`, or `href` when the next step is a destination |
|
|
17
|
+
| Case 2 | Other actions in the same region are real alternatives | Each carries a weaker published variant from `secondary`, `tertiary`, `outline`, or `ghost` that states its actual consequence |
|
|
18
|
+
| Case 3 | The direction wants a bigger or brighter control without a change in consequence | The variant is unchanged, and no local button recipe appears against that control |
|
|
19
|
+
| Case 4 | The action sits in a dense toolbar, a card, or a page-level decision | `size` is bound through the published prop from that interaction context, and no vendor button is restyled to reach it |
|
|
20
|
+
|
|
21
|
+
Not this rule: counting how much dominant emphasis a whole page spends is ACCENT-1.
|
|
22
|
+
|
|
23
|
+
## CTA-2 — Destination or command
|
|
24
|
+
|
|
25
|
+
Governs which native thing the reader is actually operating.
|
|
26
|
+
|
|
27
|
+
| Case | When | Assert |
|
|
28
|
+
| --- | --- | --- |
|
|
29
|
+
| Case 1 | Activating the control takes the reader to a real address | `TextAction` or `Button` carries `href`, and the button shape changes only the paint |
|
|
30
|
+
| Case 2 | Activating the control changes application state | `Button`, or `TextAction` where the command reads as text, carries a real handler |
|
|
31
|
+
| Case 3 | The action carries a directional glyph | The glyph sits in `startContent` or `endContent`, and the visible text label remains |
|
|
32
|
+
| Case 4 | The direction wants an icon-only arrow as the continuation | The dominant decision keeps a visible text label, and every glyph on it is supporting |
|
|
33
|
+
|
|
34
|
+
Not this rule: how many effects one activation may produce is ACTION-1.
|
|
35
|
+
|
|
36
|
+
## CTA-3 — Unavailable, pending, and unresolved are three conditions
|
|
37
|
+
|
|
38
|
+
Governs which of three temporary blocks the control is actually in.
|
|
39
|
+
|
|
40
|
+
| Case | When | Assert |
|
|
41
|
+
| --- | --- | --- |
|
|
42
|
+
| Case 1 | The work cannot start at all, because permission or prerequisites are missing | `isDisabled` is bound on that control, and no pending carrier is |
|
|
43
|
+
| Case 2 | This control accepted work that has not settled | `isPending` is bound on that same control, its visible label and outer box are unchanged, and duplicate activation is refused |
|
|
44
|
+
| Case 3 | Initial content has not resolved and no action has been taken | `isSkeleton` is bound on the owner, and no pending carrier appears anywhere for that content |
|
|
45
|
+
| Case 4 | Some other request is in flight elsewhere on the page | Peer controls keep their own carriers, and no pending reaches a control that started nothing |
|
|
46
|
+
|
|
47
|
+
Not this rule: which owner holds pending once several controls are involved is ACTION-2.
|
|
48
|
+
|
|
49
|
+
## CTA-4 — Destructive consequence needs its own authority
|
|
50
|
+
|
|
51
|
+
Governs the final action that cannot be undone.
|
|
52
|
+
|
|
53
|
+
| Case | When | Assert |
|
|
54
|
+
| --- | --- | --- |
|
|
55
|
+
| Case 1 | An action irreversibly deletes, revokes, or discards valuable state | The receipt carries explicit destructive copy, a confirmation proportionate to the consequence, and a typed danger action treatment |
|
|
56
|
+
| Case 2 | The published `ButtonVariant` offers no danger value | A `GRAMMAR_REQUIRED` gap records it, and the CTA does not ship on the primary variant instead |
|
|
57
|
+
| Case 3 | The direction is tempted to import the vendor danger variant, or to add local red | No vendor danger variant and no local red appears against that control |
|
|
58
|
+
| Case 4 | The action is a reversible cancel or an ordinary negative outcome | It carries no destructive treatment and no confirmation earned by destructiveness |
|
|
59
|
+
|
|
60
|
+
## CTA-5 — Group order across widths
|
|
61
|
+
|
|
62
|
+
Governs the sequence of two or more actions that form one decision.
|
|
63
|
+
|
|
64
|
+
| Case | When | Assert |
|
|
65
|
+
| --- | --- | --- |
|
|
66
|
+
| Case 1 | A decision offers a dominant action, an alternative, and a way out | DOM order runs dominant decision, supporting alternative, then escape or recovery, as the product requires |
|
|
67
|
+
| Case 2 | The group wraps or stacks at a narrower width | Reading order and sequential focus order are identical at every width, and no CSS `order` reverses the group |
|
|
68
|
+
| Case 3 | A translated label grows well past its original length | The receipt names the longest label the group must hold, and the group wraps or stacks rather than overlapping at that length |
|
|
69
|
+
| Case 4 | Two actions live in separate regions | They belong to separate decision owners in the receipt, and neither ranks against the other |
|
|
70
|
+
|
|
71
|
+
## What this file does not decide
|
|
72
|
+
|
|
73
|
+
Which region holds the decision is [Layout](layout.md), and which anchor names it is
|
|
74
|
+
[Hierarchy](hierarchy.md). How many effects an activation may produce and who owns pending is
|
|
75
|
+
[Action](action.md). How scarce the dominant treatment is across the page is [Accent](accent.md),
|
|
76
|
+
and what happens after the action settles is [Feedback](feedback.md). What the receipt must
|
|
77
|
+
enumerate about these actions is [Coverage](coverage.md). Whether the rendered control is reachable,
|
|
78
|
+
named, and visibly focused is [Accessibility](../proof/accessibility.md) and
|
|
79
|
+
[Focus](../proof/focus.md).
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# Call to action composition
|
|
2
|
+
|
|
3
|
+
File này trả lời đúng một câu hỏi: trong một vùng quyết định, action nào xứng đáng được nhấn mạnh,
|
|
4
|
+
và điểm nhấn đó hứa với người đọc điều gì về hệ quả.
|
|
5
|
+
|
|
6
|
+
Call to action được chốt từ hệ quả, không bao giờ từ mong muốn có một control to hơn hay sáng hơn.
|
|
7
|
+
Variant, ngữ nghĩa, các trạng thái bị chặn và thứ tự của một nhóm action đều được quyết trước khi
|
|
8
|
+
dựng vùng, bởi mỗi thứ trong số đó là một lời hứa mà trang sau khi render phải giữ.
|
|
9
|
+
|
|
10
|
+
## CTA-1 — Điểm nhấn đi theo hệ quả
|
|
11
|
+
|
|
12
|
+
Chi phối control nào mang treatment mạnh nhất.
|
|
13
|
+
|
|
14
|
+
| Case | Dùng khi | Khẳng định |
|
|
15
|
+
| --- | --- | --- |
|
|
16
|
+
| Case 1 | Một vùng quyết định có đúng một bước kế tiếp rõ ràng | Đúng một `Button variant="primary"` nằm trong decision owner đó, mang `onPress`, hoặc mang `href` khi bước kế tiếp là một điểm đến |
|
|
17
|
+
| Case 2 | Các action khác trong cùng vùng là lựa chọn thay thế thật sự | Mỗi cái mang một variant công khai yếu hơn trong `secondary`, `tertiary`, `outline` hoặc `ghost`, nói đúng hệ quả thật của nó |
|
|
18
|
+
| Case 3 | Direction muốn control to hơn hoặc chói hơn mà hệ quả không đổi | Variant không đổi, và không công thức button cục bộ nào đứng cạnh control đó |
|
|
19
|
+
| Case 4 | Action nằm trong toolbar dày, trong card, hay ở tầm quyết định của cả trang | `size` được gắn qua prop công khai theo đúng bối cảnh tương tác đó, và không button vendor nào bị sơn lại để đạt được nó |
|
|
20
|
+
|
|
21
|
+
Không phải rule này: đếm xem cả trang tiêu bao nhiêu điểm nhấn chủ đạo thuộc ACCENT-1.
|
|
22
|
+
|
|
23
|
+
## CTA-2 — Điểm đến hay câu lệnh
|
|
24
|
+
|
|
25
|
+
Chi phối việc người đọc thật ra đang thao tác với thứ native nào.
|
|
26
|
+
|
|
27
|
+
| Case | Dùng khi | Khẳng định |
|
|
28
|
+
| --- | --- | --- |
|
|
29
|
+
| Case 1 | Kích hoạt sẽ đưa người đọc tới một địa chỉ thật | `TextAction` hoặc `Button` mang `href`, và hình dạng nút chỉ đổi phần sơn |
|
|
30
|
+
| Case 2 | Kích hoạt sẽ thay đổi state của ứng dụng | `Button`, hoặc `TextAction` khi câu lệnh cần đọc như chữ, mang một handler thật |
|
|
31
|
+
| Case 3 | Action mang một glyph chỉ hướng | Glyph nằm trong `startContent` hoặc `endContent`, và nhãn chữ nhìn thấy được vẫn ở lại |
|
|
32
|
+
| Case 4 | Direction muốn một mũi tên không kèm chữ làm bước tiếp | Quyết định chủ đạo giữ nhãn chữ nhìn thấy được, và mọi glyph trên nó chỉ là phần bổ trợ |
|
|
33
|
+
|
|
34
|
+
Không phải rule này: một lần kích hoạt được phép sinh ra bao nhiêu hiệu ứng thuộc ACTION-1.
|
|
35
|
+
|
|
36
|
+
## CTA-3 — Không dùng được, đang chạy và chưa giải quyết là ba điều kiện
|
|
37
|
+
|
|
38
|
+
Chi phối việc control đang thật sự nằm ở dạng chặn nào trong ba dạng.
|
|
39
|
+
|
|
40
|
+
| Case | Dùng khi | Khẳng định |
|
|
41
|
+
| --- | --- | --- |
|
|
42
|
+
| Case 1 | Việc không thể bắt đầu, vì thiếu quyền hoặc thiếu tiền đề | `isDisabled` được gắn trên control đó, và không carrier pending nào được gắn |
|
|
43
|
+
| Case 2 | Chính control này đã nhận việc và việc chưa xong | `isPending` được gắn trên đúng control đó, nhãn nhìn thấy được và khung ngoài không đổi, và kích hoạt lần hai bị từ chối |
|
|
44
|
+
| Case 3 | Nội dung ban đầu chưa giải quyết và chưa ai bấm gì | `isSkeleton` được gắn trên owner, và không carrier pending nào xuất hiện ở đâu cho nội dung đó |
|
|
45
|
+
| Case 4 | Có một request khác đang chạy ở chỗ khác trên trang | Các control ngang hàng giữ carrier của riêng chúng, và không pending nào chạm tới một control chưa khởi động gì |
|
|
46
|
+
|
|
47
|
+
Không phải rule này: khi nhiều control cùng tham gia thì ai giữ pending thuộc ACTION-2.
|
|
48
|
+
|
|
49
|
+
## CTA-4 — Hệ quả huỷ hoại cần authority riêng
|
|
50
|
+
|
|
51
|
+
Chi phối action cuối cùng mà không thể hoàn tác.
|
|
52
|
+
|
|
53
|
+
| Case | Dùng khi | Khẳng định |
|
|
54
|
+
| --- | --- | --- |
|
|
55
|
+
| Case 1 | Một action xoá, thu hồi hoặc vứt bỏ vĩnh viễn thứ có giá trị | Receipt mang copy nêu rõ tính huỷ hoại, một bước xác nhận tương xứng với hệ quả, và một treatment action danger có kiểu |
|
|
56
|
+
| Case 2 | `ButtonVariant` công khai chưa có giá trị danger | Một gap `GRAMMAR_REQUIRED` ghi nhận điều đó, và CTA không được đưa lên variant primary để thay thế |
|
|
57
|
+
| Case 3 | Direction bị cám dỗ import variant danger của vendor, hoặc thêm màu đỏ cục bộ | Không variant danger của vendor và không màu đỏ cục bộ nào đứng cạnh control đó |
|
|
58
|
+
| Case 4 | Action là một thao tác huỷ có thể hoàn tác hoặc một kết cục tiêu cực thường | Nó không mang treatment huỷ hoại và không mang bước xác nhận sinh ra từ tính huỷ hoại |
|
|
59
|
+
|
|
60
|
+
## CTA-5 — Thứ tự nhóm qua các bề rộng
|
|
61
|
+
|
|
62
|
+
Chi phối trình tự của hai action trở lên cùng tạo nên một quyết định.
|
|
63
|
+
|
|
64
|
+
| Case | Dùng khi | Khẳng định |
|
|
65
|
+
| --- | --- | --- |
|
|
66
|
+
| Case 1 | Một quyết định có action chủ đạo, một lựa chọn thay thế và một lối ra | Thứ tự DOM chạy từ quyết định chủ đạo, tới lựa chọn thay thế, rồi tới lối ra hoặc lối phục hồi, tuỳ sản phẩm yêu cầu |
|
|
67
|
+
| Case 2 | Nhóm wrap hoặc xếp chồng ở bề rộng hẹp hơn | Thứ tự đọc và thứ tự focus tuần tự trùng khít nhau ở mọi bề rộng, và không CSS `order` nào đảo nhóm |
|
|
68
|
+
| Case 3 | Một nhãn đã dịch dài hơn hẳn bản gốc | Receipt gọi tên nhãn dài nhất mà nhóm phải chứa, và ở độ dài đó nhóm wrap hoặc xếp chồng chứ không chồng lấn |
|
|
69
|
+
| Case 4 | Hai action nằm ở hai vùng khác nhau | Chúng thuộc hai decision owner riêng trong receipt, và không cái nào so cấp với cái kia |
|
|
70
|
+
|
|
71
|
+
## File này không quyết định
|
|
72
|
+
|
|
73
|
+
Vùng nào chứa quyết định thuộc [Layout](layout.vi.md), và anchor nào gọi tên vùng thuộc
|
|
74
|
+
[Hierarchy](hierarchy.vi.md). Một lần kích hoạt được sinh bao nhiêu hiệu ứng và ai giữ pending thuộc
|
|
75
|
+
[Action](action.vi.md). Treatment chủ đạo khan hiếm tới đâu trên cả trang thuộc
|
|
76
|
+
[Accent](accent.vi.md), và sau khi action xong thì nói gì thuộc [Feedback](feedback.vi.md). Receipt
|
|
77
|
+
phải liệt kê những gì về các action này thuộc [Coverage](coverage.vi.md). Control sau khi render có
|
|
78
|
+
chạm tới được, có tên và có focus nhìn thấy được không thuộc
|
|
79
|
+
[Accessibility](../proof/accessibility.vi.md) và [Focus](../proof/focus.vi.md).
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Feedback composition
|
|
2
|
+
|
|
3
|
+
This file answers one question: when something fails, succeeds, or needs correcting, who says so,
|
|
4
|
+
and how small is that owner?
|
|
5
|
+
|
|
6
|
+
Feedback is decided at the smallest place that can actually be corrected or recovered. A failure
|
|
7
|
+
announced further out than it can be fixed makes the reader hunt for the cause, and a page-level
|
|
8
|
+
recovery for a single failed panel throws away work that never failed.
|
|
9
|
+
|
|
10
|
+
## FEEDBACK-1 — Correct at the nearest owner
|
|
11
|
+
|
|
12
|
+
Governs where a validation failure lives.
|
|
13
|
+
|
|
14
|
+
| Case | When | Assert |
|
|
15
|
+
| --- | --- | --- |
|
|
16
|
+
| Case 1 | One field has a current validation failure the reader can fix at that field | `Input.errorMessage` on that field carries the failure and the correction, and `isError` is bound to the same invalid fact |
|
|
17
|
+
| Case 2 | The field has standing guidance that is true whether or not it failed | That guidance sits in `hint`, and it does not appear or disappear with validation |
|
|
18
|
+
| Case 3 | The same failure would also be summarised above the form | Exactly one owner states that failure, and it is the field |
|
|
19
|
+
| Case 4 | The message is navigation or general status rather than a rejected value | No validation carrier holds it; it resolves to a status owner elsewhere |
|
|
20
|
+
| Case 5 | The value changes, or validation runs again | The error updates or clears with the fact, and the reader's entry survives unchanged |
|
|
21
|
+
|
|
22
|
+
## FEEDBACK-2 — Recover at the smallest actionable owner
|
|
23
|
+
|
|
24
|
+
Governs where a retry lives.
|
|
25
|
+
|
|
26
|
+
| Case | When | Assert |
|
|
27
|
+
| --- | --- | --- |
|
|
28
|
+
| Case 1 | One region is empty or failed and has a real next step | `EmptyNotice` names the affected region and carries `actionLabel` and `onAction` for that step, with `description` optional |
|
|
29
|
+
| Case 2 | The recovery action has accepted work | `isActionPending` is bound while that action runs, and to no other action |
|
|
30
|
+
| Case 3 | A page-level reload would be simpler to wire | The recovery is scoped to the operation that failed; no page-level reload stands in for one failed region |
|
|
31
|
+
| Case 4 | Repeating the operation is not safe, as with a purchase | The recovery is a distinct safe operation backed by authority, not a repeat of the unsafe one |
|
|
32
|
+
| Case 5 | The reader has unsaved work elsewhere on the page | Only the failed region is replaced, and work outside it survives the recovery |
|
|
33
|
+
|
|
34
|
+
## FEEDBACK-3 — Settlement must be known before it is claimed
|
|
35
|
+
|
|
36
|
+
Governs the moment a result may be stated.
|
|
37
|
+
|
|
38
|
+
| Case | When | Assert |
|
|
39
|
+
| --- | --- | --- |
|
|
40
|
+
| Case 1 | A command is waiting on a result | Pending clears only on a real settlement, and the result copy names the outcome that actually arrived |
|
|
41
|
+
| Case 2 | A non-urgent result should be announced | `Text live="polite"` sits on the smallest owner of that status |
|
|
42
|
+
| Case 3 | The message is genuinely urgent and interrupting is warranted | `live="assertive"` is bound only there, and to nothing else in the tree |
|
|
43
|
+
| Case 4 | The same result would appear in two places | Exactly one announcement owner holds that result, and it updates only when the result changes |
|
|
44
|
+
| Case 5 | The message describes navigation | It is produced by an actual navigation effect, and it carries no error semantics unless the navigation itself failed |
|
|
45
|
+
| Case 6 | The result matters after the moment passes | A durable owner holds it after the announcement, where the reader can review or act on it |
|
|
46
|
+
|
|
47
|
+
Retired: FEEDBACK-4 is retired into COVERAGE-1 and is not reused; the address stays spent.
|
|
48
|
+
|
|
49
|
+
## What this file does not decide
|
|
50
|
+
|
|
51
|
+
Who owns pending among several controls is [Action](action.md), and which conditions exist at all is
|
|
52
|
+
[State](state.md). Which action the reader is being pushed towards is [CTA](cta.md). What the
|
|
53
|
+
receipt must enumerate about these outcome paths is [Coverage](coverage.md). Whether a message is
|
|
54
|
+
programmatically related to its field, and whether it is announced once, is
|
|
55
|
+
[Accessibility](../proof/accessibility.md) and [Render truth](../proof/render-truth.md).
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Feedback composition
|
|
2
|
+
|
|
3
|
+
File này trả lời đúng một câu hỏi: khi có thứ gì đó hỏng, thành công, hoặc cần sửa, ai là người
|
|
4
|
+
thông báo, và owner đó nhỏ tới đâu.
|
|
5
|
+
|
|
6
|
+
Feedback được chốt ở chỗ nhỏ nhất mà thật sự sửa hoặc phục hồi được. Một lỗi báo ở nơi xa hơn chỗ có
|
|
7
|
+
thể sửa nó sẽ bắt người đọc đi tìm nguyên nhân, còn một lối phục hồi ở tầm cả trang cho một panel
|
|
8
|
+
hỏng sẽ ném đi cả phần công việc chưa từng hỏng.
|
|
9
|
+
|
|
10
|
+
## FEEDBACK-1 — Sửa ở owner gần nhất
|
|
11
|
+
|
|
12
|
+
Chi phối chỗ ở của một lỗi validation.
|
|
13
|
+
|
|
14
|
+
| Case | Dùng khi | Khẳng định |
|
|
15
|
+
| --- | --- | --- |
|
|
16
|
+
| Case 1 | Một field đang có lỗi validation mà người đọc sửa được ngay tại field đó | `Input.errorMessage` trên chính field đó mang cả lỗi lẫn cách sửa, và `isError` gắn vào đúng dữ kiện không hợp lệ ấy |
|
|
17
|
+
| Case 2 | Field có phần hướng dẫn thường trực, đúng dù nó có lỗi hay không | Phần hướng dẫn đó nằm trong `hint`, và nó không xuất hiện rồi biến mất theo validation |
|
|
18
|
+
| Case 3 | Cùng lỗi đó còn được tóm tắt lại ở phía trên form | Đúng một owner nêu lỗi đó, và owner ấy là field |
|
|
19
|
+
| Case 4 | Thông điệp là điều hướng hoặc trạng thái chung chứ không phải một giá trị bị từ chối | Không carrier validation nào giữ nó; nó phân giải về một owner status ở chỗ khác |
|
|
20
|
+
| Case 5 | Giá trị thay đổi, hoặc validation chạy lại | Lỗi được cập nhật hoặc gỡ đi theo dữ kiện, và phần người đọc đã nhập còn nguyên |
|
|
21
|
+
|
|
22
|
+
## FEEDBACK-2 — Phục hồi ở owner hành động nhỏ nhất
|
|
23
|
+
|
|
24
|
+
Chi phối chỗ ở của một nút thử lại.
|
|
25
|
+
|
|
26
|
+
| Case | Dùng khi | Khẳng định |
|
|
27
|
+
| --- | --- | --- |
|
|
28
|
+
| Case 1 | Một vùng rỗng hoặc vùng lỗi có một bước kế tiếp thật | `EmptyNotice` gọi tên đúng vùng bị ảnh hưởng và mang `actionLabel` cùng `onAction` cho bước đó, `description` là tuỳ chọn |
|
|
29
|
+
| Case 2 | Action phục hồi đã nhận việc | `isActionPending` được gắn trong lúc action đó chạy, và không gắn cho action nào khác |
|
|
30
|
+
| Case 3 | Nối một nút tải lại cả trang thì dễ hơn | Lối phục hồi được giới hạn đúng vào thao tác đã hỏng; không nút tải lại cả trang nào đứng thay cho một vùng hỏng |
|
|
31
|
+
| Case 4 | Lặp lại thao tác là không an toàn, như với một giao dịch mua | Lối phục hồi là một thao tác an toàn riêng biệt có authority chống lưng, không phải lần lặp lại thao tác không an toàn |
|
|
32
|
+
| Case 5 | Người đọc còn công việc chưa lưu ở chỗ khác trên trang | Chỉ vùng đã hỏng bị thay, và phần việc ngoài nó sống sót qua lần phục hồi |
|
|
33
|
+
|
|
34
|
+
## FEEDBACK-3 — Phải biết việc đã kết thúc rồi mới được nói
|
|
35
|
+
|
|
36
|
+
Chi phối thời điểm được phép nêu một kết quả.
|
|
37
|
+
|
|
38
|
+
| Case | Dùng khi | Khẳng định |
|
|
39
|
+
| --- | --- | --- |
|
|
40
|
+
| Case 1 | Một câu lệnh đang chờ kết quả | Pending chỉ gỡ khi có một kết thúc thật, và copy kết quả gọi tên đúng kết cục đã về |
|
|
41
|
+
| Case 2 | Một kết quả không khẩn cần được đọc lên | `Text live="polite"` nằm trên owner nhỏ nhất của status đó |
|
|
42
|
+
| Case 3 | Thông điệp thật sự khẩn và việc cắt ngang là chính đáng | `live="assertive"` chỉ được gắn ở đó, và không gắn ở đâu khác trong cây |
|
|
43
|
+
| Case 4 | Cùng một kết quả sẽ xuất hiện ở hai chỗ | Đúng một owner thông báo giữ kết quả đó, và nó chỉ cập nhật khi kết quả đổi |
|
|
44
|
+
| Case 5 | Thông điệp mô tả việc điều hướng | Nó sinh ra từ một hiệu ứng điều hướng thật, và nó không mang ngữ nghĩa lỗi trừ khi chính việc điều hướng đã hỏng |
|
|
45
|
+
| Case 6 | Kết quả còn quan trọng sau khi khoảnh khắc đó trôi qua | Một owner bền giữ nó sau lần thông báo, nơi người đọc xem lại hoặc hành động tiếp được |
|
|
46
|
+
|
|
47
|
+
Retired: FEEDBACK-4 đã nghỉ, gộp vào COVERAGE-1, và số này không được dùng lại; địa chỉ đó coi như đã tiêu.
|
|
48
|
+
|
|
49
|
+
## File này không quyết định
|
|
50
|
+
|
|
51
|
+
Khi nhiều control cùng tham gia thì ai giữ pending thuộc [Action](action.vi.md), và có những điều
|
|
52
|
+
kiện nào thuộc [State](state.vi.md). Người đọc đang được đẩy về phía action nào thuộc
|
|
53
|
+
[CTA](cta.vi.md). Receipt phải liệt kê những gì về các đường kết cục này thuộc
|
|
54
|
+
[Coverage](coverage.vi.md). Một thông điệp có được gắn về đúng field của nó không, và có được đọc
|
|
55
|
+
lên đúng một lần không, thuộc [Accessibility](../proof/accessibility.vi.md) và
|
|
56
|
+
[Render truth](../proof/render-truth.vi.md).
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# Hierarchy composition
|
|
2
|
+
|
|
3
|
+
This file answers one question: given a piece of business meaning, which information rank does it
|
|
4
|
+
receive, and where does it sit relative to everything else in its region?
|
|
5
|
+
|
|
6
|
+
Hierarchy is decided from the job the content does, never from how prominent the direction wishes it
|
|
7
|
+
looked. Rank is carried by a published semantic owner, so the outline a screen reader walks and the
|
|
8
|
+
outline a reader sees are the same outline.
|
|
9
|
+
|
|
10
|
+
## HIERARCHY-1 — Rank comes from the job, not the look
|
|
11
|
+
|
|
12
|
+
Governs which semantic owner carries a piece of content.
|
|
13
|
+
|
|
14
|
+
| Case | When | Assert |
|
|
15
|
+
| --- | --- | --- |
|
|
16
|
+
| Case 1 | Content names a page or a section | `Heading` carries it, at the level the outline requires |
|
|
17
|
+
| Case 2 | Content explains, or states a neutral fact | `Text` in its default role carries it, with no state owner attached |
|
|
18
|
+
| Case 3 | Content reports a compact outcome backed by authority | `Badge`, or another published state owner for that outcome, carries it |
|
|
19
|
+
| Case 4 | Content reports a verified numeric completion | `Progress` carries it, with a label and value that describe the same verified measurement |
|
|
20
|
+
| Case 5 | Something feels important but matches no published role | The receipt names the job before any owner is bound, and no local type utility stands in for a rank |
|
|
21
|
+
|
|
22
|
+
Not this rule: how much emphasis paint that rank receives is ACCENT-1.
|
|
23
|
+
|
|
24
|
+
## HIERARCHY-2 — One strongest anchor per region
|
|
25
|
+
|
|
26
|
+
Governs how many things may name the same region.
|
|
27
|
+
|
|
28
|
+
| Case | When | Assert |
|
|
29
|
+
| --- | --- | --- |
|
|
30
|
+
| Case 1 | A region carries a name plus supporting copy, facts, statuses, or actions | Exactly one strongest semantic anchor names the region's job, through `SectionHeader`, `Heading`, or a labelled surface |
|
|
31
|
+
| Case 2 | Two candidates both look like the region's name | Either the receipt lists two peer regions each with its own anchor, or one candidate carries a weaker rank |
|
|
32
|
+
| Case 3 | A status wants to be louder than the thing it describes | The status ranks below the name it qualifies |
|
|
33
|
+
| Case 4 | Independent peer regions sit side by side | Each region's anchor is settled within that region; no anchor ranks against another region's anchor |
|
|
34
|
+
|
|
35
|
+
Not this rule: which region comes first on the page is LAYOUT-1.
|
|
36
|
+
|
|
37
|
+
## HIERARCHY-3 — Reading order equals task dependency
|
|
38
|
+
|
|
39
|
+
Governs the sequence in which meaning is delivered.
|
|
40
|
+
|
|
41
|
+
| Case | When | Assert |
|
|
42
|
+
| --- | --- | --- |
|
|
43
|
+
| Case 1 | The reader needs context before making a choice | DOM order runs prerequisite, decision, consequence, then support |
|
|
44
|
+
| Case 2 | A layout would read better with the pieces rearranged at one width | The composition differs at that width and the meaning order does not; no CSS `order` reverses meaning |
|
|
45
|
+
| Case 3 | Help text explains a field or a task | It follows the thing it explains in DOM order and in the accessibility tree |
|
|
46
|
+
| Case 4 | A result is produced by an action on the same surface | The action precedes the result it produces, at every width |
|
|
47
|
+
|
|
48
|
+
Not this rule: whether sequential keyboard focus actually follows this order once rendered is
|
|
49
|
+
FOCUS-2.
|
|
50
|
+
|
|
51
|
+
## HIERARCHY-4 — Facts, measurement, and outcome are separate ranks
|
|
52
|
+
|
|
53
|
+
Governs the boundary between what is merely true, what is measured, and what has been decided.
|
|
54
|
+
|
|
55
|
+
| Case | When | Assert |
|
|
56
|
+
| --- | --- | --- |
|
|
57
|
+
| Case 1 | The content is a neutral fact with no claim attached | `Text` carries it, with no status and no success treatment |
|
|
58
|
+
| Case 2 | The content is a measurement between 0 and 100 backed by authority | `Progress` carries it, and its label and value describe the same verified measurement |
|
|
59
|
+
| Case 3 | The measurement has not resolved yet | `Progress isSkeleton` carries it, and no zero value is rendered in its place |
|
|
60
|
+
| Case 4 | The content is an outcome someone can act on | An explicit outcome word plus its state owner carries it; no colour alone states the outcome |
|
|
61
|
+
| Case 5 | The direction is tempted to let one rank imply another | No filled bar stands for a completion, and no ordinary fact takes a warning treatment |
|
|
62
|
+
|
|
63
|
+
## HIERARCHY-5 — Rank survives reflow, loading, and lost colour
|
|
64
|
+
|
|
65
|
+
Governs the conditions under which the chosen hierarchy must still hold.
|
|
66
|
+
|
|
67
|
+
| Case | When | Assert |
|
|
68
|
+
| --- | --- | --- |
|
|
69
|
+
| Case 1 | The region stacks at a narrow width | Heading order and the count of strongest anchors are identical to the wide branch; only placement differs |
|
|
70
|
+
| Case 2 | Content is still loading | The skeleton carries the same selected role as the resolved content, so no rank changes when real content arrives |
|
|
71
|
+
| Case 3 | Optional content is missing in some states | Every rank present in one state has a carrier that survives the states where the optional content is absent |
|
|
72
|
+
| Case 4 | Colour is removed, or the viewer is in forced colours | Every rank distinction still resolves to a semantic or structural cue |
|
|
73
|
+
|
|
74
|
+
Not this rule: capturing the zoomed, forced-colour, and colour-removed renders is the audit
|
|
75
|
+
operator's work.
|
|
76
|
+
|
|
77
|
+
## What this file does not decide
|
|
78
|
+
|
|
79
|
+
Which regions exist and who owns their tracks is [Layout](layout.md). How rank behaves as space
|
|
80
|
+
changes is [Responsive](responsive.md). Which action is dominant is [CTA](cta.md), and how scarce
|
|
81
|
+
emphasis is spent is [Accent](accent.md). The rendered accessibility tree that proves this outline
|
|
82
|
+
is [Accessibility](../proof/accessibility.md), and agreement between rank and product truth is
|
|
83
|
+
[Render truth](../proof/render-truth.md).
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# Hierarchy composition
|
|
2
|
+
|
|
3
|
+
File này trả lời đúng một câu hỏi: một mảng ý nghĩa business thì nhận cấp độ thông tin nào, và nó
|
|
4
|
+
đứng ở đâu so với mọi thứ còn lại trong vùng của nó.
|
|
5
|
+
|
|
6
|
+
Cấp độ được quyết từ công việc mà nội dung đang làm, không bao giờ từ mong muốn cho nó trông nổi bật
|
|
7
|
+
hơn. Cấp độ do một semantic owner công khai mang, nhờ vậy dàn bài mà trình đọc màn hình đi qua và
|
|
8
|
+
dàn bài mà mắt người đọc thấy vẫn là cùng một dàn bài.
|
|
9
|
+
|
|
10
|
+
## HIERARCHY-1 — Cấp độ đến từ công việc, không đến từ vẻ ngoài
|
|
11
|
+
|
|
12
|
+
Chi phối việc semantic owner nào mang một mảng nội dung.
|
|
13
|
+
|
|
14
|
+
| Case | Dùng khi | Khẳng định |
|
|
15
|
+
| --- | --- | --- |
|
|
16
|
+
| Case 1 | Nội dung đặt tên cho một trang hoặc một section | `Heading` mang nó, ở đúng level mà dàn bài yêu cầu |
|
|
17
|
+
| Case 2 | Nội dung giải thích, hoặc nêu một sự kiện trung tính | `Text` ở vai trò mặc định mang nó, không gắn kèm state owner nào |
|
|
18
|
+
| Case 3 | Nội dung báo một kết cục ngắn gọn có authority chống lưng | `Badge`, hoặc một state owner công khai khác cho kết cục đó, mang nó |
|
|
19
|
+
| Case 4 | Nội dung báo một mức hoàn thành đã được kiểm chứng | `Progress` mang nó, với label và value cùng mô tả một phép đo đã kiểm chứng |
|
|
20
|
+
| Case 5 | Có thứ trông quan trọng nhưng không khớp vai trò công khai nào | Receipt gọi tên công việc của nó trước khi gắn owner, và không utility type cục bộ nào đứng thay cho một cấp độ |
|
|
21
|
+
|
|
22
|
+
Không phải rule này: cấp độ đó nhận bao nhiêu điểm nhấn thuộc ACCENT-1.
|
|
23
|
+
|
|
24
|
+
## HIERARCHY-2 — Mỗi vùng một anchor mạnh nhất
|
|
25
|
+
|
|
26
|
+
Chi phối số thứ được phép đặt tên cho cùng một vùng.
|
|
27
|
+
|
|
28
|
+
| Case | Dùng khi | Khẳng định |
|
|
29
|
+
| --- | --- | --- |
|
|
30
|
+
| Case 1 | Một vùng có tên gọi cộng với phần bổ trợ, dữ kiện, trạng thái hoặc action | Đúng một anchor ngữ nghĩa mạnh nhất gọi tên công việc của vùng, qua `SectionHeader`, `Heading` hoặc một surface có nhãn |
|
|
31
|
+
| Case 2 | Hai ứng viên cùng trông như tên của vùng | Hoặc receipt liệt kê hai vùng ngang hàng, mỗi vùng một anchor, hoặc một ứng viên mang cấp độ yếu hơn |
|
|
32
|
+
| Case 3 | Một trạng thái muốn to tiếng hơn thứ mà nó mô tả | Trạng thái xếp dưới cái tên mà nó bổ nghĩa |
|
|
33
|
+
| Case 4 | Các vùng ngang hàng độc lập nằm cạnh nhau | Anchor của mỗi vùng được chốt trong chính vùng đó; không anchor nào so cấp với anchor của vùng khác |
|
|
34
|
+
|
|
35
|
+
Không phải rule này: vùng nào đứng trước trên trang thuộc LAYOUT-1.
|
|
36
|
+
|
|
37
|
+
## HIERARCHY-3 — Thứ tự đọc bằng đúng thứ tự phụ thuộc của nhiệm vụ
|
|
38
|
+
|
|
39
|
+
Chi phối trình tự mà ý nghĩa được trao cho người đọc.
|
|
40
|
+
|
|
41
|
+
| Case | Dùng khi | Khẳng định |
|
|
42
|
+
| --- | --- | --- |
|
|
43
|
+
| Case 1 | Người đọc cần bối cảnh trước khi ra lựa chọn | Thứ tự DOM chạy tiền đề, quyết định, hệ quả, rồi phần bổ trợ |
|
|
44
|
+
| Case 2 | Ở một bề rộng nào đó bố cục sẽ đọc mượt hơn nếu đảo các mảnh | Composition khác đi ở bề rộng đó còn thứ tự ý nghĩa thì không; không CSS `order` nào đảo ngược ý nghĩa |
|
|
45
|
+
| Case 3 | Có phần trợ giúp giải thích một field hoặc một nhiệm vụ | Nó đứng sau thứ mà nó giải thích, trong thứ tự DOM và trong accessibility tree |
|
|
46
|
+
| Case 4 | Một kết quả do một action trên cùng surface sinh ra | Action đứng trước kết quả mà nó sinh ra, ở mọi bề rộng |
|
|
47
|
+
|
|
48
|
+
Không phải rule này: chuyện focus tuần tự có thật sự đi theo thứ tự này sau khi render thuộc FOCUS-2.
|
|
49
|
+
|
|
50
|
+
## HIERARCHY-4 — Dữ kiện, phép đo và kết cục là ba cấp độ khác nhau
|
|
51
|
+
|
|
52
|
+
Chi phối ranh giới giữa cái chỉ đơn thuần là đúng, cái đã được đo, và cái đã được kết luận.
|
|
53
|
+
|
|
54
|
+
| Case | Dùng khi | Khẳng định |
|
|
55
|
+
| --- | --- | --- |
|
|
56
|
+
| Case 1 | Nội dung là một dữ kiện trung tính, không kèm tuyên bố nào | `Text` mang nó, không kèm trạng thái và không kèm treatment thành công |
|
|
57
|
+
| Case 2 | Nội dung là một phép đo từ 0 đến 100 có authority chống lưng | `Progress` mang nó, và label cùng value mô tả đúng một phép đo đã kiểm chứng |
|
|
58
|
+
| Case 3 | Phép đo chưa giải quyết xong | `Progress isSkeleton` mang nó, và không giá trị không nào được render thay chỗ |
|
|
59
|
+
| Case 4 | Nội dung là một kết cục mà người đọc có thể hành động theo | Một từ nêu kết cục rõ ràng cùng state owner của nó mang việc đó; không màu nào tự mình nêu kết cục |
|
|
60
|
+
| Case 5 | Direction bị cám dỗ để một cấp độ ngụ ý một cấp độ khác | Không thanh đầy nào đứng cho một mức hoàn thành, và không dữ kiện bình thường nào nhận treatment cảnh báo |
|
|
61
|
+
|
|
62
|
+
## HIERARCHY-5 — Cấp độ sống sót qua reflow, qua lúc tải và qua khi mất màu
|
|
63
|
+
|
|
64
|
+
Chi phối những điều kiện mà phân cấp đã chọn vẫn phải đứng vững.
|
|
65
|
+
|
|
66
|
+
| Case | Dùng khi | Khẳng định |
|
|
67
|
+
| --- | --- | --- |
|
|
68
|
+
| Case 1 | Vùng xếp chồng lại ở bề rộng hẹp | Thứ tự heading và số anchor mạnh nhất trùng khít nhánh rộng; chỉ vị trí là khác |
|
|
69
|
+
| Case 2 | Nội dung còn đang tải | Skeleton mang đúng vai trò đã chọn của nội dung thật, nên không cấp độ nào nhảy khi nội dung thật về |
|
|
70
|
+
| Case 3 | Nội dung tuỳ chọn vắng mặt ở một số trạng thái | Mọi cấp độ có mặt ở một trạng thái đều có carrier sống sót qua các trạng thái mà nội dung tuỳ chọn vắng mặt |
|
|
71
|
+
| Case 4 | Màu bị bỏ đi, hoặc người xem đang ở chế độ forced colors | Mọi khác biệt cấp độ vẫn phân giải về một dấu hiệu ngữ nghĩa hoặc cấu trúc |
|
|
72
|
+
|
|
73
|
+
Không phải rule này: việc chụp lại các bản render đã zoom, forced colors và đã bỏ màu là công việc
|
|
74
|
+
của operator audit.
|
|
75
|
+
|
|
76
|
+
## File này không quyết định
|
|
77
|
+
|
|
78
|
+
Trang có những vùng nào và ai sở hữu track thuộc [Layout](layout.vi.md). Cấp độ hành xử ra sao khi
|
|
79
|
+
không gian đổi thuộc [Responsive](responsive.vi.md). Action nào là chủ đạo thuộc [CTA](cta.vi.md),
|
|
80
|
+
và phần nhấn mạnh khan hiếm tiêu ở đâu thuộc [Accent](accent.vi.md). Cây accessibility chứng minh
|
|
81
|
+
dàn bài này nằm ở [Accessibility](../proof/accessibility.vi.md), còn sự khớp nhau giữa cấp độ và sự
|
|
82
|
+
thật sản phẩm nằm ở [Render truth](../proof/render-truth.vi.md).
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# Layout composition
|
|
2
|
+
|
|
3
|
+
This file answers one question: before any DOM exists, which visible task regions does this page
|
|
4
|
+
have, and who owns each one?
|
|
5
|
+
|
|
6
|
+
Layout is the first composition decision. It settles how many regions the reader sees, which
|
|
7
|
+
published composition owns each region's tracks and scrolling, and what happens to a region that
|
|
8
|
+
leaves normal flow or disappears. Everything measured after the page renders belongs to the audit
|
|
9
|
+
operator, not to this file.
|
|
10
|
+
|
|
11
|
+
## Owner vocabulary
|
|
12
|
+
|
|
13
|
+
| Owner | Meaning |
|
|
14
|
+
| --- | --- |
|
|
15
|
+
| A composition name | `@starci/grammar/common` already owns that region's tracks and geometry |
|
|
16
|
+
| `App` | The direction supplies content, state, and labels into a published slot |
|
|
17
|
+
| `—` | No published composition covers this region; the direction records the gap |
|
|
18
|
+
|
|
19
|
+
Reaching for a vendor grid where a composition name is the owner is `APP_REIMPLEMENTATION`.
|
|
20
|
+
Reaching for one where the owner is `—` is `COMMON_CAPABILITY_MISSING`, and the answer is to add the
|
|
21
|
+
reusable composition, not to author an application grid.
|
|
22
|
+
|
|
23
|
+
## LAYOUT-1 — Which regions exist at all
|
|
24
|
+
|
|
25
|
+
Governs how many visible task regions the page carries and what justifies each one.
|
|
26
|
+
|
|
27
|
+
| Case | When | Assert |
|
|
28
|
+
| --- | --- | --- |
|
|
29
|
+
| Case 1 | Business content has one task and no supporting material | The receipt lists exactly one dominant region, and every further region it lists carries a named task role |
|
|
30
|
+
| Case 2 | A primary task has support the reader consults alongside it | The support is a rail, and the receipt names the task role that earns it |
|
|
31
|
+
| Case 3 | Routed page content needs shell chrome around it | `WorkspaceShell` owns the shell regions, and exactly one element is named as the main landmark |
|
|
32
|
+
| Case 4 | Destinations need to be grouped and browsed | `Sidebar` owns the grouping; the receipt supplies only destinations and labels into it |
|
|
33
|
+
| Case 5 | A conversation needs a composer that stays put | `ChatWorkspace` owns the pairing of conversation and composer |
|
|
34
|
+
| Case 6 | The required arrangement has no published composition | A `GRAMMAR_REQUIRED` gap names the missing composition, and no substitute arrangement appears in the tree |
|
|
35
|
+
|
|
36
|
+
Not this rule: which of several regions carries the strongest anchor is HIERARCHY-2.
|
|
37
|
+
|
|
38
|
+
## LAYOUT-2 — Every region's owner is a published composition
|
|
39
|
+
|
|
40
|
+
Governs which code decides a region's tracks, not which content sits inside them.
|
|
41
|
+
|
|
42
|
+
| Case | When | Assert |
|
|
43
|
+
| --- | --- | --- |
|
|
44
|
+
| Case 1 | A primary column sits beside a support column | `PrimaryRailLayout` owns both tracks; the receipt names only `railWidth` and `align`, and no track formula appears against that region |
|
|
45
|
+
| Case 2 | Shell regions and the main landmark must be named | `WorkspaceShell` owns the slots, and the receipt supplies `primaryLabel` |
|
|
46
|
+
| Case 3 | A conversation surface needs a bounded height | `ChatWorkspace` owns the bound, and the host supplies the height it requires |
|
|
47
|
+
| Case 4 | The direction is tempted by a vendor grid or child width arithmetic | Every region resolves to a published composition or to a recorded gap; no vendor grid and no width arithmetic owns a region |
|
|
48
|
+
| Case 5 | A family wants a region to look different | The family delta replaces a renderer with compatible props only; the region's role and its number of owners are unchanged |
|
|
49
|
+
|
|
50
|
+
Not this rule: how much space separates the objects inside a region is a presentation decision.
|
|
51
|
+
|
|
52
|
+
## LAYOUT-3 — One owner per region and per scroll axis
|
|
53
|
+
|
|
54
|
+
Governs how many things may claim the same region or the same overflow axis.
|
|
55
|
+
|
|
56
|
+
| Case | When | Assert |
|
|
57
|
+
| --- | --- | --- |
|
|
58
|
+
| Case 1 | Several regions coexist on one page | Each visible region resolves to exactly one composition owner and one intended track |
|
|
59
|
+
| Case 2 | Content is essentially wider than its column, such as a table | Exactly one named `HorizontalScrollRegion` owns the inline axis, and no page-level inline scroll exists |
|
|
60
|
+
| Case 3 | Block flow must be bounded inside a region | `VerticalScrollRegion isScrollable`, or the exact named composition, owns that block axis |
|
|
61
|
+
| Case 4 | A conversation must scroll while its composer stays put | `ChatWorkspace` owns conversation scrolling, and the composer is its sibling outside that scroller |
|
|
62
|
+
| Case 5 | A nested scroller is proposed | Each nested scroller carries a different named axis or a different named task from its ancestor |
|
|
63
|
+
|
|
64
|
+
Not this rule: whether a scroll region can actually be reached and traversed by keyboard once
|
|
65
|
+
rendered is FOCUS-2.
|
|
66
|
+
|
|
67
|
+
## LAYOUT-4 — Regions that leave normal flow
|
|
68
|
+
|
|
69
|
+
Governs sticky, fixed, drawer, floating, reordered, and conditionally absent regions.
|
|
70
|
+
|
|
71
|
+
| Case | When | Assert |
|
|
72
|
+
| --- | --- | --- |
|
|
73
|
+
| Case 1 | A support column should stay in view while the primary column scrolls | `Rail mode="sticky"` carries its published bound, and below the narrow width the region returns to normal flow |
|
|
74
|
+
| Case 2 | An overlay needs bounded fixed geometry | `WorkspaceShell.floatingLayer` supplies geometry only; if focus containment and dismissal are also required, the receipt names a modal owner or records a gap |
|
|
75
|
+
| Case 3 | Compact space cannot hold the conversation rail inline | `ChatWorkspace` owns the drawer, and the receipt supplies `isRailOpen` and `onRailOpenChange` |
|
|
76
|
+
| Case 4 | A region is absent in the current state | No wrapper, track, divider, rule, spacer, or reserved scroll range for that region survives its absence |
|
|
77
|
+
| Case 5 | The direction wants a different visual order at one width | DOM, reading, focus, and action order are identical to task order at every width; the composition differs, the order does not |
|
|
78
|
+
|
|
79
|
+
Not this rule: whether the projection actually clears the content beneath it at a given viewport is
|
|
80
|
+
observed by the audit operator, not settled here.
|
|
81
|
+
|
|
82
|
+
Retired: LAYOUT-5 is retired into COVERAGE-1 and is not reused; the address stays spent.
|
|
83
|
+
|
|
84
|
+
## What this file does not decide
|
|
85
|
+
|
|
86
|
+
Which rank the content inside a region carries is [Hierarchy](hierarchy.md). How a region recomposes
|
|
87
|
+
as space changes is [Responsive](responsive.md). Which action inside a region is dominant is
|
|
88
|
+
[CTA](cta.md) and [Accent](accent.md). What the receipt must enumerate about these regions is
|
|
89
|
+
[Coverage](coverage.md). Whether the rendered result matches this direction is the audit operator's
|
|
90
|
+
business, in [Focus](../proof/focus.md), [Accessibility](../proof/accessibility.md),
|
|
91
|
+
[Motion](../proof/motion.md), and [Render truth](../proof/render-truth.md).
|