@chobantonov/jsonforms-extended-spec 0.0.0-stage → 0.2.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/LICENSE +21 -0
- package/README.md +126 -2
- package/conformance/authoring.json +2169 -0
- package/conformance/behavior.json +731 -0
- package/conformance/config-consumption.json +1531 -0
- package/conformance/expected-invalid.json +20 -0
- package/docs/audit.md +150 -0
- package/docs/conditional-fields.md +80 -0
- package/docs/draft-07-visual-support.md +43 -0
- package/docs/external-resources-proposal.md +536 -0
- package/docs/implementation-guide.md +180 -0
- package/docs/implementation-pitfalls.md +802 -0
- package/docs/implementation-web-typescript.md +41 -0
- package/docs/renderer-and-demo.md +1347 -0
- package/docs/renderer-selection.md +99 -0
- package/docs/spec.md +8321 -0
- package/docs/todo.md +149 -0
- package/examples/README.md +121 -0
- package/examples/additional-errors/README.md +169 -0
- package/examples/additional-errors/config.json +3 -0
- package/examples/additional-errors/data.json +11 -0
- package/examples/additional-errors/schema.json +56 -0
- package/examples/additional-errors/translations.json +64 -0
- package/examples/additional-errors/uischema.json +158 -0
- package/examples/additional-items-pagination/README.md +8 -0
- package/examples/additional-items-pagination/config.json +10 -0
- package/examples/additional-items-pagination/data.json +22 -0
- package/examples/additional-items-pagination/schema.json +30 -0
- package/examples/additional-items-pagination/translations.json +16 -0
- package/examples/additional-items-pagination/uischema.json +39 -0
- package/examples/additional-properties/README.md +188 -0
- package/examples/additional-properties/config.json +5 -0
- package/examples/additional-properties/data.json +31 -0
- package/examples/additional-properties/schema.json +78 -0
- package/examples/additional-properties/translations.json +80 -0
- package/examples/additional-properties/uischema.json +104 -0
- package/examples/ag-grid/README.md +62 -0
- package/examples/ag-grid/config.json +14 -0
- package/examples/ag-grid/data.json +124 -0
- package/examples/ag-grid/schema.json +48 -0
- package/examples/ag-grid/translations.json +58 -0
- package/examples/ag-grid/uischema.json +671 -0
- package/examples/array-choices/README.md +150 -0
- package/examples/array-choices/config.json +4 -0
- package/examples/array-choices/data.json +10 -0
- package/examples/array-choices/schema.json +68 -0
- package/examples/array-choices/translations.json +64 -0
- package/examples/array-choices/uischema.json +97 -0
- package/examples/array-controls/README.md +237 -0
- package/examples/array-controls/config.json +4 -0
- package/examples/array-controls/data.json +147 -0
- package/examples/array-controls/schema.json +374 -0
- package/examples/array-controls/translations.json +186 -0
- package/examples/array-controls/uischema.json +685 -0
- package/examples/array-detail-modes/README.md +11 -0
- package/examples/array-detail-modes/data.json +38 -0
- package/examples/array-detail-modes/schema.json +89 -0
- package/examples/array-detail-modes/translations.json +36 -0
- package/examples/array-detail-modes/uischema.json +73 -0
- package/examples/array-detail-modes/uischemas.d.mts +2 -0
- package/examples/array-detail-modes/uischemas.json +15 -0
- package/examples/boolean-controls/README.md +109 -0
- package/examples/boolean-controls/config.json +3 -0
- package/examples/boolean-controls/data.json +27 -0
- package/examples/boolean-controls/schema.json +98 -0
- package/examples/boolean-controls/translations.json +94 -0
- package/examples/boolean-controls/uischema.json +126 -0
- package/examples/button-actions/README.md +259 -0
- package/examples/button-actions/config.json +7 -0
- package/examples/button-actions/data.json +5 -0
- package/examples/button-actions/host.mjs +14 -0
- package/examples/button-actions/schema.json +20 -0
- package/examples/button-actions/translations.json +60 -0
- package/examples/button-actions/uischema.json +179 -0
- package/examples/catalog.json +634 -0
- package/examples/categorization/README.md +132 -0
- package/examples/categorization/config.json +7 -0
- package/examples/categorization/data.json +8 -0
- package/examples/categorization/schema.json +29 -0
- package/examples/categorization/translations.json +72 -0
- package/examples/categorization/uischema.json +288 -0
- package/examples/choice-controls/README.md +136 -0
- package/examples/choice-controls/config.json +10 -0
- package/examples/choice-controls/data.json +61 -0
- package/examples/choice-controls/schema.json +406 -0
- package/examples/choice-controls/translations.json +154 -0
- package/examples/choice-controls/uischema.json +575 -0
- package/examples/choice-controls/uischemas.d.mts +2 -0
- package/examples/choice-controls/uischemas.json +16 -0
- package/examples/code-editor/README.md +74 -0
- package/examples/code-editor/data.json +8 -0
- package/examples/code-editor/schema.json +28 -0
- package/examples/code-editor/translations.json +20 -0
- package/examples/code-editor/uischema.json +77 -0
- package/examples/collection-pagination/README.md +5 -0
- package/examples/collection-pagination/config.json +1 -0
- package/examples/collection-pagination/data.json +64 -0
- package/examples/collection-pagination/schema.json +23 -0
- package/examples/collection-pagination/translations.json +14 -0
- package/examples/collection-pagination/uischema.json +14 -0
- package/examples/color-control/README.md +151 -0
- package/examples/color-control/config.json +7 -0
- package/examples/color-control/data.json +11 -0
- package/examples/color-control/schema.json +61 -0
- package/examples/color-control/translations.json +76 -0
- package/examples/color-control/uischema.json +106 -0
- package/examples/combinators/README.md +223 -0
- package/examples/combinators/config.json +9 -0
- package/examples/combinators/data.json +23 -0
- package/examples/combinators/schema.json +232 -0
- package/examples/combinators/translations.json +178 -0
- package/examples/combinators/uischema.json +158 -0
- package/examples/conditional-fields/README.md +19 -0
- package/examples/conditional-fields/config.json +5 -0
- package/examples/conditional-fields/data.json +7 -0
- package/examples/conditional-fields/schema.json +59 -0
- package/examples/conditional-fields/translations.json +30 -0
- package/examples/conditional-fields/uischema.json +71 -0
- package/examples/container-validation-indicator/README.md +187 -0
- package/examples/container-validation-indicator/config.json +9 -0
- package/examples/container-validation-indicator/data.json +68 -0
- package/examples/container-validation-indicator/schema.json +222 -0
- package/examples/container-validation-indicator/translations.json +120 -0
- package/examples/container-validation-indicator/uischema.json +98 -0
- package/examples/cron-control/README.md +155 -0
- package/examples/cron-control/data.json +15 -0
- package/examples/cron-control/schema.json +72 -0
- package/examples/cron-control/translations.json +80 -0
- package/examples/cron-control/uischema.json +91 -0
- package/examples/destructive-confirmation/README.md +210 -0
- package/examples/destructive-confirmation/config.json +17 -0
- package/examples/destructive-confirmation/data.json +86 -0
- package/examples/destructive-confirmation/schema.json +204 -0
- package/examples/destructive-confirmation/translations.json +112 -0
- package/examples/destructive-confirmation/uischema.json +105 -0
- package/examples/draft-07-metaschema/README.md +11 -0
- package/examples/draft-07-metaschema/config.json +3 -0
- package/examples/draft-07-metaschema/data.json +25 -0
- package/examples/draft-07-metaschema/schema.json +172 -0
- package/examples/draft-07-metaschema/translations.json +10 -0
- package/examples/draft-07-metaschema/uischema.json +14 -0
- package/examples/dynamic-playground/README.md +95 -0
- package/examples/dynamic-playground/config.json +8 -0
- package/examples/dynamic-playground/configuration.json +152 -0
- package/examples/dynamic-playground/data.json +15 -0
- package/examples/dynamic-playground/dynamic-uischema.json +379 -0
- package/examples/dynamic-playground/host.mjs +37 -0
- package/examples/dynamic-playground/schema.json +48 -0
- package/examples/dynamic-playground/translations.json +76 -0
- package/examples/dynamic-playground/uischema.json +36 -0
- package/examples/editor-details/README.md +10 -0
- package/examples/editor-details/data.json +18 -0
- package/examples/editor-details/schema.json +49 -0
- package/examples/editor-details/translations.json +28 -0
- package/examples/editor-details/uischema.json +53 -0
- package/examples/editor-details/uischemas.d.mts +2 -0
- package/examples/editor-details/uischemas.json +14 -0
- package/examples/file-control/README.md +108 -0
- package/examples/file-control/data.json +28 -0
- package/examples/file-control/schema.json +89 -0
- package/examples/file-control/translations.json +46 -0
- package/examples/file-control/uischema.json +152 -0
- package/examples/group-layout/README.md +149 -0
- package/examples/group-layout/config.json +10 -0
- package/examples/group-layout/data.json +9 -0
- package/examples/group-layout/schema.json +51 -0
- package/examples/group-layout/translations.json +62 -0
- package/examples/group-layout/uischema.json +249 -0
- package/examples/index.d.ts +17 -0
- package/examples/index.js +69 -0
- package/examples/input-adornments/README.md +68 -0
- package/examples/input-adornments/data.json +41 -0
- package/examples/input-adornments/schema.json +207 -0
- package/examples/input-adornments/translations.json +106 -0
- package/examples/input-adornments/uischema.json +695 -0
- package/examples/job-application/README.md +23 -0
- package/examples/job-application/config.json +10 -0
- package/examples/job-application/data.json +68 -0
- package/examples/job-application/schema.json +196 -0
- package/examples/job-application/translations.json +388 -0
- package/examples/job-application/uischema.json +218 -0
- package/examples/job-application/uischemas.json +153 -0
- package/examples/json-editor/README.md +28 -0
- package/examples/json-editor/schema.json +1 -0
- package/examples/json-editor/translations.json +10 -0
- package/examples/json-editor/uischema.json +16 -0
- package/examples/json-inference/README.md +33 -0
- package/examples/json-inference/translations.json +10 -0
- package/examples/json-inference/uischema.json +16 -0
- package/examples/kitchen-sink/README.md +86 -0
- package/examples/kitchen-sink/config.json +14 -0
- package/examples/kitchen-sink/data.json +263 -0
- package/examples/kitchen-sink/invalid-data.json +263 -0
- package/examples/kitchen-sink/schema.json +515 -0
- package/examples/kitchen-sink/translations.json +270 -0
- package/examples/kitchen-sink/uischema.json +722 -0
- package/examples/label-interpolation/README.md +200 -0
- package/examples/label-interpolation/config.json +8 -0
- package/examples/label-interpolation/data.json +13 -0
- package/examples/label-interpolation/schema.json +64 -0
- package/examples/label-interpolation/translations.json +94 -0
- package/examples/label-interpolation/uischema.json +375 -0
- package/examples/layout-sizing/README.md +162 -0
- package/examples/layout-sizing/config.json +10 -0
- package/examples/layout-sizing/data.json +14 -0
- package/examples/layout-sizing/schema.json +58 -0
- package/examples/layout-sizing/translations.json +42 -0
- package/examples/layout-sizing/uischema.json +558 -0
- package/examples/markup-label/README.md +109 -0
- package/examples/markup-label/config.json +16 -0
- package/examples/markup-label/data.json +5 -0
- package/examples/markup-label/schema.json +24 -0
- package/examples/markup-label/translations.json +40 -0
- package/examples/markup-label/uischema.json +149 -0
- package/examples/mixed-control/README.md +164 -0
- package/examples/mixed-control/config.json +11 -0
- package/examples/mixed-control/data.json +70 -0
- package/examples/mixed-control/schema.json +221 -0
- package/examples/mixed-control/translations.json +158 -0
- package/examples/mixed-control/uischema.json +211 -0
- package/examples/null-control/README.md +111 -0
- package/examples/null-control/config.json +4 -0
- package/examples/null-control/data.json +6 -0
- package/examples/null-control/schema.json +36 -0
- package/examples/null-control/translations.json +42 -0
- package/examples/null-control/uischema.json +56 -0
- package/examples/numeric-controls/README.md +94 -0
- package/examples/numeric-controls/config.json +4 -0
- package/examples/numeric-controls/data.json +8 -0
- package/examples/numeric-controls/schema.json +52 -0
- package/examples/numeric-controls/translations.json +56 -0
- package/examples/numeric-controls/uischema.json +77 -0
- package/examples/object-control/README.md +220 -0
- package/examples/object-control/config.json +4 -0
- package/examples/object-control/data.json +62 -0
- package/examples/object-control/schema.json +252 -0
- package/examples/object-control/translations.json +160 -0
- package/examples/object-control/uischema.json +275 -0
- package/examples/object-control/uischemas.d.mts +2 -0
- package/examples/object-control/uischemas.json +59 -0
- package/examples/password-control/README.md +119 -0
- package/examples/password-control/config.json +3 -0
- package/examples/password-control/data.json +18 -0
- package/examples/password-control/schema.json +65 -0
- package/examples/password-control/translations.json +64 -0
- package/examples/password-control/uischema.json +94 -0
- package/examples/pre-touch-errors/README.md +176 -0
- package/examples/pre-touch-errors/config.json +4 -0
- package/examples/pre-touch-errors/data.json +5 -0
- package/examples/pre-touch-errors/schema.json +56 -0
- package/examples/pre-touch-errors/translations.json +68 -0
- package/examples/pre-touch-errors/uischema.json +85 -0
- package/examples/presentation/README.md +148 -0
- package/examples/presentation/config.json +9 -0
- package/examples/presentation/data.json +6 -0
- package/examples/presentation/schema.json +21 -0
- package/examples/presentation/translations.json +64 -0
- package/examples/presentation/uischema.json +210 -0
- package/examples/property-pagination/README.md +5 -0
- package/examples/property-pagination/config.json +1 -0
- package/examples/property-pagination/data.json +17 -0
- package/examples/property-pagination/schema.json +14 -0
- package/examples/property-pagination/translations.json +10 -0
- package/examples/property-pagination/uischema.json +24 -0
- package/examples/recursive-tree/README.md +49 -0
- package/examples/recursive-tree/config.json +1 -0
- package/examples/recursive-tree/data.json +40 -0
- package/examples/recursive-tree/schema.json +89 -0
- package/examples/recursive-tree/translations.json +42 -0
- package/examples/recursive-tree/uischema.json +84 -0
- package/examples/recursive-tree/uischemas.d.mts +2 -0
- package/examples/recursive-tree/uischemas.json +51 -0
- package/examples/split-layout/README.md +123 -0
- package/examples/split-layout/config.json +3 -0
- package/examples/split-layout/data.json +13 -0
- package/examples/split-layout/schema.json +50 -0
- package/examples/split-layout/translations.json +50 -0
- package/examples/split-layout/uischema.json +204 -0
- package/examples/string-controls/README.md +159 -0
- package/examples/string-controls/config.json +5 -0
- package/examples/string-controls/data.json +13 -0
- package/examples/string-controls/schema.json +70 -0
- package/examples/string-controls/translations.json +76 -0
- package/examples/string-controls/uischema.json +148 -0
- package/examples/table-row-details/README.md +69 -0
- package/examples/table-row-details/config.json +7 -0
- package/examples/table-row-details/data.json +280 -0
- package/examples/table-row-details/schema.json +61 -0
- package/examples/table-row-details/translations.json +56 -0
- package/examples/table-row-details/uischema.json +1303 -0
- package/examples/template-layout/README.md +250 -0
- package/examples/template-layout/config.json +9 -0
- package/examples/template-layout/data.json +20 -0
- package/examples/template-layout/host.mjs +13 -0
- package/examples/template-layout/schema.json +48 -0
- package/examples/template-layout/translations.json +70 -0
- package/examples/template-layout/uischema.json +177 -0
- package/examples/template-slots/README.md +19 -0
- package/examples/template-slots/data.json +4 -0
- package/examples/template-slots/schema.json +11 -0
- package/examples/template-slots/translations.json +26 -0
- package/examples/template-slots/uischema.json +47 -0
- package/examples/template-slots/uischemas.d.mts +2 -0
- package/examples/template-slots/uischemas.json +56 -0
- package/examples/temporal-controls/README.md +325 -0
- package/examples/temporal-controls/data.json +44 -0
- package/examples/temporal-controls/schema.json +208 -0
- package/examples/temporal-controls/translations.json +156 -0
- package/examples/temporal-controls/uischema.json +297 -0
- package/examples/tree-max-depth/README.md +5 -0
- package/examples/tree-max-depth/config.json +3 -0
- package/examples/tree-max-depth/data.json +31 -0
- package/examples/tree-max-depth/schema.json +258 -0
- package/examples/tree-max-depth/translations.json +42 -0
- package/examples/tree-max-depth/uischema.json +16 -0
- package/examples/tree-max-depth/uischemas.d.mts +2 -0
- package/examples/tree-max-depth/uischemas.json +50 -0
- package/examples/tuple-control/README.md +335 -0
- package/examples/tuple-control/config.json +4 -0
- package/examples/tuple-control/data.json +61 -0
- package/examples/tuple-control/schema.json +218 -0
- package/examples/tuple-control/translations.json +142 -0
- package/examples/tuple-control/uischema.json +128 -0
- package/examples/tuple-control/uischemas.d.mts +2 -0
- package/examples/tuple-control/uischemas.json +125 -0
- package/examples/validator-profile/README.md +197 -0
- package/examples/validator-profile/config.json +9 -0
- package/examples/validator-profile/data.json +16 -0
- package/examples/validator-profile/schema.json +139 -0
- package/examples/validator-profile/translations.json +34 -0
- package/examples/validator-profile/uischema.json +59 -0
- package/package.json +83 -3
- package/provenance.json +140 -0
- package/schemas/README.md +77 -0
- package/schemas/example.schema.json +37 -0
- package/schemas/jsonforms-config.schema.json +427 -0
- package/schemas/jsonforms-dynamic-uischema.schema.json +220 -0
- package/schemas/jsonforms-extended-config.schema.json +327 -0
- package/schemas/jsonforms-extended-uischema.schema.json +1923 -0
- package/schemas/jsonforms-rule.schema.json +104 -0
- package/schemas/jsonforms-uischema.schema.json +1421 -0
- package/typescript/README.md +540 -0
- package/typescript/lib/authoring/cssLength.d.ts +33 -0
- package/typescript/lib/authoring/cssLength.js +25 -0
- package/typescript/lib/authoring/dynamic.d.ts +73 -0
- package/typescript/lib/authoring/dynamic.js +8 -0
- package/typescript/lib/authoring/forSchema.d.ts +376 -0
- package/typescript/lib/authoring/forSchema.js +84 -0
- package/typescript/lib/authoring/schemaTypes.d.ts +111 -0
- package/typescript/lib/authoring/schemaTypes.js +15 -0
- package/typescript/lib/index.d.ts +4 -0
- package/typescript/lib/index.js +20 -0
- package/typescript/package.json +1 -0
- package/typescript/src/authoring/cssLength.ts +79 -0
- package/typescript/src/authoring/dynamic.ts +96 -0
- package/typescript/src/authoring/forSchema.ts +419 -0
- package/typescript/src/authoring/schemaTypes.ts +143 -0
- package/typescript/src/index.ts +4 -0
- package/typescript/test/schemaContract.test.ts +626 -0
- package/typescript/test/tsconfig.json +10 -0
- package/typescript/test/typedAuthoring.test.ts +140 -0
- package/typescript/test/typedAuthoringCoverage.test.ts +145 -0
- package/typescript/test/typedAuthoringCssLength.test.ts +81 -0
- package/typescript/test/typedAuthoringNames.test.ts +90 -0
- package/typescript/test/typedDynamic.test.ts +88 -0
- package/typescript/tsconfig.json +15 -0
|
@@ -0,0 +1,802 @@
|
|
|
1
|
+
# Renderer implementation pitfalls
|
|
2
|
+
|
|
3
|
+
Companion to the [implementation guide](implementation-guide.md). These entries describe portable behavior and acceptance checks, not instructions to reproduce a particular codebase. Consult [spec.md](spec.md) for option definitions and [renderer-and-demo.md](renderer-and-demo.md) for detailed presentation requirements.
|
|
4
|
+
|
|
5
|
+
## P01 — Values are compared by JSON content
|
|
6
|
+
|
|
7
|
+
**Trap:** Compare enum/const object or array choices by runtime reference identity, or serialize every choice into the stored value.
|
|
8
|
+
|
|
9
|
+
**Behavior:** Reloaded structurally equal values remain selected; choosing them preserves their JSON types. Object member order is immaterial; array order matters. Missing, null, false, zero and empty string remain distinct.
|
|
10
|
+
|
|
11
|
+
**UI-library adaptation:** If a native select/radio accepts only scalar values, use unique internal option IDs and map them back to the original JSON values on selection. Do not use stringified objects as React keys: different objects become `[object Object]`. Internal IDs must not enter form data; translated labels must not determine identity.
|
|
12
|
+
|
|
13
|
+
**Check:** Parse data separately from the schema and reload it. Object/array dropdowns, radios, cards and cells retain selection. See [choice controls](../examples/choice-controls/README.md).
|
|
14
|
+
|
|
15
|
+
## P02 — Property keys are literal data
|
|
16
|
+
|
|
17
|
+
**Trap:** Interpret dots, slashes, brackets or an empty key as navigation syntax; trim imported names; read inherited members such as `constructor` from a schema property map.
|
|
18
|
+
|
|
19
|
+
**Behavior:** Address exact keys with the platform's correct path encoding and require own members when reading data or schema property maps. Separate display labels from binding paths. Renaming/deleting affects only the intended key and preserves values.
|
|
20
|
+
|
|
21
|
+
**Check:** Edit `legacy.key`, `notes/1`, `items[0]`, `""` and whitespace-bearing keys independently. A recursive-tree label named `constructor` remains visible, but Rename is unavailable when that field has no own schema property. A literal dotted `childrenProperty` keeps selected child and grandchild detail edits and child-link navigation on those exact members. See [additional properties](../examples/additional-properties/README.md).
|
|
22
|
+
|
|
23
|
+
## P03 — Pattern constraints intersect
|
|
24
|
+
|
|
25
|
+
**Trap:** Use the first matching patternProperties schema, or treat patterns as alternatives.
|
|
26
|
+
|
|
27
|
+
**Behavior:** Every applicable pattern constrains the property. Declared properties can also match patterns. Additional-properties applicability is not a first-match fallback.
|
|
28
|
+
|
|
29
|
+
**Check:** Two matching patterns contribute different object fields; expose both and validate both. See [Draft-07 audit](draft-07-visual-support.md).
|
|
30
|
+
|
|
31
|
+
## P04 — Selecting a type does not discard composition
|
|
32
|
+
|
|
33
|
+
**Trap:** Delete allOf/anyOf/oneOf to avoid redispatch, or infer a type from minimum/maxLength alone.
|
|
34
|
+
|
|
35
|
+
**Behavior:** Preserve the conjunction with the selected type. Exclude alternatives only when incompatibility is established. An impossible allOf branch stays a contradiction. Do not deduplicate oneOf alternatives or confuse an incomplete value with an impossible editing branch. Number and integer overlap; child schemas have independent types.
|
|
36
|
+
|
|
37
|
+
**Check:** String/integer alternatives expose the matching editor; untyped alternatives and overlapping oneOf still validate correctly. Test termination separately. Reference/conditional support must be declared honestly. See [mixed control](../examples/mixed-control/README.md).
|
|
38
|
+
|
|
39
|
+
## P05 — Numeric editor intent is not encoded in JSON
|
|
40
|
+
|
|
41
|
+
**Trap:** Recompute Integer selection from every whole-number value, undoing the user's Number selection; reset or round data when switching numeric editors.
|
|
42
|
+
|
|
43
|
+
**Behavior:** Preserve explicit numeric editor intent during editing. Integer selected for 2.5 produces a local error without rounding existing data; Number selected for 2 remains selected. A fresh mount may infer again because JSON stores no editor choice.
|
|
44
|
+
|
|
45
|
+
**Check:** Switch 2 to Number, enter 2.5, switch to Integer, then correct it. Verify both form and cell editing paths. See [mixed control](../examples/mixed-control/README.md).
|
|
46
|
+
|
|
47
|
+
## P06 — Document validity and displayed-branch feedback differ
|
|
48
|
+
|
|
49
|
+
**Trap:** Assume absence of document errors proves that the displayed branch is valid, or publish local branch errors as document errors.
|
|
50
|
+
|
|
51
|
+
**Behavior:** validateActiveBranch defaults true; the control option overrides global config. Local feedback explains why a displayed branch rejects data even when another branch accepts it. False skips extra compilation and validation while retaining document validation. Only active branches do this work; respect validation visibility.
|
|
52
|
+
|
|
53
|
+
**Check:** A long string is document-valid via Long text while Short text is displayed. Compare enabled/disabled feedback and verify unchanged host validity. Check compilation reuse and nested validation cost. See [mixed control](../examples/mixed-control/README.md).
|
|
54
|
+
|
|
55
|
+
## P07 — Enclosing fields are not a second scalar editor
|
|
56
|
+
|
|
57
|
+
**Trap:** Generate a whole-value editor after removing a composition keyword, producing an unrestricted duplicate scalar input; omit enclosing object fields entirely.
|
|
58
|
+
|
|
59
|
+
**Behavior:** Preserve enclosing object fields alongside branch fields. A scalar branch has one value editor. A single applicable branch renders without redundant tabs/selectors; that presentation does not rewrite oneOf semantics.
|
|
60
|
+
|
|
61
|
+
**Check:** Test enclosing plus branch object fields, scalar oneOf with and without explicit type, and a single narrowed branch.
|
|
62
|
+
|
|
63
|
+
## P08 — Errors belong to their data location
|
|
64
|
+
|
|
65
|
+
**Trap:** Show only a table-level descendant notice; use raw data as truthiness to decide validity; assume checkboxes and switches display an input library's feedback automatically.
|
|
66
|
+
|
|
67
|
+
**Behavior:** The invalid cell/control carries local feedback. Containers retain direct errors and a separate localized descendant notice. A notice such as “Some items contain errors” is renderer-generated, not an AJV keyword error. Respect hidden validation and count opt-ins.
|
|
68
|
+
|
|
69
|
+
**Check:** The second row's boolean value is the string `"false"`. Mark that cell as well as the table summary. Correcting it removes both applicable indicators. Check direct array contains errors independently from row errors.
|
|
70
|
+
|
|
71
|
+
## P09 — Error translations have defined precedence
|
|
72
|
+
|
|
73
|
+
**Trap:** Let a generic validator locale overwrite authored field/keyword translations, or accept only flat catalog entries when a portable example groups keys as nested JSON.
|
|
74
|
+
|
|
75
|
+
**Behavior:** Follow the spec's i18n prefixes and error lookup order, preserving localized validator messages as fallback. Resolve literal dotted catalog keys before nested paths. Document the namespace so applications know which keys are reserved. Do not translate stored data.
|
|
76
|
+
|
|
77
|
+
**Check:** Override a reviewers contains message with a lead-reviewer explanation, switch locale, and check both local and container feedback. In the Job application, resolve `static-text.English` and category labels from nested entries in both locales.
|
|
78
|
+
|
|
79
|
+
## P10 — Object and collection boundaries convey ownership
|
|
80
|
+
|
|
81
|
+
**Trap:** Remove an object Group because it lacks a title, render an empty static-fields frame, or stack object and additional-properties borders without purpose.
|
|
82
|
+
|
|
83
|
+
**Behavior:** Preserve resolved grouping and title/i18n behavior. Keep dynamic content within its object boundary. A VerticalLayout explicitly binding child properties is a distinct authoring choice.
|
|
84
|
+
|
|
85
|
+
**Check:** Titled/untitled objects with static-only, dynamic-only and mixed fields. Confirm label and action ownership, and pagination inside the collection. See [additional properties](../examples/additional-properties/README.md).
|
|
86
|
+
|
|
87
|
+
## P11 — Summaries are part of table behavior
|
|
88
|
+
|
|
89
|
+
**Trap:** Filter raw objects or Markdown source while displaying a readable summary; use a different interpolation context for search.
|
|
90
|
+
|
|
91
|
+
**Behavior:** Label summaries resolve translations, permitted interpolation and markup to searchable plain text. Control summaries expose their bound displayed value. Keep row context distinct from form-root context and preserve access gates. Sorting/filtering must not mutate data.
|
|
92
|
+
|
|
93
|
+
**Check:** A Contact summary displays Boston and matches a Boston filter. Formatting syntax does not pollute search. Repeat after row edits and locale changes. See [web notes](implementation-web-typescript.md).
|
|
94
|
+
|
|
95
|
+
## P12 — Editing must preserve focus and identity
|
|
96
|
+
|
|
97
|
+
**Trap:** Recreate cell renderer components or change an input's wrapper structure on each keystroke/error transition.
|
|
98
|
+
|
|
99
|
+
**Behavior:** Keep the edited control mounted where practical; preserve caret, focus and selection while values and errors update. Stable identity must not freeze stale summaries or callbacks.
|
|
100
|
+
|
|
101
|
+
**Check:** Type several characters while validation changes and filtering is enabled. No dropped characters, focus jumps or stale values. Keyboard focus remains visible; pointer selection does not require an extra persistent focus ring.
|
|
102
|
+
|
|
103
|
+
## P13 — Array positions and missing values need care
|
|
104
|
+
|
|
105
|
+
**Trap:** Clear an array item by assigning undefined, confuse null with absence, or treat tuple positions as freely reorderable homogeneous items.
|
|
106
|
+
|
|
107
|
+
**Behavior:** Follow collection removal and tuple rules. Preserve meaningful positions and distinguish missing values from explicit null. Sorting/filtering should not change the underlying indices used by edit/delete actions.
|
|
108
|
+
|
|
109
|
+
**Check:** Edit/delete an item under sorting and pagination; test tuple tails and mixed items. Do not create sparse arrays accidentally.
|
|
110
|
+
|
|
111
|
+
## P14 — Confirmation depends on actual discarded data
|
|
112
|
+
|
|
113
|
+
**Trap:** Prompt on every scalar discriminator change, ignore configured policy, or replace useful branch data without the required prompt.
|
|
114
|
+
|
|
115
|
+
**Behavior:** Follow operation-specific policies. Under complex confirmation, a supported discriminator-only transition is not meaningful discarded content; additional user data can be. Always/never remain explicit overrides.
|
|
116
|
+
|
|
117
|
+
**Check:** Switch with only a discriminator, then with populated branch fields, under all policies. See [choice controls](../examples/choice-controls/README.md).
|
|
118
|
+
|
|
119
|
+
## P15 — Options and disabled states must survive delegation
|
|
120
|
+
|
|
121
|
+
**Trap:** Merge defaults over explicit false, lose read-only state in a detail dialog, or apply global settings after local overrides.
|
|
122
|
+
|
|
123
|
+
**Behavior:** Preserve documented option precedence and distinguish absent options from false/zero. Carry permission, validation, i18n and root-data context through cell/detail/branch dispatch.
|
|
124
|
+
|
|
125
|
+
**Check:** Global true/local false and global false/local true, including branch feedback, cell markers and confirmation. Disabled controls cannot mutate data through hidden actions.
|
|
126
|
+
|
|
127
|
+
## P16 — Theme, overflow and accessibility are behavior
|
|
128
|
+
|
|
129
|
+
**Trap:** Hard-code text colors, rely on native tabs for an overflow menu they do not provide, or let tab labels dictate a split pane's minimum width.
|
|
130
|
+
|
|
131
|
+
**Behavior:** Use semantic theme tokens, readable selected/disabled/error states and visible keyboard focus. Keep navigation reachable at narrow widths without expanding the document. A scroll strip or accessible overflow menu can satisfy the same need.
|
|
132
|
+
|
|
133
|
+
**Check:** Light/dark themes, narrow form pane, many tabs, keyboard-only navigation and long translated labels. Avoid unnecessary vertical scrolling in horizontal tab bars.
|
|
134
|
+
|
|
135
|
+
## P17 — Rich choices and summaries retain security boundaries
|
|
136
|
+
|
|
137
|
+
**Trap:** Treat custom markup/images as trusted because they occur inside a choice card, or enable broader expression/data access during filtering.
|
|
138
|
+
|
|
139
|
+
**Behavior:** Reuse markup and URL policies, including configured data-image support. Custom presentation does not remove accessible selection state or permit competing nested interactive controls. Preserve the same access restrictions for rendering and summary evaluation.
|
|
140
|
+
|
|
141
|
+
**Check:** Unsafe image URLs remain rejected in cards as in image controls; escaped interpolated data remains text. Selection is operable and announced without a visible radio circle.
|
|
142
|
+
|
|
143
|
+
## P18 — Native lifecycle and packaging matter
|
|
144
|
+
|
|
145
|
+
**Trap:** Assume mounting proves a usable port, duplicate context identities across package/source imports, or leave callbacks active after unmount.
|
|
146
|
+
|
|
147
|
+
**Behavior:** Verify host updates, translated settings, reconnect/unmount behavior and published-package consumption. Treat lifecycle implementation as platform-specific, while preserving data and interaction behavior.
|
|
148
|
+
|
|
149
|
+
**Check:** Mount, update schema/data/locale, disconnect and reconnect. Use the packaged implementation as well as source tests. Test nullable and recursive data without automatically materializing infinite children.
|
|
150
|
+
|
|
151
|
+
## Dynamic overlays preserve typed values and committed data
|
|
152
|
+
|
|
153
|
+
**Trap:** Treat a CEL integer as a JavaScript number without checking its range,
|
|
154
|
+
or forward its `bigint` result to a JSON-only renderer. Treat a literal
|
|
155
|
+
`{ "bind": "..." }` value as a path lookup. Replace a focused editor without
|
|
156
|
+
transferring focus, or flush its invalid draft into committed data during teardown.
|
|
157
|
+
|
|
158
|
+
**Behavior:** Convert only safe CEL integers to JSON numbers. Use the explicit
|
|
159
|
+
`literal` descriptor to preserve descriptor-shaped data. Resolve overlays before
|
|
160
|
+
normal tester selection. Under the chosen immediate replacement policy, discard
|
|
161
|
+
uncommitted drafts and IME work in the replaced editor without writing them to
|
|
162
|
+
committed form data. A permission restriction takes effect on the same update.
|
|
163
|
+
|
|
164
|
+
**Check:** Change a numeric Image width with a CEL ternary, then request an
|
|
165
|
+
out-of-range integer and verify fallback. Forward a literal descriptor-shaped
|
|
166
|
+
extension value unchanged. Change presentation during an invalid text draft and
|
|
167
|
+
composition, then verify the old draft is discarded, committed data is retained,
|
|
168
|
+
and only the affected editor swaps.
|
|
169
|
+
|
|
170
|
+
## Portable acceptance vectors
|
|
171
|
+
|
|
172
|
+
The `port-*` entries in [behavior.json](../conformance/behavior.json) cover representative cases from this guide. They require renderer-specific adapters; passing the specification package checks alone does not execute these UI scenarios.
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
## P19. Recursive branch selection and finite creation
|
|
176
|
+
|
|
177
|
+
**Distinction:** Reusing a schema at a child data path is legitimate recursion. Expanding all references or recursively creating defaults before the user chooses a branch can fail to terminate. Compiling an extracted branch without its root definitions can also make a populated folder look like a file.
|
|
178
|
+
|
|
179
|
+
**Expected behavior:** Use a distinct required discriminator as an editing hint when available, retain original document validation, create one requested node at a time, and preserve siblings. Do not interpret an invalid descendant as a reason to switch its parent branch. An object-to-object branch change must still initialize the selected branch under the usual confirmation policy.
|
|
180
|
+
|
|
181
|
+
**Check:** Use [recursive-tree](../examples/recursive-tree/README.md): load a folder containing another folder and files; load an invalid file inside a folder; add a single child to an empty folder; choose its branch, edit it and delete it. Separately test schema-only reference cycles and non-terminating required recursion. The example is local-reference coverage, not external resolver certification.
|
|
182
|
+
|
|
183
|
+
## Dialog movement uses measured geometry
|
|
184
|
+
|
|
185
|
+
Bound dragging against the dialog's measured rectangle and the viewport, not a
|
|
186
|
+
fixed fraction of screen width or height. Allow negative offsets from its initial
|
|
187
|
+
position so its top and left edges can reach the viewport origin. Recompute bounds
|
|
188
|
+
at the start of each drag after user resizing. Keep the header and window actions
|
|
189
|
+
reachable. Verify row and cell dialogs at all four edges, including after resizing;
|
|
190
|
+
UI-library centering and transforms must be included in the measured position.
|
|
191
|
+
|
|
192
|
+
## File search uses names, not payloads
|
|
193
|
+
|
|
194
|
+
Default grid search values for file cells are decoded filenames, including every filename in a multiple-file cell. Never use the raw data URL or base64 content as the search value. Nameless encodings contribute no filename text. Keep stored values unchanged and preserve explicit host grid overrides. Test both column filtering and quick filtering against filename-only and payload-only queries.
|
|
195
|
+
|
|
196
|
+
## Dialog height includes its viewport offset
|
|
197
|
+
|
|
198
|
+
A viewport-relative maximum height must also account for the dialog’s initial top offset and bottom margin. A dialog limited to viewport height minus 32px cannot start 100px down. Keep the header and footer outside the shrinking, scrolling body so users can reach actions without scrolling the modal overlay or page. Apply form-wide dialog defaults before per-dialog overrides, including explicit false.
|
|
199
|
+
|
|
200
|
+
## Portable layout spacing defaults
|
|
201
|
+
|
|
202
|
+
Absent layout/config spacing resolves to 16 CSS pixels for rows and columns, with wrap false and gridColumns 16. JSON Schema default annotations do not insert values by themselves; implement the fallback at runtime. Remove native outer field margins within managed layouts rather than adding them to the gap. Test adjacent fields, adjacent collections, mixed children, nested layouts and explicit zero. A family-specific preference does not justify a different fallback.
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
## Expansion settings belong to the presentation boundary
|
|
206
|
+
|
|
207
|
+
Group and mixed outer frames share collapsed/collapsible settings; accordion categories share collapsed while permitting all panels to close. Array-item initialization and tree-node expansion remain independent. Test local false overriding global true, reopening by the user, unrelated data updates, and a later configuration change.
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
## Required fields in table columns
|
|
211
|
+
|
|
212
|
+
A table header replaces the repeated cell label, so it must carry the required marker for its bound item property. Resolve hideRequiredAsterisk at cell, collection and global levels without changing validation. Test a required and optional column together, then toggle the setting after mount. A required collection does not make all its columns required.
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
## Discriminator branch layouts
|
|
216
|
+
|
|
217
|
+
When a branch selector already sets a const-valued discriminator, an authored branch UI schema can omit its redundant one-option field. Label the selector with the discriminator's user-facing name, retain the discriminator in data and validation, and apply the branch layouts recursively through the UI schema registry. Do not globally hide every const field: explicit branch layouts express author intent.
|
|
218
|
+
|
|
219
|
+
## Clearing externally loaded branch data
|
|
220
|
+
|
|
221
|
+
A remembered oneOf selection must not leave a phantom branch editor after the bound node is removed by external data replacement. Clear the selector and branch fields for a missing node, or an empty object matching no branch. Do not erase legitimate scalar values or invalid nonempty data merely because validation fails. Test replacement after a branch was previously displayed, as well as a fresh empty mount.
|
|
222
|
+
|
|
223
|
+
## Group regions share one collapsible card
|
|
224
|
+
|
|
225
|
+
`cover`, `header` and `footer` are structural children of Group, rendered
|
|
226
|
+
through the normal registry in the current schema and data context. An authored
|
|
227
|
+
`header` takes precedence over `label` for the visible title. Two
|
|
228
|
+
Label elements can supply a title and smaller supporting text. Keep all regions
|
|
229
|
+
inside one card frame. Keep the cover and heading visible when collapsed; hide
|
|
230
|
+
the body and footer. The first header Label supplies the Group's resolved
|
|
231
|
+
accessible name; use the Group label when no header Label exists. Recompute
|
|
232
|
+
that name when locale or effective dynamic header text changes. Resolving a
|
|
233
|
+
dynamic Label only at child dispatch leaves the parent's name stale. Keep
|
|
234
|
+
authored interactive content outside the disclosure trigger: nesting a Button
|
|
235
|
+
inside it makes keyboard and pointer behavior
|
|
236
|
+
ambiguous. Data and validation indicators aggregate only through `elements`. Acceptance:
|
|
237
|
+
mount the Card regions tab in `examples/group-layout/uischema.json` closed,
|
|
238
|
+
open it, activate a footer button without changing expansion, close it, then hide
|
|
239
|
+
the Group. Verify region visibility, action dispatch and unchanged data at each step.
|
|
240
|
+
|
|
241
|
+
Keep the cover and authored header outside the hidden content, with the
|
|
242
|
+
title in the same heading area. Preserve the native Group appearance and
|
|
243
|
+
indicator alignment when no regions are declared. A cover
|
|
244
|
+
or footer left outside the card frame looks detached;
|
|
245
|
+
putting the authored header in a second titled area or letting each
|
|
246
|
+
footer child fill a full-width slot obscures its relationship to the title
|
|
247
|
+
and each other. Verify row alignment and responsive wrapping in a wide and a
|
|
248
|
+
narrow host, as well as the disclosure and action independence above.
|
|
249
|
+
|
|
250
|
+
## Equivalent composition feedback
|
|
251
|
+
|
|
252
|
+
Document validation may report the same missing property through multiple alternatives, and local active-branch validation may report it again. Present equivalent errors once: compare instance path, keyword, parameters and message, rather than schema location alone. Preserve different constraint parameters, messages and targets. Deduplication of displayed branch feedback must not alter document validation or its emitted errors.
|
|
253
|
+
|
|
254
|
+
## Unselected object branches in array slots
|
|
255
|
+
|
|
256
|
+
Adding an object-choice node must follow its enclosing default, not implicitly choose the first branch when the authored flow requires a choice. The tree examples declare default: {} on node unions, with whole-object defaults on File/Folder branches. Per-property discriminator defaults can mutate an empty node during AJV branch probing.
|
|
257
|
+
|
|
258
|
+
Clearing an object-only oneOf array item retains {} and its index. Writing undefined would serialize to null. Clearing an optional object property can remove it. Do not apply object placeholders to scalar or nullable unions; distinguish actual array parents from numeric object-property names.
|
|
259
|
+
|
|
260
|
+
## Required discriminator feedback on the selector
|
|
261
|
+
|
|
262
|
+
When branch layouts omit a discriminator field, its required error must still be visible on the branch selector, with native invalid styling, accessible invalid state and translated guidance. A container indicator alone does not identify what the user must choose. Match the missing property at the exact node path; sibling and descendant failures must not mark the wrong selector. Respect the configured validation visibility.
|
|
263
|
+
|
|
264
|
+
## Validation indicators on collapsed array items
|
|
265
|
+
|
|
266
|
+
When container indicators are enabled, each array item header must indicate errors at its own data path and in its descendants, even while collapsed. An indicator on the outer collection alone does not identify which item to open. Respect local indicator overrides and validation visibility; valid sibling items must remain unmarked.
|
|
267
|
+
|
|
268
|
+
## Scoped JSON drafts in mixed controls
|
|
269
|
+
|
|
270
|
+
Code editors validate a section while local references still belong to the document schema. Assign each editor a unique model and schema registration; preserve registrations owned by other editors. Keep malformed text across blur and contribute an owner-scoped additional error instead of overwriting stored data. Gate Apply/submit on these errors so an older parsed value cannot silently replace the visible draft. Schema diagnostics should remain Monaco markers and ordinary AJV errors, not duplicate additional errors.
|
|
271
|
+
|
|
272
|
+
## Nested array selection and composed table cells
|
|
273
|
+
|
|
274
|
+
The presence of item properties does not make an array suitable for a table by default. Apply nested-array detection before selecting the default table presentation; explicit table options can still opt in. Such tables need a composite detail cell for anyOf, oneOf and allOf values as well as object, array and mixed types. Keep specialized enum and scalar cells ahead of the composite fallback.
|
|
275
|
+
|
|
276
|
+
Acceptance: check Draft-07 allOf/anyOf/oneOf default panels and an explicit
|
|
277
|
+
table with a string-or-array anyOf column through each renderer's registry.
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
## Domain trees versus JSON structure trees
|
|
281
|
+
|
|
282
|
+
Project recursive child collections onto named nodes; do not introduce a tree
|
|
283
|
+
entry for each scalar field or the intermediate children array. Carry the original
|
|
284
|
+
node schema, root references, absolute data path, permissions and validation into
|
|
285
|
+
the detail renderer. Never expand a recursive schema to construct navigation:
|
|
286
|
+
walk the finite data instead. Reuse native collection actions so defaults and
|
|
287
|
+
confirmation behavior are preserved. Array deletion/reordering must update node
|
|
288
|
+
selection without silently editing a sibling at a reused index.
|
|
289
|
+
|
|
290
|
+
## An unrestricted schema is not an omitted schema
|
|
291
|
+
|
|
292
|
+
An explicit `{}` accepts every JSON value; an omitted schema allows a host such as JSON Forms React to infer one from data. Preserve missing initial data as absence, not null. When switching the demo to an omitted schema, remove its previous Monaco schema registration without removing registrations belonging to other editors. Inferred constraints describe the sample and are not an authored business schema.
|
|
293
|
+
|
|
294
|
+
JSON Forms 3.9.0-alpha.2 infers schemas for absent data, explicit null, arrays,
|
|
295
|
+
objects and scalar roots. Pass an omitted schema directly to JSON Forms React so
|
|
296
|
+
inference follows replacement data, including a change of root type. Earlier
|
|
297
|
+
3.9.0-alpha.1 installations needed a demo adapter that inferred a wrapped
|
|
298
|
+
property for non-object roots; remove that adapter when upgrading. The Monaco
|
|
299
|
+
stale-schema cleanup remains independent.
|
|
300
|
+
|
|
301
|
+
Acceptance example: render `json-inference` with no authored schema and absent
|
|
302
|
+
data, then replace data with an object, array, string, number, boolean, and
|
|
303
|
+
null. Each root must render without a stale schema or an inapplicable renderer.
|
|
304
|
+
Record the core version used when executing this sequence in a renderer project.
|
|
305
|
+
|
|
306
|
+
## Unrestricted array items need a control fallback
|
|
307
|
+
|
|
308
|
+
With JSON Schema `items: true`, JSON Forms 3.9.0-alpha.2 resolves the item
|
|
309
|
+
schema to the boolean `true`. Generating a default VerticalLayout from that
|
|
310
|
+
schema yields no controls. An array renderer must fall back to a Control scoped
|
|
311
|
+
at `#` for the item so a nested mixed value still exposes its type selector
|
|
312
|
+
and View action. Preserve registered and explicitly supplied detail UI schemas.
|
|
313
|
+
Do not treat the default-open first item as closed when testing the child row.
|
|
314
|
+
|
|
315
|
+
Acceptance: render both array and object children of an `items: true` array
|
|
316
|
+
with a type selector and View action.
|
|
317
|
+
|
|
318
|
+
## Cleared mixed scalars versus absent values
|
|
319
|
+
|
|
320
|
+
A mixed type selector owns the selected value's type. Clearing its string input
|
|
321
|
+
stores the empty string and keeps String selected. Clearing a number or integer
|
|
322
|
+
input stores zero and keeps its selected type; clearing the type removes the
|
|
323
|
+
value where absence is permitted. Scope this behavior to the exact mixed value
|
|
324
|
+
path, including root and tree-detail values, so ordinary optional scalar fields
|
|
325
|
+
retain their clearing semantics. Check both the clear icon and deleting all text.
|
|
326
|
+
|
|
327
|
+
## Detail strings are selection instructions
|
|
328
|
+
|
|
329
|
+
Do not dispatch a detail string as a UI-schema element. Resolve it through core's
|
|
330
|
+
findUISchema with the item schema, registry, schema scope, data path, and root
|
|
331
|
+
schema. GENERATE bypasses the registry; other strings consult it. Test using a
|
|
332
|
+
matching registered layout, since generation and registry fallback look identical
|
|
333
|
+
without one. DEFAULT does not force nested presentation, but does not suppress
|
|
334
|
+
nesting required by the item schema either.
|
|
335
|
+
|
|
336
|
+
A generated detail may be a Control that delegates to an object renderer. Carry
|
|
337
|
+
GENERATE into that delegated control, otherwise it can re-enter registry lookup.
|
|
338
|
+
Do not inherit a mixed root's field layout into unrelated descendant schemas.
|
|
339
|
+
|
|
340
|
+
## Named templates are separate from ranked detail lookup
|
|
341
|
+
|
|
342
|
+
Resolve Template.name against entry.uischema.name in registry order without
|
|
343
|
+
calling testers. Slot.name resolves the inherited caller-content map, with local
|
|
344
|
+
named children overriding it; fallback is the first Slot.elements child.
|
|
345
|
+
Preserve schema, path and enabled state through both dispatches. A UI-model name
|
|
346
|
+
is not a data binding. Named-only registry entries should return -1 from testers
|
|
347
|
+
so ordinary detail selection does not accidentally choose them.
|
|
348
|
+
|
|
349
|
+
The template-slots example covers supplied content, fallback, empty slots and
|
|
350
|
+
nested overrides. Check missing-name diagnostics, duplicate-name diagnostics,
|
|
351
|
+
and cycle protection separately through each renderer's registry.
|
|
352
|
+
|
|
353
|
+
## Image diagnostics must fit their container
|
|
354
|
+
|
|
355
|
+
Do not print a refused image URL or embedded data payload in the form. Use a
|
|
356
|
+
short warning with an icon and an explanation available on hover, keyboard focus
|
|
357
|
+
and touch. Keep the explanation bounded and wrap long text; allow Escape to
|
|
358
|
+
close it. Source refusal must still prevent the image from loading.
|
|
359
|
+
|
|
360
|
+
## Conditional presentation is not schema rewriting
|
|
361
|
+
|
|
362
|
+
Resolve branch activity independently of error visibility and preserve the original
|
|
363
|
+
validator schema. Moving a field in a graphical editor changes its layout, not its
|
|
364
|
+
data scope. Branch-only fields can be placed explicitly in details; inactive values
|
|
365
|
+
must survive toggling. In Draft-07 a closed base object still rejects properties
|
|
366
|
+
introduced only by another subschema; visual discovery cannot legalize those values.
|
|
367
|
+
|
|
368
|
+
|
|
369
|
+
## Array summary visibility after indicator refactoring
|
|
370
|
+
|
|
371
|
+
When replacing preformatted array errors with a path-based header indicator,
|
|
372
|
+
carry `hideArraySummaryValidation` into the new calculation. Filtering an unused
|
|
373
|
+
error-text prop no longer hides descendant feedback. Resolve the local option
|
|
374
|
+
before the global setting, including explicit false. Preserve the array's own
|
|
375
|
+
errors and item-level indicators while hiding the outer descendant summary.
|
|
376
|
+
|
|
377
|
+
Acceptance cases: invalid children with global hiding, local false overriding
|
|
378
|
+
global true, and an array type error with hiding enabled.
|
|
379
|
+
|
|
380
|
+
|
|
381
|
+
## Choice-card branch details
|
|
382
|
+
|
|
383
|
+
Resolve each branch card's detail mode before dispatching its editor. GENERATE
|
|
384
|
+
must bypass registry selection, including a previously selected registered
|
|
385
|
+
layout; REGISTERED uses the resolved branch schema with the control's schema
|
|
386
|
+
scope, data path and document root. Inline layouts remain relative to the branch
|
|
387
|
+
value. Missing registrations fall back to generation. Value-choice cards do not
|
|
388
|
+
use branch editors.
|
|
389
|
+
|
|
390
|
+
Check generation with a matching registry, registry selection and fallback,
|
|
391
|
+
inline layouts, and editing a nested value through the renderer's registry.
|
|
392
|
+
|
|
393
|
+
## Button width and layout allocation
|
|
394
|
+
|
|
395
|
+
`options.fullWidth` fills the button's allocated cell; it does not allocate a
|
|
396
|
+
whole row. Applying it only to the wrapper leaves the visible button intrinsic.
|
|
397
|
+
Check two `options.layout.span: 6` buttons in a twelve-column horizontal layout:
|
|
398
|
+
each fills its own cell, remains beside its sibling and respects the gap.
|
|
399
|
+
Toggle true to false and omit the option; native intrinsic sizing returns.
|
|
400
|
+
|
|
401
|
+
## Experimental dynamic overlays: fallback is per evaluation
|
|
402
|
+
|
|
403
|
+
This entry applies to the experimental [§11 profile](spec.md#11-dynamic-values-and-path-grammar),
|
|
404
|
+
which does not establish cross-adapter conformance. Recompute overlays from the authored static
|
|
405
|
+
element on each evaluation. Starting from the last effective element leaves stale
|
|
406
|
+
readonly/presentation values when a condition stops matching. An invalid later
|
|
407
|
+
overlay preserves an earlier valid overlay from the same evaluation, not an older
|
|
408
|
+
runtime result. Generic resolver failures fall back; a syntactically safe JSON
|
|
409
|
+
value that an individual renderer rejects follows that renderer's ordinary
|
|
410
|
+
invalid-field behavior. The resolver has no target contract registry. Preserve
|
|
411
|
+
inherited restrictions regardless of an option override.
|
|
412
|
+
|
|
413
|
+
Proposed acceptance: a company rule sets readonly true; changing to a non-company
|
|
414
|
+
restores static false, while host readonly remains enforced. Repeat with a later
|
|
415
|
+
invalid expression and verify diagnostics without leaking bound values.
|
|
416
|
+
Do not copy every form-data node for each external-only overlay. Conservatively
|
|
417
|
+
identify referenced environment roots, and share validated immutable snapshots
|
|
418
|
+
between occurrences for one source namespace version. A trusted function may read
|
|
419
|
+
every root. Keep the combined size limit and prevent one function from mutating
|
|
420
|
+
a shared snapshot before another occurrence evaluates.
|
|
421
|
+
|
|
422
|
+
|
|
423
|
+
## Collection key snapshots must preserve literal keys
|
|
424
|
+
|
|
425
|
+
Do not identify a collection's keys by joining them with a delimiter. JSON object
|
|
426
|
+
keys may contain that delimiter, including escaped NUL characters: `["a", "b\u0000c"]`
|
|
427
|
+
and `["a", "b", "c"]` produce the same NUL-joined string. Use a lossless snapshot
|
|
428
|
+
(such as JSON encoding of the key array) or compare the arrays structurally.
|
|
429
|
+
Otherwise replacing properties can retain stale editors or miss pagination changes.
|
|
430
|
+
|
|
431
|
+
Acceptance: replace those two key lists at the same control path, check that every
|
|
432
|
+
new property is rendered and removed properties disappear, and verify that adding
|
|
433
|
+
an item selects its page.
|
|
434
|
+
|
|
435
|
+
## Template subscriptions and runtime bindings
|
|
436
|
+
|
|
437
|
+
Template subscriptions must follow replacement of the whole data value as well
|
|
438
|
+
as edits inside it. Property names are literal keys: `a.b` and nested `a.b`
|
|
439
|
+
are different dependencies, and primitive or null roots still need updates.
|
|
440
|
+
Use the framework's subscription/snapshot mechanism rather than a render-time
|
|
441
|
+
mutable path tracker that can retain an obsolete object or miss primitive reads.
|
|
442
|
+
|
|
443
|
+
Keep a compiled template's identity tied to its authored source. Changing runtime
|
|
444
|
+
bindings, including a stricter URL policy, must update the rendered output without
|
|
445
|
+
remounting unchanged controls or losing their unsaved drafts. A stable component
|
|
446
|
+
with context/props can carry current bindings without exposing speculative render
|
|
447
|
+
writes through refs shared with an already committed tree.
|
|
448
|
+
|
|
449
|
+
The `template-data-subscription-replacement` and
|
|
450
|
+
`template-policy-update-preserves-draft` vectors are framework-neutral acceptance
|
|
451
|
+
cases. A renderer adapter must execute them before reporting support.
|
|
452
|
+
|
|
453
|
+
## P20 — File operation feedback follows committed data
|
|
454
|
+
|
|
455
|
+
**Trap:** Publish a rejected file's size or a failed read as an owned validation
|
|
456
|
+
error while retaining the previous valid attachment. The form then becomes
|
|
457
|
+
invalid because of data it never stored. Conversely, accept an out-of-bounds
|
|
458
|
+
file with restriction disabled and show only transient local feedback.
|
|
459
|
+
|
|
460
|
+
**Behavior:** Reject a restricted size-invalid selection before reading, keep
|
|
461
|
+
the committed value and its validity, and show a local warning. A read or
|
|
462
|
+
conversion failure likewise preserves the committed value and shows a local
|
|
463
|
+
error. An unrestricted file that is successfully stored with a known invalid
|
|
464
|
+
original byte size contributes an owned size error. Pending reads participate
|
|
465
|
+
in command validity; imported encoded values have no inferred byte-size result.
|
|
466
|
+
|
|
467
|
+
**Check:** Begin with a valid attachment. Reject an oversized replacement and
|
|
468
|
+
fail a later read; verify the original value and validity remain, with warning
|
|
469
|
+
and error feedback respectively. Then turn restriction off, store a size-invalid
|
|
470
|
+
file, and verify its owned error joins host errors without replacing them.
|
|
471
|
+
See [file control](../examples/file-control/README.md).
|
|
472
|
+
|
|
473
|
+
## P21 — Imported choice errors belong to their item and field
|
|
474
|
+
|
|
475
|
+
**Trap:** Keep an out-of-domain array value visible as a pill while displaying
|
|
476
|
+
only errors reported at the array path. Validators report an invalid member at
|
|
477
|
+
the member path, so the field appears valid even though the document is not.
|
|
478
|
+
|
|
479
|
+
**Behavior:** Preserve the incoming value and its removal action. Mark the
|
|
480
|
+
specific invalid pill and expose its translated item error at the field. Keep
|
|
481
|
+
array-level constraints, such as `minItems`, alongside item errors. Schema
|
|
482
|
+
errors follow the form's validation visibility mode; host additional errors
|
|
483
|
+
remain visible. Removing or correcting the member clears its marker and message.
|
|
484
|
+
|
|
485
|
+
**Check:** In the [array choices](../examples/array-choices/README.md) example,
|
|
486
|
+
the imported `Fax` value remains visible but is marked invalid because the item
|
|
487
|
+
schema offers only `Email` and `SMS`. The other pill stays unmarked. Removing
|
|
488
|
+
`Fax` clears that item error without changing other array fields.
|
|
489
|
+
|
|
490
|
+
Invalid token outlines must remain visible on all four sides inside clipped or
|
|
491
|
+
scrollable multi-select containers. An outer box-shadow ring can be clipped at
|
|
492
|
+
the top and bottom; use an actual border or an inset outline, with the native
|
|
493
|
+
error color. Reserve the same border space on valid tokens to avoid size shifts.
|
|
494
|
+
Visual acceptance: the imported `Fax` pill has a continuous error-colored
|
|
495
|
+
outline around its rounded perimeter while `Email` remains unmarked, including
|
|
496
|
+
when tokens wrap or scroll.
|
|
497
|
+
|
|
498
|
+
## P22 — Portable actions require host registration
|
|
499
|
+
|
|
500
|
+
**Trap:** Render a Button from the shared UI schema and assume its `action`
|
|
501
|
+
name changes application state by itself. A dispatcher that accepts the event
|
|
502
|
+
without registering the command makes the button appear active but ineffective.
|
|
503
|
+
|
|
504
|
+
**Behavior:** Keep the action name and parameters in portable JSON. The host
|
|
505
|
+
registers the command and updates the form-level locale or theme state; the
|
|
506
|
+
renderer only dispatches and awaits the action. Scope the form surface and its theme
|
|
507
|
+
tokens together, so a light form stays readable in a dark application and vice versa.
|
|
508
|
+
Preserve any example-specific handler before applying a host fallback.
|
|
509
|
+
|
|
510
|
+
**Check:** In the [Job application](../examples/job-application/README.md),
|
|
511
|
+
activate Bulgarian and English and observe the form labels switch both ways
|
|
512
|
+
while the application language stays unchanged. Toggle theme twice and observe
|
|
513
|
+
the form return to its original mode while the application theme stays
|
|
514
|
+
unchanged. Check readable text and controls for both dark application/light form
|
|
515
|
+
and light application/dark form. Run these checks with direct
|
|
516
|
+
renderer and webcomponent hosts where both are supported.
|
|
517
|
+
|
|
518
|
+
|
|
519
|
+
## Experimental dynamic overlays: dispatch is only one consumer
|
|
520
|
+
|
|
521
|
+
Resolving an arbitrary extension option does not give a standard renderer a new
|
|
522
|
+
feature. Interactive examples should show supported presentation properties; keep
|
|
523
|
+
unconsumed extension payloads in resolver tests or explicitly identify their
|
|
524
|
+
custom consumer. Use catalog keys for visible prose and display bound technical
|
|
525
|
+
values separately when they do not need translation.
|
|
526
|
+
|
|
527
|
+
Capture actual focus ownership before replacing an editor, rather than retaining
|
|
528
|
+
the last element that ever received focus. React's pre-commit snapshot lifecycle
|
|
529
|
+
can capture that ownership before DOM removal; after commit, transfer only when
|
|
530
|
+
the old editor is disconnected and focus has not moved elsewhere. Pure resolution
|
|
531
|
+
caches may reuse immutable results, but must not publish form writes or committed
|
|
532
|
+
subscriptions from a speculative render.
|
|
533
|
+
|
|
534
|
+
Nested `$dynamic` metadata is not an instruction to the parent overlay walker.
|
|
535
|
+
Preserve it in object-valued detail slots as well as child arrays; resolve it only at the child
|
|
536
|
+
occurrence, either for dispatch or a parent reader using that same occurrence context. A detail may be reused in several rows, so
|
|
537
|
+
premature resolution can freeze the parent's item into every child. Exclude such
|
|
538
|
+
metadata from the parent's dependency inventory. Cells often receive an already
|
|
539
|
+
resolved data path, unlike Control renderers: do not append the scope twice when
|
|
540
|
+
constructing their `value` environment root. Array snapshots must reject indexed
|
|
541
|
+
getters without executing them, just like object snapshots.
|
|
542
|
+
|
|
543
|
+
A nonvisual aspect can resolve an element and delegate to the normal renderer,
|
|
544
|
+
but a parent may already have read its child's label or sizing. Share the same
|
|
545
|
+
per-occurrence resolution service with those parent consumers. Do not identify a
|
|
546
|
+
child by its evaluated label, or cache effective detail values solely by the shared
|
|
547
|
+
authored UI object.
|
|
548
|
+
Parents that inspect descendant scopes, types, or labels need an effective structural
|
|
549
|
+
view before making their decisions. This includes conditional detail filtering,
|
|
550
|
+
error summaries, data/validation indicators, tuple placement, card presentation,
|
|
551
|
+
and template inputs. Traverse structural `elements`, not arbitrary extension objects
|
|
552
|
+
or uninstantiated `options.detail`. Resolve a detail at its actual object/row path;
|
|
553
|
+
never reuse an outer row's item context for a nested collection. Preserve the
|
|
554
|
+
parent's filtering when dispatching that view rather than reconstructing the
|
|
555
|
+
unfiltered authored tree. Keep authored category/slot lookup identities separately
|
|
556
|
+
from effective presentation properties.
|
|
557
|
+
|
|
558
|
+
Proposed acceptance: move a child's scope from an absent conditional field to a
|
|
559
|
+
present invalid field; the child must remain visible, its indicator must count the
|
|
560
|
+
new field's error, and dispatch must use the same scope. Change an external label
|
|
561
|
+
again and retain the same editor instance. Reuse one detail in two rows and verify
|
|
562
|
+
that their item-bound labels remain distinct. A template must read the effective
|
|
563
|
+
child label through its original authored slot name, including after external
|
|
564
|
+
replacement. These are acceptance scenarios, not a claim of execution by every
|
|
565
|
+
adapter.
|
|
566
|
+
Same-component updates need reactive props; a different
|
|
567
|
+
selected component replaces only that subtree, discarding its local uncommitted
|
|
568
|
+
draft under §11.7. Internal editor replacements follow the same policy.
|
|
569
|
+
For a numeric input, typing `1e` may already have committed the valid prefix `1`;
|
|
570
|
+
the discarded draft is the incomplete suffix, not that committed value. Test
|
|
571
|
+
against the last committed form data rather than assuming it is the value from
|
|
572
|
+
before typing began. A slider's thumb is an editor focus target even when its
|
|
573
|
+
control exposes no native text input.
|
|
574
|
+
|
|
575
|
+
Proposed acceptance: in the [two-form playground](../examples/dynamic-playground/README.md),
|
|
576
|
+
change the plan label, switch automatic/radio/automatic, and toggle readonly. The
|
|
577
|
+
preview data and unrelated name editor survive; the configuration form remains
|
|
578
|
+
editable. Repeat with an uncommitted edit, IME and permission revocation before
|
|
579
|
+
claiming lifecycle support. These are adapter acceptance criteria; each
|
|
580
|
+
renderer/host combination needs its own evidence. See spec §11.7–11.10.
|
|
581
|
+
|
|
582
|
+
## Dynamic replacement and message fallback
|
|
583
|
+
|
|
584
|
+
Deep merging a new discriminated object can retain an old discriminator or condition.
|
|
585
|
+
Use a complete descriptor value such as `literal` or `bind` when changing
|
|
586
|
+
rule/detail shapes. Authored objects patch existing keys; descriptor results
|
|
587
|
+
replace their target completely. Literal payloads are not recursively evaluated. Check a complete
|
|
588
|
+
replacement for generic JSON safety before installing it; semantic target
|
|
589
|
+
validation belongs to the renderer or UI-schema validator. Changing an i18n prefix also requires changing
|
|
590
|
+
its fallback message. Empty prefixes are not translation opt-outs; use dedicated
|
|
591
|
+
keys for host text rather than allowing the supplied text to become a lookup key.
|
|
592
|
+
|
|
593
|
+
### Keep external input separate from dynamic activation
|
|
594
|
+
|
|
595
|
+
`external` is host data, available to template context even when overlays are disabled.
|
|
596
|
+
Only `config.jsonformsExtended.dynamic.enabled === true` activates overlays. Trusted
|
|
597
|
+
callbacks additionally require the exported `TRUST_DYNAMIC_FUNCTIONS` symbol at
|
|
598
|
+
`dynamic.trusted`; never accept a JSON flag or a lookalike symbol. A transparent
|
|
599
|
+
aspect may stay mounted while disabled, but must delegate without evaluating metadata.
|
|
600
|
+
|
|
601
|
+
### Lazy evaluator boundaries must survive bundling
|
|
602
|
+
|
|
603
|
+
A dynamic import does not guarantee a lazy bundle: package-based manual chunk
|
|
604
|
+
rules can merge the evaluator with an eager loader. Inspect the emitted static
|
|
605
|
+
import graph and keep expression runtimes out of eager package chunks. Retain
|
|
606
|
+
snapshot validation; avoid repeating pure resolution instead of bypassing the
|
|
607
|
+
JSON-safety contract. Share results only for identical authored elements and
|
|
608
|
+
referenced inputs, including trust and evaluator readiness.
|
|
609
|
+
|
|
610
|
+
Proposed acceptance: no evaluator request while disabled; concurrent activation
|
|
611
|
+
shares preparation; initially enabled forms do not mount editable fallback
|
|
612
|
+
editors; live activation retains draft state; disabling or disposing during load
|
|
613
|
+
ignores stale completion; failure is visible and reactivation retries. Check that
|
|
614
|
+
a cached pre-preparation failure is not reused after preparation succeeds.
|
|
615
|
+
|
|
616
|
+
### Parent tester inputs and the static fast path
|
|
617
|
+
|
|
618
|
+
Resolving structural children only inside a selected parent cannot affect its
|
|
619
|
+
selection. A parent tester that checks child types must receive the effective
|
|
620
|
+
structural view before ranking. A nonvisual aspect may need to recognize metadata
|
|
621
|
+
on descendants even when the parent has none. Bypass its immediate redispatch
|
|
622
|
+
without bypassing the children, including when activation is disabled and the
|
|
623
|
+
children still carry authored metadata.
|
|
624
|
+
|
|
625
|
+
Cache metadata-presence checks by immutable UI identity. An unchanged static tree
|
|
626
|
+
must not repeatedly traverse descendants, snapshot environment roots, evaluate
|
|
627
|
+
expressions or subscribe its resolver to unrelated external inputs. A new authored
|
|
628
|
+
object gets its own presence result. This is a constant-time fast path after an
|
|
629
|
+
initial scan, not a claim of literally zero execution cost.
|
|
630
|
+
|
|
631
|
+
Proposed acceptance: a categorization with no own overlay has a child whose type
|
|
632
|
+
changes dynamically. Parent selection must follow that effective type. Preserve
|
|
633
|
+
drafts for label-only changes; switch only the selected parent subtree when its
|
|
634
|
+
tester result changes. Reuse the same detail for distinct rows, then reorder them
|
|
635
|
+
and verify independent selection. These scenarios supplement the parent-reader
|
|
636
|
+
acceptance cases above.
|
|
637
|
+
|
|
638
|
+
## P23 — Input adornments are content, not component props
|
|
639
|
+
|
|
640
|
+
**Trap:** Pass a portable icon object directly to a UI library's string-only
|
|
641
|
+
prefix/suffix prop or concatenate a unit into the stored value. Rendering an
|
|
642
|
+
adornment beside a separately bordered input makes it a neighboring layout
|
|
643
|
+
element rather than part of the field. Putting a start adornment between the
|
|
644
|
+
picker or swatch and its input, or placing it on top of a color, cron, or
|
|
645
|
+
duration trigger, reverses or obscures native controls. An end adornment can
|
|
646
|
+
likewise cover clear, dropdown, picker, reveal, validation, or browser number
|
|
647
|
+
stepper controls. Reserving only text padding does not prevent an absolutely
|
|
648
|
+
positioned clear button from covering an end icon or suffix text. A native
|
|
649
|
+
select's browser-drawn arrow can stay at the physical edge even after the
|
|
650
|
+
value receives extra end padding; a separate combobox trigger can do the same.
|
|
651
|
+
A tooltip rendered inside a clipped field wrapper may appear as a thin sliver
|
|
652
|
+
instead of readable help.
|
|
653
|
+
|
|
654
|
+
A wrapper that measures padding already adjusted for adornments can add space
|
|
655
|
+
on each hover or focus render; animating that padding makes the value slide.
|
|
656
|
+
Focused field layers can hide the start icon. A clear action added after a
|
|
657
|
+
persistent password reveal action can move the reveal action or leave an empty
|
|
658
|
+
slot. Making clear permanently visible on date, date-time, or time fields can
|
|
659
|
+
also change the control's usual hover/focus behavior. Mixing a text
|
|
660
|
+
multiplication sign or a filled action button with the UI library's clear icon
|
|
661
|
+
makes numeric controls look like a different action from text and temporal
|
|
662
|
+
controls. A tooltip that extends
|
|
663
|
+
beyond the viewport can toggle horizontal scrolling and make the whole page
|
|
664
|
+
appear to shake.
|
|
665
|
+
An independently styled dark tooltip can ignore the renderer family's theme
|
|
666
|
+
and become illegible in dark mode. Guessing native field parts from CSS class
|
|
667
|
+
substrings such as `start-` and `end-` can move an unrelated positioned element
|
|
668
|
+
or miss a library control after a class-name change.
|
|
669
|
+
|
|
670
|
+
**Behavior:** Normalize a literal string, object, or object array. Resolve each
|
|
671
|
+
object's independent translation prefix; map semantic icon IDs locally and
|
|
672
|
+
preserve the localized accessible label and focusable tooltip. Compose content
|
|
673
|
+
at the logical input edge without changing parsing, storage, focus, validation,
|
|
674
|
+
or built-in controls. Decide support from the actual text-entry surface, not
|
|
675
|
+
only `type: string` or `format`. Time, duration, cron, password, color, masked,
|
|
676
|
+
and editable choice inputs can qualify; a segmented OTP, code editor, or other
|
|
677
|
+
composite needs a coherent outer field boundary before it can qualify.
|
|
678
|
+
Normally put start before native leading icons and end after native trailing
|
|
679
|
+
icons. Reserve separate, stable space for the value, leading triggers, trailing
|
|
680
|
+
actions, and adornments; account for the browser's number stepper as well as
|
|
681
|
+
renderer-owned controls. Move a choice arrow or trigger into that reserved
|
|
682
|
+
space; padding the selected text alone does not move it. Keep tooltip content
|
|
683
|
+
unclipped and within the viewport. Preserve the renderer's normal clear
|
|
684
|
+
visibility policy: if clear appears on hover or focus, do not make it
|
|
685
|
+
permanently visible when composing adornments. Use the same UI-library
|
|
686
|
+
clear icon and neutral button treatment across comparable field types,
|
|
687
|
+
including numeric and temporal inputs. Give icon-only picker triggers and
|
|
688
|
+
clear buttons visible tooltips as well as accessible names. Translate those
|
|
689
|
+
tooltips with the active locale, including after a live locale change. Keep a
|
|
690
|
+
persistent password reveal action in a fixed position, normally after a conditional clear action
|
|
691
|
+
and before the end adornment. Keep informational content visible while
|
|
692
|
+
the input is focused and edited. Follow a UI library's established slot order where applicable while
|
|
693
|
+
preserving familiar placement and operability. Unsupported editor variants
|
|
694
|
+
should report a capability gap rather than silently dropping adornments.
|
|
695
|
+
Use the family's tooltip treatment and theme colors. Identify native parts
|
|
696
|
+
through stable library slots or explicit renderer integration where available;
|
|
697
|
+
verify positioning after a library update.
|
|
698
|
+
|
|
699
|
+
**Check:** Use [input adornments](../examples/input-adornments/README.md) in
|
|
700
|
+
both locales and writing directions. Edit, clear, reload, focus the help icon,
|
|
701
|
+
and compare saved JSON before/after a locale change. An icon mapping miss shows
|
|
702
|
+
its localized label. Date/time/date-time, duration, cron, and color start
|
|
703
|
+
adornments sit outside their picker icons, swatches, and triggers. Password
|
|
704
|
+
reveal/clear, choice arrows, and number steppers remain visible and operable
|
|
705
|
+
before end adornments unless the library's standard slot order applies. On a
|
|
706
|
+
number input, hover to show the browser stepper, increment and decrement, then
|
|
707
|
+
use clear: the stepper and clear must have distinct hit targets. Typed text,
|
|
708
|
+
picker edits, and reveal toggles retain their original data and focus
|
|
709
|
+
semantics. Compare value, adornment, picker, stepper, and clear-button bounds
|
|
710
|
+
at rest, on hover, during focus, and while editing; none should jump,
|
|
711
|
+
disappear, or overlap. In particular, check the start icon while typing,
|
|
712
|
+
suffix text and icons when clear appears, and the password reveal position as
|
|
713
|
+
clear appears and disappears. Check that the password value and masked glyphs
|
|
714
|
+
have visible space after the reveal icon. Test both a native select arrow and
|
|
715
|
+
a separately positioned combobox trigger with an end adornment; the text,
|
|
716
|
+
arrow, clear action, and adornment need distinct hit areas. On date,
|
|
717
|
+
date-time, and time controls whose clear is normally conditional, verify that
|
|
718
|
+
it is hidden at rest, appears on hover or focus, and remains keyboard
|
|
719
|
+
accessible. Check picker and clear tooltips in both supported locales and
|
|
720
|
+
after switching locale while the control remains mounted. Compare the rendered
|
|
721
|
+
clear icon and button treatment on text, number, integer, date, date-time, and
|
|
722
|
+
time controls. Tooltip hover must leave
|
|
723
|
+
document width and horizontal scroll unchanged. Inspect the rendered field,
|
|
724
|
+
not just DOM order or declared padding, since browser controls and component
|
|
725
|
+
styles can change the actual positions.
|
|
726
|
+
Check tooltip contrast in light and dark themes, and verify that start/end
|
|
727
|
+
spacing does not move unrelated positioned controls.
|
|
728
|
+
|
|
729
|
+
## P24 — Popup actions keep their distinct meanings and fit the viewport
|
|
730
|
+
|
|
731
|
+
**Trap:** Put a duration unit's remove action inside its numeric input, where
|
|
732
|
+
it reads as “clear this number,” or align a separate remove button against the
|
|
733
|
+
label rather than the input. Let different unit-label widths change the
|
|
734
|
+
adjacent input width from row to row. Give the button the same visual
|
|
735
|
+
treatment as a value clear action. Apply a small fixed maximum height to a
|
|
736
|
+
duration popup so it scrolls even when the viewport has room. Omit the clear
|
|
737
|
+
action from the cron popup's Expression field while providing it on other
|
|
738
|
+
fields, or show clear permanently or for an empty value. Hiding a conditional
|
|
739
|
+
clear button with CSS visibility also removes it from the accessibility tree
|
|
740
|
+
and keyboard focus order, so focusing the button cannot reveal it. Style
|
|
741
|
+
Cron Apply as a secondary action while the comparable duration popup uses the theme primary
|
|
742
|
+
action.
|
|
743
|
+
|
|
744
|
+
**Behavior:** A duration Remove unit action removes that component from the
|
|
745
|
+
staged duration; it is separate from clearing the whole duration or editing a
|
|
746
|
+
component's quantity. Present number, unit name, and remove action as one
|
|
747
|
+
aligned row, with consistent numeric-input and unit-label columns across all
|
|
748
|
+
rows, the remove action outside the numeric field, and an accessible
|
|
749
|
+
unit-specific name. Preserve the final-unit restriction and Apply/Cancel or
|
|
750
|
+
immediate-update semantics. Size popups from the space available above or below
|
|
751
|
+
the trigger; allow vertical scrolling when content genuinely exceeds that
|
|
752
|
+
space. A cron popup input, including Expression, offers its own clear action
|
|
753
|
+
when it contains text and the field is hovered or focused. Keep that action
|
|
754
|
+
keyboard reachable while it is visually quiet at rest; focus must reveal it.
|
|
755
|
+
Clearing that draft uses the same validation and commit rules as typing into the field. Give the
|
|
756
|
+
Cron Apply action the theme primary treatment and Cancel the secondary
|
|
757
|
+
treatment, consistent with other popup editors.
|
|
758
|
+
|
|
759
|
+
Cron picker rows should identify each field visibly, including the raw Expression
|
|
760
|
+
editor. Give selectable time fields a compact summary of chosen values, a
|
|
761
|
+
scrollable list for long ranges such as seconds and minutes, and a separate
|
|
762
|
+
clear action that returns that field to Every. Multi-selection must keep the
|
|
763
|
+
list usable across successive choices and preserve unrelated expression fields.
|
|
764
|
+
An accessible name alone does not explain an unlabeled raw expression box to a
|
|
765
|
+
sighted user. Native library styling may differ, but the row labels, selected
|
|
766
|
+
summary, clear meaning, and draft behavior should agree across renderers.
|
|
767
|
+
|
|
768
|
+
A color picker should expose a labeled Clear value action at the bottom of
|
|
769
|
+
its app-owned panel when a value is present and clearing is allowed. It must
|
|
770
|
+
use the same empty-value contract as the field-level clear action. Opening the
|
|
771
|
+
field's picker should reveal the color-selection controls immediately; a large
|
|
772
|
+
native color-input swatch inside an app popover creates a second dialog when
|
|
773
|
+
activated. A browser-native color dialog cannot host application buttons, so a
|
|
774
|
+
renderer that needs Clear value in the picker should use an app-owned spectrum
|
|
775
|
+
and controls in that single panel. A renderer that uses a native dialog instead
|
|
776
|
+
must expose clear separately and record that platform limitation.
|
|
777
|
+
|
|
778
|
+
**Check:** Open a duration with at least two units. Compare the numeric input
|
|
779
|
+
and Remove unit button centers; compare the input right edges and label start
|
|
780
|
+
edges across rows. Activate Remove Hours and verify that the draft loses the
|
|
781
|
+
hour component, while committed data changes only at the configured commit
|
|
782
|
+
step. Confirm that the X is visibly outside the input and
|
|
783
|
+
remains distinct from the whole-value clear button. On a tall viewport, a short duration popup
|
|
784
|
+
fits without an internal scrollbar; on a short viewport, its actions stay
|
|
785
|
+
reachable by scrolling. In the cron popup, focus and hover the nonempty
|
|
786
|
+
Expression field, clear it, and verify the draft becomes empty while the
|
|
787
|
+
committed value follows the configured Apply/Cancel or immediate mode. Check
|
|
788
|
+
that an empty Expression field has no clear action. With a nonempty Seconds
|
|
789
|
+
field, locate its reset action by accessible name before hover, focus it from
|
|
790
|
+
the keyboard, and verify that it appears and resets only Seconds. Compare
|
|
791
|
+
Cron Apply with Duration Apply and confirm both use the theme primary button treatment.
|
|
792
|
+
Select two minutes in succession from the scrolling choice list, confirm both
|
|
793
|
+
appear in the compact summary and draft expression, then clear Minutes to
|
|
794
|
+
Every without changing the other fields. Check that Expression has a visible
|
|
795
|
+
label in both populated and empty pickers.
|
|
796
|
+
Open a populated color picker and activate the footer Clear value action;
|
|
797
|
+
verify the stored property is removed. Repeat with an empty value, clearing
|
|
798
|
+
disabled, and a readonly control; the footer action must be absent or disabled.
|
|
799
|
+
Activate the field's picker and verify that saturation, hue and channel editing
|
|
800
|
+
are usable immediately, without activating another swatch or opening a second
|
|
801
|
+
dialog. Use pointer and keyboard editing, then clear from the same panel.
|
|
802
|
+
Test the footer action and the color-selection surface through each renderer.
|