@chobantonov/jsonforms-extended-spec 0.0.0-stage → 0.3.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 +2680 -0
- package/conformance/behavior.json +1602 -0
- package/conformance/config-consumption.json +1542 -0
- package/conformance/expected-invalid.json +20 -0
- package/docs/audit.md +150 -0
- package/docs/conditional-fields.md +122 -0
- package/docs/draft-07-visual-support.md +43 -0
- package/docs/external-resources-proposal.md +536 -0
- package/docs/implementation-guide.md +233 -0
- package/docs/implementation-pitfalls.md +968 -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 +8470 -0
- package/docs/todo.md +166 -0
- package/examples/README.md +127 -0
- package/examples/additional-errors/README.md +176 -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 +203 -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 +154 -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 +27 -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 +32 -0
- package/examples/conditional-fields/uischema.json +131 -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 +241 -0
- package/examples/label-interpolation/config.json +14 -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 +379 -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 +82 -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 +332 -0
- package/schemas/jsonforms-extended-uischema.schema.json +1932 -0
- package/schemas/jsonforms-rule.schema.json +104 -0
- package/schemas/jsonforms-uischema.schema.json +1434 -0
- package/typescript/README.md +546 -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 +385 -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 +428 -0
- package/typescript/src/authoring/schemaTypes.ts +143 -0
- package/typescript/src/index.ts +4 -0
- package/typescript/test/schemaContract.test.ts +638 -0
- package/typescript/test/tsconfig.json +10 -0
- package/typescript/test/typedAuthoring.test.ts +151 -0
- package/typescript/test/typedAuthoringCoverage.test.ts +178 -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,233 @@
|
|
|
1
|
+
# Renderer implementation guide
|
|
2
|
+
|
|
3
|
+
This guide is for new renderer implementations, including ports to other languages and UI libraries. The goal is comparable supported functionality, interactions and information placement. Internal architecture and exact pixels need not match.
|
|
4
|
+
|
|
5
|
+
## Read before implementing
|
|
6
|
+
|
|
7
|
+
1. [Specification](spec.md): portable data, UI schema and option semantics.
|
|
8
|
+
2. [Renderer and demo acceptance guide](renderer-and-demo.md): native component usage, presentation and demo requirements.
|
|
9
|
+
3. [Renderer selection](renderer-selection.md): selection and precedence.
|
|
10
|
+
4. [Implementation pitfalls](implementation-pitfalls.md): easily overlooked behavioral distinctions and acceptance cases.
|
|
11
|
+
5. [Web and TypeScript notes](implementation-web-typescript.md), where applicable.
|
|
12
|
+
6. [Behavior vectors](../conformance/behavior.json) and [examples](../examples/README.md).
|
|
13
|
+
|
|
14
|
+
The specification and renderer acceptance guide govern requirements. This guide explains how to preserve them; it does not turn gaps in an existing implementation into the contract. The [Draft-07 audit](draft-07-visual-support.md) records known limits, not a universal certification. If these documents conflict, identify and reconcile the conflict instead of silently copying a reference implementation.
|
|
15
|
+
|
|
16
|
+
## What a comparable implementation preserves
|
|
17
|
+
|
|
18
|
+
- Typed JSON values, literal keys, schema constraints and data paths.
|
|
19
|
+
- Renderer selection, option precedence and supported authoring capabilities.
|
|
20
|
+
- Field labels, descriptions, local errors, container errors and action placement.
|
|
21
|
+
- Confirmation, selection, editing, focus and keyboard behavior. Independent informational overlays must not acquire dismissal ownership over edit dialogs merely through native stack order.
|
|
22
|
+
- Translated built-in and authored text, including error overrides.
|
|
23
|
+
- Search and sorting based on displayed summaries where specified.
|
|
24
|
+
- Responsive containment, collection boundaries and pagination placement.
|
|
25
|
+
|
|
26
|
+
Use native components and theme tokens. A native error icon may differ in shape; the error must still identify the same field and be discoverable at the same logical location. Framework-specific implementation details are not required APIs.
|
|
27
|
+
|
|
28
|
+
## Presentation acceptance checklist
|
|
29
|
+
|
|
30
|
+
| Element | Expected relationship |
|
|
31
|
+
| --- | --- |
|
|
32
|
+
| Ordinary control | One field label associated with the editor; description/help follows the control's documented visibility policy. Errors take precedence over ordinary help. |
|
|
33
|
+
| Input adornment | Apply to supported input-like variants, including time, duration, cron and password where they expose a coherent text-entry surface. By default, start sits before native leading icons and end after native trailing icons. Use an established library slot order where applicable; translated content remains accessible without entering the value or obscuring built-in actions. |
|
|
34
|
+
| Invalid ordinary control | Native invalid styling, accessible state and the applicable error indicator; readable error text below the control. Tooltip-only feedback is insufficient. |
|
|
35
|
+
| Table cell | Column header supplies the label. Compact local feedback belongs beside/in the cell; error text is available through the accessible indicator/tooltip instead of expanding every row. |
|
|
36
|
+
| Container | Direct errors stay at the container boundary; descendant errors use a localized summary and do not replace field-level feedback. |
|
|
37
|
+
| Dynamic property | One property-name label. Name error indicator stays beside it, with edit/delete actions aligned separately. |
|
|
38
|
+
| Object | The resolved Group identifies the object boundary. Do not replace it with a VerticalLayout merely because the title is absent. Omit empty static sections and redundant internal frames. |
|
|
39
|
+
| Collection | Pagination remains inside the collection boundary, below its content. |
|
|
40
|
+
| Composition | A sole applicable branch needs no branch navigation; several alternatives retain the relevant selector. |
|
|
41
|
+
|
|
42
|
+
These are semantic locations, not fixed coordinates. Follow the detailed feature rules for exceptions, such as boolean labels or explicitly hidden labels.
|
|
43
|
+
|
|
44
|
+
## Acceptance process for a new port
|
|
45
|
+
|
|
46
|
+
Maintain a capability table with **supported**, **partial**, **unsupported**, and **not verified** states. For each departure, state the platform reason, affected scenarios and accessible alternative. Do not silently substitute a text box for a structured editor and call the feature supported.
|
|
47
|
+
|
|
48
|
+
For each feature test: initial mount, editing, external data replacement, missing/invalid data, disabled/read-only behavior, translation, keyboard operation and narrow layouts. Test through the real renderer registry as well as unit helpers. Use the examples' invalid data deliberately; rendering without exceptions does not prove that all valid values are reachable.
|
|
49
|
+
|
|
50
|
+
Behavior vectors are adapter inputs, not proof that a renderer passed. Each port should record its executed cases and results. Supplement them with interaction tests and browser/native UI checks. For schema transformations compare validation before and after transformation, then separately check that the UI exposes the intended editors.
|
|
51
|
+
|
|
52
|
+
Measure expensive paths: compilation reuse, active versus inactive branch work, large collections, nested compositions and typing responsiveness. Bound schema traversal and distinguish reference cycles from legitimate recursive child editing. Do not claim arbitrary recursive-schema support from a mount-only test.
|
|
53
|
+
|
|
54
|
+
## Recording future lessons
|
|
55
|
+
|
|
56
|
+
When work reveals an ambiguity or a commonly overlooked behavior:
|
|
57
|
+
|
|
58
|
+
1. Decide whether it changes the portable contract. If so, clarify the relevant specification section.
|
|
59
|
+
2. Add or update a pitfalls entry: expected behavior, tempting mistake, consequence and acceptance case.
|
|
60
|
+
3. Add a framework-neutral behavior vector or worked example when practical, then an implementation-specific regression test.
|
|
61
|
+
4. Record platform limits explicitly. Keep normative requirements separate from optimization advice and implementation certification.
|
|
62
|
+
5. Link the new material from the relevant example or guide.
|
|
63
|
+
|
|
64
|
+
Do not catalogue every typo, missing import or accidental regression. Record lessons another competent implementer could reasonably miss when reading the schema/specification. Describe the final behavior rather than a chronological bug history. The entries below were seeded from renderer fixes and existing spec material; they are not an exhaustive audit of all historical changes.
|
|
65
|
+
|
|
66
|
+
### Authoring mixed values as JSON code
|
|
67
|
+
|
|
68
|
+
Set `options.structuredLayout: "code"` on a mixed Control, or `jsonformsExtended.mixed.structuredLayout: "code"` in config. Tree remains the default. Code mode edits the entire value, including scalars and null, without a separate type selector. It requires the extended Monaco renderer registry and the additional-error provider (`ExtendedJsonForms`, or the additional-error store integration).
|
|
69
|
+
|
|
70
|
+
Monaco validates the bound section schema, with local references resolved against the document schema. Invalid JSON text stays in the editor and contributes an owner-scoped additional error; it must not overwrite the last parsed value. Parsed values update normally and AJV reports schema errors. Do not duplicate Monaco schema diagnostics into additional errors. Hosts must gate submission on additional errors as well as schema errors, because an invalid draft is newer than the stored value. Multiple editor models must retain independent schema registrations and clean them up on unmount.
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
## Recursive node tree presentation
|
|
74
|
+
|
|
75
|
+
A Control can opt into a tree with a selected-node detail pane using
|
|
76
|
+
`options.recursiveTree: { childrenProperty: "children", labelProperty: "name" }`.
|
|
77
|
+
Both properties name direct members of each node, not dotted paths. The tree
|
|
78
|
+
omits intermediate collection and scalar-property entries. Unnamed nodes use
|
|
79
|
+
an index label. The optional `detail` UI schema is relative to the selected node;
|
|
80
|
+
it must not enable recursiveTree again. Branch layouts from the UI schema
|
|
81
|
+
registry remain available. Without this option, recursive controls retain their
|
|
82
|
+
existing nested presentation. This differs from mixed `structuredLayout: "tree"`,
|
|
83
|
+
which navigates arbitrary JSON structure.
|
|
84
|
+
|
|
85
|
+
The selected node's child collection retains native add/delete behavior and
|
|
86
|
+
uses links to child editors rather than recursively expanding their fields.
|
|
87
|
+
Tree rows also expose rename and delete actions. Rename edits the configured
|
|
88
|
+
label property's value, not an object key, and validates the new value against
|
|
89
|
+
its schema. Delete removes the node from its parent's child array and respects
|
|
90
|
+
minItems, read-only ancestors, and deletion confirmation (the mixed catalog).
|
|
91
|
+
The displayed root cannot be deleted. Confirmation rechecks the current target
|
|
92
|
+
and permissions to avoid deleting a replacement node at a reused array index.
|
|
93
|
+
Editing a node preserves sibling data. Node error indicators include descendants
|
|
94
|
+
and follow the container-indicator and validation-visibility settings. After a
|
|
95
|
+
selected node is removed, select its closest remaining parent. Navigation remains
|
|
96
|
+
available in read-only forms; mutations remain disabled.
|
|
97
|
+
|
|
98
|
+
The recursive-tree example includes a Tree editor tab for comparison.
|
|
99
|
+
|
|
100
|
+
## Array detail resolution
|
|
101
|
+
|
|
102
|
+
Array controls support these case-insensitive string modes:
|
|
103
|
+
|
|
104
|
+
| detail | Behavior |
|
|
105
|
+
| --- | --- |
|
|
106
|
+
| Omitted or DEFAULT | Keep normal array presentation. Schema nesting may still require a nested editor. |
|
|
107
|
+
| GENERATE | Use a nested editor and generate its detail UI schema without consulting the registry. |
|
|
108
|
+
| REGISTERED | Use a nested editor; consult the UI-schema registry, then generate if no entry matches. |
|
|
109
|
+
| Other strings, including GENERATED | Same registry-first behavior as REGISTERED, matching JSON Forms core. |
|
|
110
|
+
| Inline UI schema | Use that layout for the item, with scopes relative to the item schema. |
|
|
111
|
+
|
|
112
|
+
GENERATE is the canonical upstream implementation spelling. The upstream controls
|
|
113
|
+
webpage says GENERATED, but that spelling does not bypass the registry in core.
|
|
114
|
+
An explicit table option retains this project's table-selection precedence.
|
|
115
|
+
Registry lookup and detail rendering are separate from renderer selection:
|
|
116
|
+
DEFAULT does not force a table for structurally nested items.
|
|
117
|
+
Use the existing detail mechanism for custom layouts instead of inventing a
|
|
118
|
+
second generated/registered switch.
|
|
119
|
+
|
|
120
|
+
The array-detail-modes example demonstrates a matching registry entry, generation,
|
|
121
|
+
inline layout, DEFAULT, and registry fallback.
|
|
122
|
+
|
|
123
|
+
## Editor detail modes and mixed type overrides
|
|
124
|
+
|
|
125
|
+
The detail resolver is also used for object and mixed editors. Explicit editor
|
|
126
|
+
details in composite cells, tuple-field editors, recursiveTree.detail, and row
|
|
127
|
+
editors accept the same string modes or inline layout. GENERATE bypasses registry
|
|
128
|
+
lookup and preserves that intent through a fallback Control. REGISTERED and other
|
|
129
|
+
strings use the registry before the context-specific fallback. DEFAULT preserves
|
|
130
|
+
normal presentation; it does not mean table outside array selection. An omitted
|
|
131
|
+
option retains the editor's existing default, which may already be a registered
|
|
132
|
+
layout. Scopes in inline layouts are relative to the edited value's schema.
|
|
133
|
+
|
|
134
|
+
Tuple container detail remains a position layout scoped to the whole tuple.
|
|
135
|
+
Do not apply an array-item editor layout to each tuple position.
|
|
136
|
+
|
|
137
|
+
Mixed controls accept object-detail, array-detail, string-detail, number-detail,
|
|
138
|
+
integer-detail, boolean-detail, and null-detail. For the current mixed value,
|
|
139
|
+
the selected type's option takes precedence over detail, including string modes.
|
|
140
|
+
This is a project extension, not a new upstream detail mode. It does not change
|
|
141
|
+
structuredLayout (tree/nested/code). Tree mode uses it for that mixed value's root
|
|
142
|
+
detail pane; it does not impose a root-specific layout on every descendant.
|
|
143
|
+
Code presentation edits the whole value and does not use these field layouts.
|
|
144
|
+
Null retains the existing no-value-control presentation.
|
|
145
|
+
|
|
146
|
+
See the editor-details example.
|
|
147
|
+
|
|
148
|
+
## Named templates are separate from ranked detail lookup
|
|
149
|
+
|
|
150
|
+
Resolve Template.name against entry.uischema.name in registry order without
|
|
151
|
+
calling testers. Slot.name resolves the inherited caller-content map, with local
|
|
152
|
+
named children overriding it; fallback is the first Slot.elements child.
|
|
153
|
+
Preserve schema, path and enabled state through both dispatches. A UI-model name
|
|
154
|
+
is not a data binding. Named-only registry entries should return -1 from testers
|
|
155
|
+
so ordinary detail selection does not accidentally choose them.
|
|
156
|
+
|
|
157
|
+
The template-slots example covers supplied content, fallback, empty slots and
|
|
158
|
+
nested overrides. Implementations should also check missing-name diagnostics,
|
|
159
|
+
duplicate-name diagnostics and cycle protection against the normative requirements.
|
|
160
|
+
|
|
161
|
+
## Conditional fields
|
|
162
|
+
|
|
163
|
+
See [conditional field presentation and graphical authoring](conditional-fields.md).
|
|
164
|
+
Use `options.conditionalFields: true` on an object Control or an object-context
|
|
165
|
+
layout entry (VerticalLayout, HorizontalLayout, Group or Categorization), or use
|
|
166
|
+
`config.jsonformsExtended.conditionalFields` as the default. Local false opts out.
|
|
167
|
+
The entry owns the projection for descendant layouts and Categories at that
|
|
168
|
+
object boundary. Nested object and array-item boundaries resolve independently.
|
|
169
|
+
Explicit layouts preserve placement and update conditional required indicators
|
|
170
|
+
without generating extra controls. See the conditional-fields contract for
|
|
171
|
+
ownership, validation, examples and platform support limits.
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
## Choice-card branch details
|
|
175
|
+
|
|
176
|
+
Resolve each branch card's detail mode before dispatching its editor. GENERATE
|
|
177
|
+
must bypass registry selection, including a previously selected registered
|
|
178
|
+
layout; REGISTERED uses the resolved branch schema with the control's schema
|
|
179
|
+
scope, data path and document root. Inline layouts remain relative to the branch
|
|
180
|
+
value. Missing registrations fall back to generation. Value-choice cards do not
|
|
181
|
+
use branch editors.
|
|
182
|
+
|
|
183
|
+
The choice-controls Card detail modes example covers generation with a matching
|
|
184
|
+
registry, registry selection and fallback, inline layouts, and editing a nested
|
|
185
|
+
value. Check the example in English and Bulgarian, including registry fallback
|
|
186
|
+
for Postal mail.
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
## Comparable renderer contract tests
|
|
190
|
+
|
|
191
|
+
Maintain matching behavioral cases for each supported renderer family. Shared
|
|
192
|
+
helper tests establish the helper policy, while renderer integration tests must
|
|
193
|
+
also verify that the real registry supplies the context, options, validator and
|
|
194
|
+
callbacks required to apply it. Use the same input data, option-precedence cases,
|
|
195
|
+
expected committed values and cancellation outcomes across families. Adapt widget
|
|
196
|
+
selectors and host wrappers to each UI library.
|
|
197
|
+
|
|
198
|
+
Exercise non-default states as well as initial rendering. Include clearing by
|
|
199
|
+
button and by deleting text, literal dynamic keys, referenced isolated schemas,
|
|
200
|
+
confirmation accept/cancel and policy overrides, locale changes, external data
|
|
201
|
+
replacement, focus retention, array reorder/deletion, and temporal serialization
|
|
202
|
+
and bounds. Rendering an example establishes only the assertions executed by that
|
|
203
|
+
test. Record missing renderer or browser interaction coverage explicitly.
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
## Verify native adapter policy boundaries
|
|
207
|
+
|
|
208
|
+
After testing shared logic, execute the same operation through each native registry.
|
|
209
|
+
Check script permission and pending action behavior, batch deletion confirmation,
|
|
210
|
+
and accessible unset/invalid primitive status. A rendering slot does not imply its
|
|
211
|
+
operation policy is connected. See [adapter boundaries](implementation-pitfalls.md#adapter-boundaries-must-retain-operation-semantics)
|
|
212
|
+
and the proposed `adapter-operation-policy` and `primitive-presence-presentation`
|
|
213
|
+
vectors. Record actual host test results separately from proposed vectors.
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
## Host styling hooks depend on the rendering platform
|
|
217
|
+
|
|
218
|
+
Implement the contracts in [§5.7](spec.md#57-host-styling-markers) and
|
|
219
|
+
[§9.4a](spec.md#94a-styling-named-substitutions) at the layout-slot and Label
|
|
220
|
+
text boundaries. Keep host CSS separate from the form definition. A DOM host
|
|
221
|
+
needs access to the relevant styling boundary; document Shadow Root limits.
|
|
222
|
+
A native or canvas renderer may expose equivalent names or document a no-op.
|
|
223
|
+
Do not infer support from the implementation language or report a no-op as
|
|
224
|
+
implemented CSS hooks.
|
|
225
|
+
|
|
226
|
+
Compare marker-enabled and marker-disabled Markdown output after unwrapping
|
|
227
|
+
only generated spans. Preserve parsing and URL decisions, and use unmarked
|
|
228
|
+
output if equivalence is uncertain. Resolve the Label's own `options.textParamSpans`
|
|
229
|
+
before the host default and then false; explicit false must survive option
|
|
230
|
+
merging. The host default is not a permission gate, and layout options do not
|
|
231
|
+
cascade. Skip tracking and additional parsing when the effective value is false. See the [pitfall](implementation-pitfalls.md#host-styling-markers-must-not-change-content)
|
|
232
|
+
and the acceptance cases in the [Label example](../examples/label-interpolation/README.md).
|
|
233
|
+
Renderer support remains unverified until an adapter executes the cases.
|