You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@causeway.apache.org by da...@apache.org on 2026/08/25 11:23:42 UTC
(causeway) 05/13: makes Vaadin the default web-component editor toolkit
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a commit to branch htmx
in repository https://gitbox.apache.org/repos/asf/causeway.git
commit fb3928e803b7fa3c03133542537c97d3e081c29a
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Tue Aug 25 06:32:00 2026 +0100
makes Vaadin the default web-component editor toolkit
---
.../evidence/REPRODUCING.md | 66 +
.../evidence/baseline.md | 29 +
.../evidence/final-gate-results.md | 31 +
.../evidence/implementation-report.md | 39 +
.../evidence/policy-matrix.md | 17 +
.../evidence/production-isolation.md | 24 +
.../evidence/results/field-browser.json | 80 +
.../evidence/results/reference-browser.json | 1602 ++++++++++++++++++++
.../tasks.md | 110 +-
.../htmx/src/main/resources/application.properties | 2 -
.../htmx/ReferenceAppHtmxPlaywrightTest.java | 53 +-
.../ReferenceAppHtmxApplication_IntegTest.java | 4 +
viewers/webcomponents/foundation/USAGE.adoc | 35 +-
.../webcomponents/foundation/src/field-widget.mjs | 10 +-
.../foundation/src/reference-widget.mjs | 25 +-
.../foundation/test/field-widget.test.mjs | 6 +-
.../foundation/test/interaction.test.mjs | 60 +-
.../foundation/test/value-codecs.test.mjs | 3 +
.../foundation/vaadin-fields/README.adoc | 4 +-
.../foundation/vaadin-reference/README.adoc | 2 +-
viewers/webcomponents/htmx/README.adoc | 32 +-
.../webcomponents/htmx/HtmxPageRenderer.java | 22 +-
.../webcomponents/htmx/HtmxViewerController.java | 11 +-
.../webcomponents/htmx/HtmxViewerProperties.java | 82 +
.../htmx/HtmxViewerControllerTest.java | 66 +-
.../htmx/HtmxViewerPropertiesTest.java | 109 ++
viewers/webcomponents/sample-html/README.adoc | 9 +-
.../main/resources/static/sample-html/index.html | 4 -
.../sample-htmx-petclinic/README.adoc | 8 +-
.../src/main/resources/application.properties | 2 -
.../petclinic/PetClinicHtmxPlaywrightTest.java | 19 +
.../PetClinicHtmxApplication_IntegTest.java | 24 +-
32 files changed, 2412 insertions(+), 178 deletions(-)
diff --git a/openspec/changes/make-vaadin-default-for-webcomponent-viewer/evidence/REPRODUCING.md b/openspec/changes/make-vaadin-default-for-webcomponent-viewer/evidence/REPRODUCING.md
new file mode 100644
index 00000000000..ede91cb3400
--- /dev/null
+++ b/openspec/changes/make-vaadin-default-for-webcomponent-viewer/evidence/REPRODUCING.md
@@ -0,0 +1,66 @@
+# Reproducing the qualification
+
+Use Temurin JDK 25 for the Reference Application commands in this checkout.
+
+## Foundation, HTMX, and vanilla sample
+
+[source,shell]
+----
+mvn -f viewers/webcomponents/pom.xml -pl foundation,htmx,sample-html -am test
+----
+
+## Petclinic default and native modes
+
+[source,shell]
+----
+mvn -f viewers/webcomponents/pom.xml -pl sample-htmx-petclinic -am -Pplaywright test
+mvn -f viewers/webcomponents/pom.xml -pl sample-htmx-petclinic -am -Pplaywright \
+ -Dcauseway.viewer.webcomponents.htmx.editor-toolkit=native test
+----
+
+## Reference Application
+
+[source,shell]
+----
+mvn -f viewers/webcomponents/pom.xml -pl foundation,htmx -am install -DskipTests
+mvn -f regressiontests/referenceapp/pom.xml clean package
+mvn -f regressiontests/referenceapp/pom.xml -Preferenceapp-playwright \
+ -Dtest=ReferenceAppHtmxPlaywrightTest -Dsurefire.failIfNoSpecifiedTests=false test
+mvn -f regressiontests/referenceapp/pom.xml -Preferenceapp-playwright \
+ -Dcauseway.viewer.webcomponents.htmx.editor-toolkit=native \
+ -Dtest=ReferenceAppHtmxPlaywrightTest -Dsurefire.failIfNoSpecifiedTests=false test
+mvn -f regressiontests/referenceapp/pom.xml \
+ -Dtest=ReferenceAppCapabilityInventory_IntegTest \
+ -Dsurefire.failIfNoSpecifiedTests=false test
+sha256sum regressiontests/referenceapp/htmx/src/test/resources/referenceapp-capability-inventory.json
+----
+
+## Deterministic closure and browser policy gates
+
+[source,shell]
+----
+cd viewers/webcomponents/foundation/vaadin-reference
+npm run verify
+npm run audit
+
+cd ../vaadin-fields
+npm run verify
+npm run audit
+node audit.mjs
+
+cd ../../../../openspec/changes/archive/2026-08-22-add-vaadin-reference-widget-pilot/evidence/csp-harness
+node run-pilot.mjs
+----
+
+## RAT and OpenSpec
+
+[source,shell]
+----
+mvn -f viewers/webcomponents/pom.xml -pl foundation apache-rat:check
+mvn -f viewers/webcomponents/pom.xml -pl htmx apache-rat:check
+mvn -f viewers/webcomponents/pom.xml -pl sample-html apache-rat:check
+mvn -f viewers/webcomponents/pom.xml -pl sample-htmx-petclinic apache-rat:check
+mvn -f regressiontests/referenceapp/pom.xml apache-rat:check
+openspec validate make-vaadin-default-for-webcomponent-viewer --strict
+git diff --check
+----
diff --git a/openspec/changes/make-vaadin-default-for-webcomponent-viewer/evidence/baseline.md b/openspec/changes/make-vaadin-default-for-webcomponent-viewer/evidence/baseline.md
new file mode 100644
index 00000000000..8a1eaabfea7
--- /dev/null
+++ b/openspec/changes/make-vaadin-default-for-webcomponent-viewer/evidence/baseline.md
@@ -0,0 +1,29 @@
+# Adoption baseline
+
+## Qualified closures
+
+| Closure | Raw bytes | Gzip bytes | SHA-256 | Exact style hashes |
+|---|---:|---:|---|---:|
+| Reference | 191,342 | 48,684 | `40ef3cecd641b14b7212759d45035991d9eb12550c00be64d2d7a786bf8f8a81` | 4 |
+| Basic fields | 163,339 | 42,429 | `879c4162cc0957c59d3f76f7c8b15ad7d4c7aca4763242a0100b5f487e6b9398` | 6 |
+| Numeric fields | 96,131 | 25,677 | `c225135710434681739ea8fd6987130af692d1f2bb1be97a45cfd64a36e723ef` | 4 |
+| Local temporal fields | 235,777 | 61,051 | `05866b47c4fbba2fd56a71c94046c31cc13cb78d23c27b7b66cbce0de645325f` | 6 |
+
+The independent field-family cold gzip sum is 129,157 bytes against the accepted 204,800-byte ceiling.
+The closures use pinned same-origin Maven-packaged free-core inputs with accepted Apache-2.0, MIT, or BSD-3-Clause production licenses and zero npm production vulnerabilities.
+They contain no Flow, Binder, Grid, Pro component, upload component, server-side Vaadin state, telemetry collector, or CDN input.
+
+## Previous selection policy
+
+Foundation reference configuration defaulted disabled and field-family configuration defaulted empty.
+Petclinic and the Reference Application explicitly set `vaadin-reference-widgets=true` and `vaadin-field-families=basic,numeric,local-temporal`.
+Explicit native browser runs set the reference boolean false and the field-family value empty.
+The HTMX shell emitted adapter attributes and exact hashes only for those independently enabled pilot properties.
+
+## Regression baseline
+
+The foundation Node suite passed 161 tests before this policy change and the HTMX route-policy Node suite passed 5 tests.
+Petclinic passed 4 browser tests in candidate and explicit-native modes.
+The Reference Application passed 9 browser tests in candidate and explicit-native modes.
+The reviewed Reference Application inventory contains 4,286 items and has SHA-256 `75ef904a0d4fbc9c915c74866cdbd503743dab589f7525bbab126baf1eaa024a`.
+Strict-CSP, axe, keyboard, focus, responsive, theme, reduced-motion, forced-colors, console, page-error, external-request, overflow, RAT, and deterministic packaging gates were clean.
diff --git a/openspec/changes/make-vaadin-default-for-webcomponent-viewer/evidence/final-gate-results.md b/openspec/changes/make-vaadin-default-for-webcomponent-viewer/evidence/final-gate-results.md
new file mode 100644
index 00000000000..6dc0f3c7544
--- /dev/null
+++ b/openspec/changes/make-vaadin-default-for-webcomponent-viewer/evidence/final-gate-results.md
@@ -0,0 +1,31 @@
+# Final gate results
+
+## Passed suites
+
+- Foundation Node: 163 tests passed with zero failures.
+- HTMX route-policy Node: 5 tests passed with zero failures.
+- Foundation, HTMX, and vanilla sample Maven reactor: `BUILD SUCCESS`.
+- Petclinic default Playwright: 4 tests passed with zero failures, errors, or skips.
+- Petclinic common-native Playwright: 4 tests passed with zero failures, errors, or skips and zero Vaadin requests.
+- Reference Application ordinary clean package and integration suite: `BUILD SUCCESS`.
+- Reference Application default Playwright: 9 tests passed with zero failures, errors, or skips.
+- Reference Application common-native Playwright: 9 tests passed with zero failures, errors, or skips and zero Vaadin requests.
+- Clean and incremental Reference Application inventory retained SHA-256 `75ef904a0d4fbc9c915c74866cdbd503743dab589f7525bbab126baf1eaa024a` byte-for-byte.
+- Reference and field deterministic checksums, entry points, legal metadata, telemetry exclusions, and gzip budgets: passed without generated drift.
+- Reference and field production npm audits: zero vulnerabilities.
+- Reference and field enforcing exact-hash browser matrices: zero CSP, axe, console, page, external-request, or overflow failures.
+- Foundation, HTMX, vanilla sample, Petclinic, and Reference Application RAT checks: `BUILD SUCCESS` with no unapproved resources.
+
+## Resolved policy outcomes
+
+No explicit property resolves to Vaadin references and all three qualified field families.
+The common native property resolves to no Vaadin adapter, hash, or asset request.
+An explicit common property wins over deprecated values regardless of setter order.
+Deprecated-only configuration preserves the old complete defaults and normalized subset behavior.
+Invalid values fail bounded configuration.
+Default hash permission remains independent from route-lazy imports.
+
+## Stable boundaries
+
+Default and native modes preserve exact numeric values, nullable Boolean, local temporal values through milliseconds, protected-value redaction, reference identity, autocomplete windows, property saves, object and service action submission, validation, cancellation, focus, route lifecycle, and reviewed unsupported classifications.
+No public Causeway element, semantic event, GraphQL operation, canonical route, persisted value, application markup contract, dependency closure, or generated bundle changed.
diff --git a/openspec/changes/make-vaadin-default-for-webcomponent-viewer/evidence/implementation-report.md b/openspec/changes/make-vaadin-default-for-webcomponent-viewer/evidence/implementation-report.md
new file mode 100644
index 00000000000..3a6d7c320cc
--- /dev/null
+++ b/openspec/changes/make-vaadin-default-for-webcomponent-viewer/evidence/implementation-report.md
@@ -0,0 +1,39 @@
+# Implementation report
+
+## Common policy
+
+`HtmxViewerProperties.EditorToolkit` accepts `VAADIN` and `NATIVE`, binds from the documented lowercase values, and resolves to Vaadin when no toolkit property is supplied.
+Setter tracking distinguishes an effective default from explicit common or deprecated configuration.
+Explicit common policy wins regardless of binding order.
+When the common property is absent and either deprecated setter is invoked, both adapter groups use the former defaults unless their own old value was supplied.
+The compatibility matrix is executable through property and controller tests.
+
+## Foundation selection
+
+Reference configuration now defaults enabled and field configuration defaults to basic, numeric, and local-temporal.
+Explicit resolved shell attributes can disable references and supply an empty field-family value before registry selection.
+Custom hosts retain the existing JavaScript configuration functions for native diagnostics and injected modules.
+Registry precedence, value codecs, exact numeric lexical handling, local temporal precision limits, protected-value redaction, pending values, validation, cancellation, focus, dependent preparation, and semantic events are unchanged.
+Reference load failure now exposes a bounded Causeway-owned message and native fallback, while field failures remain family scoped.
+
+## HTMX shell and CSP
+
+The shell emits bounded resolved policy, explicit reference mode, and explicit normalized field families.
+Default CSP contains the deterministic deduplicated reviewed union for all qualified closures.
+Native CSP contains no Vaadin hash.
+Deprecated compatibility mode contains only the old-policy subset.
+Every mode retains same-origin scripts and connections, no blanket inline permission, and `style-src-attr 'none'` whenever style-element hashes are required.
+Hash permission does not import an asset; landing and unaffected routes retain zero toolkit requests.
+
+## Samples and release modes
+
+Petclinic and the Reference Application no longer opt in through pilot properties.
+Their ordinary configuration therefore exercises the supported default.
+The complete equivalent browser suites use only `causeway.viewer.webcomponents.htmx.editor-toolkit=native` for rollback.
+The vanilla sample imports the foundation index directly and documents pre-import native configuration for a custom HTML host.
+
+## Compatibility and exclusions
+
+The old reference boolean and field-family allow-list remain callable and documented as deprecated.
+No GraphQL operation, route codec, persisted model, public Causeway element, semantic event, generated bundle, dependency, license manifest, or package lock changed.
+Grid behavior, uploads, unsupported temporal shapes, custom values, Flow, Binder, Pro components, server-side Vaadin state, telemetry, CDN assets, and raw application-facing Vaadin APIs remain excluded.
diff --git a/openspec/changes/make-vaadin-default-for-webcomponent-viewer/evidence/policy-matrix.md b/openspec/changes/make-vaadin-default-for-webcomponent-viewer/evidence/policy-matrix.md
new file mode 100644
index 00000000000..43d385a07fb
--- /dev/null
+++ b/openspec/changes/make-vaadin-default-for-webcomponent-viewer/evidence/policy-matrix.md
@@ -0,0 +1,17 @@
+# Resolved toolkit policy matrix
+
+| Explicit common property | Explicit deprecated reference | Explicit deprecated fields | Source | Effective reference | Effective fields | CSP |
+|---|---|---|---|---|---|---|
+| absent | absent | absent | supported default | Vaadin | basic, numeric, local-temporal | Complete reviewed union |
+| `vaadin` | any | any | common | Vaadin | basic, numeric, local-temporal | Complete reviewed union |
+| `native` | any | any | common | native | none | No Vaadin hashes |
+| absent | `true` | absent | compatibility | Vaadin | none | Reference hashes only |
+| absent | `false` | absent | compatibility | native | none | No Vaadin hashes |
+| absent | absent | subset | compatibility | native | normalized subset | Selected field hashes only |
+| absent | absent | empty | compatibility | native | none | No Vaadin hashes |
+| absent | `true` | subset | compatibility | Vaadin | normalized subset | Deduplicated selected union |
+
+An explicitly configured common policy always wins regardless of setter or binding order.
+Any deprecated property activates the complete old-policy baseline when the common property is absent, so an omitted deprecated counterpart retains its former false or empty default rather than acquiring a new adapter unexpectedly.
+The shell reports `vaadin`, `native`, or `compatibility` as the bounded resolved policy source and separately emits explicit reference and field values consumed by foundation modules.
+Invalid toolkit enum values and unknown, blank, or repeated deprecated family values fail binding or normalization instead of broadening selection.
diff --git a/openspec/changes/make-vaadin-default-for-webcomponent-viewer/evidence/production-isolation.md b/openspec/changes/make-vaadin-default-for-webcomponent-viewer/evidence/production-isolation.md
new file mode 100644
index 00000000000..db3fd59be8f
--- /dev/null
+++ b/openspec/changes/make-vaadin-default-for-webcomponent-viewer/evidence/production-isolation.md
@@ -0,0 +1,24 @@
+# Production isolation review
+
+## Changed production boundary
+
+The production change is limited to foundation adapter defaults, bounded reference failure text, HTMX toolkit policy resolution, resolved shell attributes, effective exact-hash CSP selection, sample configuration, and support documentation.
+No Maven POM, npm manifest, package lock, generated bundle, license file, GraphQL module, metamodel module, persistence module, route codec, or route-policy JavaScript changed.
+
+## Stable public contracts
+
+Public `<causeway-*>` elements, GraphQL client and context operations, semantic events, canonical routes, HTMX fragment lifecycle, ordinary HTML composition, and `--causeway-*` design variables remain unchanged.
+Internal Vaadin elements and value events remain below Causeway-owned adapters.
+Native controls remain the explicit rollback and unsupported or failed-adapter fallback.
+
+## Delivery and security
+
+All assets remain pinned, deterministic, same-origin, Maven-packaged, permissively licensed, and independently route-lazy.
+No Flow, Binder, Grid, Pro component, upload component, telemetry collector, CDN reference, or server-side Vaadin runtime entered production.
+Default policy changes exact hash permission but does not request an asset until an eligible connected editor imports its closure.
+Native policy restores the strict policy without Vaadin hashes.
+
+## Data and authority
+
+GraphQL remains authoritative for identity, choices, autocomplete windows, validation, interactions, paging, ordering, and persisted state.
+Exact numerics remain lexical, protected values remain redacted, unsupported temporal and resource shapes remain native or explicitly unsupported, and no migration of application data or markup is required.
diff --git a/openspec/changes/make-vaadin-default-for-webcomponent-viewer/evidence/results/field-browser.json b/openspec/changes/make-vaadin-default-for-webcomponent-viewer/evidence/results/field-browser.json
new file mode 100644
index 00000000000..95e2d491a3c
--- /dev/null
+++ b/openspec/changes/make-vaadin-default-for-webcomponent-viewer/evidence/results/field-browser.json
@@ -0,0 +1,80 @@
+{
+ "basic": {
+ "styleHashes": [
+ "sha256-0wLqlhzs6Y30XLr3aVbYP1PYgStuEbKPfSQ0hPe+kY4=",
+ "sha256-O1QX2gxOlzGqL6KzAmcekP8ficJnQCCVqetcFYUb5ss=",
+ "sha256-bpNhRhOAoAX1rQ5VBdLwe5ATkB9Cp6xAt67TmIjsL8c=",
+ "sha256-peTsiXSLpuSs7cD42trfTzmd120BSxFbCN5N2acsJGw=",
+ "sha256-rRcVg9KnRtadgAGRvS1IlkrlQsH3shuO3yHW7A2DZEk=",
+ "sha256-xGEkK13KcZJdGhZfeIjuH6IWVGTHtjs/IqUVa8T0XXw="
+ ],
+ "cspViolations": [],
+ "axeViolations": [],
+ "accessibilityState": {
+ "opened": [],
+ "hidden": []
+ },
+ "presentation": {
+ "narrowDarkReducedMotion": true,
+ "wideForcedColors": true
+ },
+ "consoleErrors": [],
+ "pageErrors": [],
+ "externalRequests": [],
+ "overflow": false
+ },
+ "numeric": {
+ "styleHashes": [
+ "sha256-8YLhGMhYZnbpzrpjhu2GmLRimv2CABlByy++wN9OR0w=",
+ "sha256-YNq3C4skMjxorxPrwhiBBUB3WVp43O5zI8oMR56ES64=",
+ "sha256-rRcVg9KnRtadgAGRvS1IlkrlQsH3shuO3yHW7A2DZEk=",
+ "sha256-xGEkK13KcZJdGhZfeIjuH6IWVGTHtjs/IqUVa8T0XXw="
+ ],
+ "cspViolations": [],
+ "axeViolations": [],
+ "accessibilityState": {
+ "opened": [],
+ "hidden": []
+ },
+ "presentation": {
+ "narrowDarkReducedMotion": true,
+ "wideForcedColors": true
+ },
+ "consoleErrors": [],
+ "pageErrors": [],
+ "externalRequests": [],
+ "overflow": false
+ },
+ "local-temporal": {
+ "styleHashes": [
+ "sha256-3QT3eM+q9TclSqSU3m57G/bQwWnIhIFfAxgKI5k9zxs=",
+ "sha256-EJ7xFeV2ubzFN71/RQAb1cN8ak1I1ZC/6W+5JllfWto=",
+ "sha256-Mi+i7Phh1UOjZ0x/qGAS342TU+vn7xG5xDIzcKxXhiU=",
+ "sha256-WVYjqCndm5Rg7tULwhGngT2GtzCD2oFrfyb9r6y+dZQ=",
+ "sha256-liOe7KQsCbiDStYZNHBXpf+AEetcU+X9G3OcPZBW0Ho=",
+ "sha256-xGEkK13KcZJdGhZfeIjuH6IWVGTHtjs/IqUVa8T0XXw="
+ ],
+ "cspViolations": [],
+ "axeViolations": [],
+ "accessibilityState": {
+ "opened": [],
+ "hidden": [
+ "vaadin-month-calendar",
+ "vaadin-month-calendar",
+ "vaadin-month-calendar",
+ "vaadin-month-calendar",
+ "vaadin-month-calendar",
+ "vaadin-date-picker-year-scroller",
+ "vaadin-date-picker-year-scroller"
+ ]
+ },
+ "presentation": {
+ "narrowDarkReducedMotion": true,
+ "wideForcedColors": true
+ },
+ "consoleErrors": [],
+ "pageErrors": [],
+ "externalRequests": [],
+ "overflow": false
+ }
+}
diff --git a/openspec/changes/make-vaadin-default-for-webcomponent-viewer/evidence/results/reference-browser.json b/openspec/changes/make-vaadin-default-for-webcomponent-viewer/evidence/results/reference-browser.json
new file mode 100644
index 00000000000..a1324cc0bc1
--- /dev/null
+++ b/openspec/changes/make-vaadin-default-for-webcomponent-viewer/evidence/results/reference-browser.json
@@ -0,0 +1,1602 @@
+{
+ "generatedAt": "2026-08-21T20:03:03.632Z",
+ "browserVersion": "151.0.7922.172",
+ "headless": true,
+ "scenarios": [
+ {
+ "scenario": {
+ "name": "desktop-light",
+ "viewport": {
+ "width": 1280,
+ "height": 900
+ },
+ "colorScheme": "light"
+ },
+ "candidateRequestsBeforeEditor": 0,
+ "candidateRequests": 1,
+ "initializationMs": 25.5,
+ "candidateResource": {
+ "duration": 1.100000023841858,
+ "transferSize": 191642,
+ "encodedBodySize": 191342,
+ "decodedBodySize": 191342
+ },
+ "snapshot": {
+ "editors": {
+ "required-owner": {
+ "connected": true,
+ "editor": "vaadin-reference",
+ "status": "failed",
+ "pendingValue": null,
+ "error": "Select at least one owner.",
+ "calls": [
+ "prepare",
+ "validate"
+ ],
+ "widgetState": "ready",
+ "control": "vaadin-combo-box",
+ "controlDisabled": false
+ },
+ "disabled-owner": {
+ "connected": true,
+ "editor": "vaadin-reference",
+ "status": "saving",
+ "pendingValue": {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ },
+ "error": null,
+ "calls": [
+ "prepare"
+ ],
+ "widgetState": "ready",
+ "control": "vaadin-combo-box",
+ "controlDisabled": true
+ },
+ "multiple-owners": {
+ "connected": true,
+ "editor": "vaadin-reference",
+ "status": "editing",
+ "pendingValue": [
+ {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ ],
+ "error": null,
+ "calls": [
+ "prepare",
+ "validate",
+ "validate"
+ ],
+ "widgetState": "ready",
+ "control": "vaadin-multi-select-combo-box",
+ "controlDisabled": false
+ },
+ "search-owner": {
+ "connected": true,
+ "editor": "vaadin-reference",
+ "status": "editing",
+ "pendingValue": {
+ "id": "owner-2",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 002"
+ },
+ "error": null,
+ "calls": [
+ "prepare",
+ "search:Owner 002",
+ "validate"
+ ],
+ "widgetState": "ready",
+ "control": "vaadin-combo-box",
+ "controlDisabled": false
+ },
+ "single-owner": {
+ "connected": true,
+ "editor": "vaadin-reference",
+ "status": "editing",
+ "pendingValue": {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ },
+ "error": null,
+ "calls": [
+ "prepare"
+ ],
+ "widgetState": "ready",
+ "control": "vaadin-combo-box",
+ "controlDisabled": false
+ }
+ },
+ "semanticEvents": [
+ {
+ "member": "single-owner",
+ "status": "preparing",
+ "value": {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ }
+ },
+ {
+ "member": "single-owner",
+ "status": "editing",
+ "value": {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ }
+ },
+ {
+ "member": "required-owner",
+ "status": "preparing",
+ "value": {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ }
+ },
+ {
+ "member": "required-owner",
+ "status": "editing",
+ "value": {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ }
+ },
+ {
+ "member": "disabled-owner",
+ "status": "preparing",
+ "value": {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ }
+ },
+ {
+ "member": "disabled-owner",
+ "status": "editing",
+ "value": {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ }
+ },
+ {
+ "member": "multiple-owners",
+ "status": "preparing",
+ "value": [
+ {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ }
+ ]
+ },
+ {
+ "member": "multiple-owners",
+ "status": "editing",
+ "value": [
+ {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ }
+ ]
+ },
+ {
+ "member": "search-owner",
+ "status": "preparing",
+ "value": {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ }
+ },
+ {
+ "member": "search-owner",
+ "status": "editing",
+ "value": {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ }
+ },
+ {
+ "member": "single-owner",
+ "status": "editing",
+ "value": {
+ "id": "owner-2",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 002"
+ }
+ },
+ {
+ "member": "single-owner",
+ "status": "validating",
+ "value": {
+ "id": "owner-2",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 002"
+ }
+ },
+ {
+ "member": "single-owner",
+ "status": "editing",
+ "value": {
+ "id": "owner-2",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 002"
+ }
+ },
+ {
+ "member": "multiple-owners",
+ "status": "editing",
+ "value": [
+ {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ },
+ {
+ "id": "owner-2",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 002"
+ }
+ ]
+ },
+ {
+ "member": "multiple-owners",
+ "status": "validating",
+ "value": [
+ {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ },
+ {
+ "id": "owner-2",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 002"
+ }
+ ]
+ },
+ {
+ "member": "multiple-owners",
+ "status": "editing",
+ "value": [
+ {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ },
+ {
+ "id": "owner-2",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 002"
+ }
+ ]
+ },
+ {
+ "member": "multiple-owners",
+ "status": "editing",
+ "value": [
+ {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ ]
+ },
+ {
+ "member": "multiple-owners",
+ "status": "validating",
+ "value": [
+ {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ ]
+ },
+ {
+ "member": "multiple-owners",
+ "status": "editing",
+ "value": [
+ {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ ]
+ },
+ {
+ "member": "search-owner",
+ "status": "editing",
+ "value": {
+ "id": "owner-2",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 002"
+ }
+ },
+ {
+ "member": "search-owner",
+ "status": "validating",
+ "value": {
+ "id": "owner-2",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 002"
+ }
+ },
+ {
+ "member": "search-owner",
+ "status": "editing",
+ "value": {
+ "id": "owner-2",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 002"
+ }
+ },
+ {
+ "member": "single-owner",
+ "status": "editing",
+ "value": null
+ },
+ {
+ "member": "single-owner",
+ "status": "validating",
+ "value": null
+ },
+ {
+ "member": "single-owner",
+ "status": "editing",
+ "value": null
+ },
+ {
+ "member": "required-owner",
+ "status": "editing",
+ "value": null
+ },
+ {
+ "member": "required-owner",
+ "status": "validating",
+ "value": null
+ },
+ {
+ "member": "required-owner",
+ "status": "failed",
+ "value": null
+ },
+ {
+ "member": "single-owner",
+ "status": "preparing",
+ "value": {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ }
+ },
+ {
+ "member": "single-owner",
+ "status": "editing",
+ "value": {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ }
+ }
+ ],
+ "overlayCount": 0,
+ "horizontalOverflow": 0,
+ "vaadinDefined": true,
+ "flowRuntime": false
+ },
+ "axe": {
+ "violations": [],
+ "incomplete": []
+ },
+ "cspViolations": [],
+ "consoleErrors": [],
+ "pageErrors": [],
+ "externalRequests": [],
+ "screenshot": "pilot-desktop-light.jpg"
+ },
+ {
+ "scenario": {
+ "name": "desktop-dark-reduced",
+ "viewport": {
+ "width": 1280,
+ "height": 900
+ },
+ "colorScheme": "dark",
+ "reducedMotion": "reduce"
+ },
+ "candidateRequestsBeforeEditor": 0,
+ "candidateRequests": 1,
+ "initializationMs": 23.700000047683716,
+ "candidateResource": {
+ "duration": 1.1999999284744263,
+ "transferSize": 191642,
+ "encodedBodySize": 191342,
+ "decodedBodySize": 191342
+ },
+ "snapshot": {
+ "editors": {
+ "single-owner": {
+ "connected": true,
+ "editor": "vaadin-reference",
+ "status": "editing",
+ "pendingValue": {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ },
+ "error": null,
+ "calls": [
+ "prepare"
+ ],
+ "widgetState": "ready",
+ "control": "vaadin-combo-box",
+ "controlDisabled": false
+ },
+ "required-owner": {
+ "connected": true,
+ "editor": "vaadin-reference",
+ "status": "editing",
+ "pendingValue": {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ },
+ "error": null,
+ "calls": [
+ "prepare"
+ ],
+ "widgetState": "ready",
+ "control": "vaadin-combo-box",
+ "controlDisabled": false
+ },
+ "disabled-owner": {
+ "connected": true,
+ "editor": "vaadin-reference",
+ "status": "saving",
+ "pendingValue": {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ },
+ "error": null,
+ "calls": [
+ "prepare"
+ ],
+ "widgetState": "ready",
+ "control": "vaadin-combo-box",
+ "controlDisabled": true
+ },
+ "multiple-owners": {
+ "connected": true,
+ "editor": "vaadin-reference",
+ "status": "editing",
+ "pendingValue": [
+ {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ }
+ ],
+ "error": null,
+ "calls": [
+ "prepare"
+ ],
+ "widgetState": "ready",
+ "control": "vaadin-multi-select-combo-box",
+ "controlDisabled": false
+ },
+ "search-owner": {
+ "connected": true,
+ "editor": "vaadin-reference",
+ "status": "editing",
+ "pendingValue": {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ },
+ "error": null,
+ "calls": [
+ "prepare"
+ ],
+ "widgetState": "ready",
+ "control": "vaadin-combo-box",
+ "controlDisabled": false
+ }
+ },
+ "semanticEvents": [
+ {
+ "member": "single-owner",
+ "status": "preparing",
+ "value": {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ }
+ },
+ {
+ "member": "single-owner",
+ "status": "editing",
+ "value": {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ }
+ },
+ {
+ "member": "required-owner",
+ "status": "preparing",
+ "value": {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ }
+ },
+ {
+ "member": "required-owner",
+ "status": "editing",
+ "value": {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ }
+ },
+ {
+ "member": "disabled-owner",
+ "status": "preparing",
+ "value": {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ }
+ },
+ {
+ "member": "disabled-owner",
+ "status": "editing",
+ "value": {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ }
+ },
+ {
+ "member": "multiple-owners",
+ "status": "preparing",
+ "value": [
+ {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ }
+ ]
+ },
+ {
+ "member": "multiple-owners",
+ "status": "editing",
+ "value": [
+ {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ }
+ ]
+ },
+ {
+ "member": "search-owner",
+ "status": "preparing",
+ "value": {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ }
+ },
+ {
+ "member": "search-owner",
+ "status": "editing",
+ "value": {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ }
+ }
+ ],
+ "overlayCount": 0,
+ "horizontalOverflow": 0,
+ "vaadinDefined": true,
+ "flowRuntime": false
+ },
+ "axe": {
+ "violations": [],
+ "incomplete": []
+ },
+ "cspViolations": [],
+ "consoleErrors": [],
+ "pageErrors": [],
+ "externalRequests": [],
+ "screenshot": "pilot-desktop-dark-reduced.jpg"
+ },
+ {
+ "scenario": {
+ "name": "narrow-light",
+ "viewport": {
+ "width": 390,
+ "height": 844
+ },
+ "colorScheme": "light"
+ },
+ "candidateRequestsBeforeEditor": 0,
+ "candidateRequests": 1,
+ "initializationMs": 18.699999928474426,
+ "candidateResource": {
+ "duration": 0.8000000715255737,
+ "transferSize": 191642,
+ "encodedBodySize": 191342,
+ "decodedBodySize": 191342
+ },
+ "snapshot": {
+ "editors": {
+ "single-owner": {
+ "connected": true,
+ "editor": "vaadin-reference",
+ "status": "editing",
+ "pendingValue": {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ },
+ "error": null,
+ "calls": [
+ "prepare"
+ ],
+ "widgetState": "ready",
+ "control": "vaadin-combo-box",
+ "controlDisabled": false
+ },
+ "required-owner": {
+ "connected": true,
+ "editor": "vaadin-reference",
+ "status": "editing",
+ "pendingValue": {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ },
+ "error": null,
+ "calls": [
+ "prepare"
+ ],
+ "widgetState": "ready",
+ "control": "vaadin-combo-box",
+ "controlDisabled": false
+ },
+ "disabled-owner": {
+ "connected": true,
+ "editor": "vaadin-reference",
+ "status": "saving",
+ "pendingValue": {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ },
+ "error": null,
+ "calls": [
+ "prepare"
+ ],
+ "widgetState": "ready",
+ "control": "vaadin-combo-box",
+ "controlDisabled": true
+ },
+ "multiple-owners": {
+ "connected": true,
+ "editor": "vaadin-reference",
+ "status": "editing",
+ "pendingValue": [
+ {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ }
+ ],
+ "error": null,
+ "calls": [
+ "prepare"
+ ],
+ "widgetState": "ready",
+ "control": "vaadin-multi-select-combo-box",
+ "controlDisabled": false
+ },
+ "search-owner": {
+ "connected": true,
+ "editor": "vaadin-reference",
+ "status": "editing",
+ "pendingValue": {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ },
+ "error": null,
+ "calls": [
+ "prepare"
+ ],
+ "widgetState": "ready",
+ "control": "vaadin-combo-box",
+ "controlDisabled": false
+ }
+ },
+ "semanticEvents": [
+ {
+ "member": "single-owner",
+ "status": "preparing",
+ "value": {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ }
+ },
+ {
+ "member": "single-owner",
+ "status": "editing",
+ "value": {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ }
+ },
+ {
+ "member": "required-owner",
+ "status": "preparing",
+ "value": {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ }
+ },
+ {
+ "member": "required-owner",
+ "status": "editing",
+ "value": {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ }
+ },
+ {
+ "member": "disabled-owner",
+ "status": "preparing",
+ "value": {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ }
+ },
+ {
+ "member": "disabled-owner",
+ "status": "editing",
+ "value": {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ }
+ },
+ {
+ "member": "multiple-owners",
+ "status": "preparing",
+ "value": [
+ {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ }
+ ]
+ },
+ {
+ "member": "multiple-owners",
+ "status": "editing",
+ "value": [
+ {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ }
+ ]
+ },
+ {
+ "member": "search-owner",
+ "status": "preparing",
+ "value": {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ }
+ },
+ {
+ "member": "search-owner",
+ "status": "editing",
+ "value": {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ }
+ }
+ ],
+ "overlayCount": 0,
+ "horizontalOverflow": 0,
+ "vaadinDefined": true,
+ "flowRuntime": false
+ },
+ "axe": {
+ "violations": [],
+ "incomplete": []
+ },
+ "cspViolations": [],
+ "consoleErrors": [],
+ "pageErrors": [],
+ "externalRequests": [],
+ "screenshot": "pilot-narrow-light.jpg"
+ },
+ {
+ "scenario": {
+ "name": "narrow-dark-reduced",
+ "viewport": {
+ "width": 390,
+ "height": 844
+ },
+ "colorScheme": "dark",
+ "reducedMotion": "reduce"
+ },
+ "candidateRequestsBeforeEditor": 0,
+ "candidateRequests": 1,
+ "initializationMs": 28.09999990463257,
+ "candidateResource": {
+ "duration": 1.2000000476837158,
+ "transferSize": 191642,
+ "encodedBodySize": 191342,
+ "decodedBodySize": 191342
+ },
+ "snapshot": {
+ "editors": {
+ "single-owner": {
+ "connected": true,
+ "editor": "vaadin-reference",
+ "status": "editing",
+ "pendingValue": {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ },
+ "error": null,
+ "calls": [
+ "prepare"
+ ],
+ "widgetState": "ready",
+ "control": "vaadin-combo-box",
+ "controlDisabled": false
+ },
+ "required-owner": {
+ "connected": true,
+ "editor": "vaadin-reference",
+ "status": "editing",
+ "pendingValue": {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ },
+ "error": null,
+ "calls": [
+ "prepare"
+ ],
+ "widgetState": "ready",
+ "control": "vaadin-combo-box",
+ "controlDisabled": false
+ },
+ "disabled-owner": {
+ "connected": true,
+ "editor": "vaadin-reference",
+ "status": "saving",
+ "pendingValue": {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ },
+ "error": null,
+ "calls": [
+ "prepare"
+ ],
+ "widgetState": "ready",
+ "control": "vaadin-combo-box",
+ "controlDisabled": true
+ },
+ "multiple-owners": {
+ "connected": true,
+ "editor": "vaadin-reference",
+ "status": "editing",
+ "pendingValue": [
+ {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ }
+ ],
+ "error": null,
+ "calls": [
+ "prepare"
+ ],
+ "widgetState": "ready",
+ "control": "vaadin-multi-select-combo-box",
+ "controlDisabled": false
+ },
+ "search-owner": {
+ "connected": true,
+ "editor": "vaadin-reference",
+ "status": "editing",
+ "pendingValue": {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ },
+ "error": null,
+ "calls": [
+ "prepare"
+ ],
+ "widgetState": "ready",
+ "control": "vaadin-combo-box",
+ "controlDisabled": false
+ }
+ },
+ "semanticEvents": [
+ {
+ "member": "single-owner",
+ "status": "preparing",
+ "value": {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ }
+ },
+ {
+ "member": "single-owner",
+ "status": "editing",
+ "value": {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ }
+ },
+ {
+ "member": "required-owner",
+ "status": "preparing",
+ "value": {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ }
+ },
+ {
+ "member": "required-owner",
+ "status": "editing",
+ "value": {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ }
+ },
+ {
+ "member": "disabled-owner",
+ "status": "preparing",
+ "value": {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ }
+ },
+ {
+ "member": "disabled-owner",
+ "status": "editing",
+ "value": {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ }
+ },
+ {
+ "member": "multiple-owners",
+ "status": "preparing",
+ "value": [
+ {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ }
+ ]
+ },
+ {
+ "member": "multiple-owners",
+ "status": "editing",
+ "value": [
+ {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ }
+ ]
+ },
+ {
+ "member": "search-owner",
+ "status": "preparing",
+ "value": {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ }
+ },
+ {
+ "member": "search-owner",
+ "status": "editing",
+ "value": {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ }
+ }
+ ],
+ "overlayCount": 0,
+ "horizontalOverflow": 0,
+ "vaadinDefined": true,
+ "flowRuntime": false
+ },
+ "axe": {
+ "violations": [],
+ "incomplete": []
+ },
+ "cspViolations": [],
+ "consoleErrors": [],
+ "pageErrors": [],
+ "externalRequests": [],
+ "screenshot": "pilot-narrow-dark-reduced.jpg"
+ },
+ {
+ "scenario": {
+ "name": "forced-colors",
+ "viewport": {
+ "width": 1280,
+ "height": 900
+ },
+ "colorScheme": "light",
+ "forcedColors": "active"
+ },
+ "candidateRequestsBeforeEditor": 0,
+ "candidateRequests": 1,
+ "initializationMs": 19.199999928474426,
+ "candidateResource": {
+ "duration": 0.8999999761581421,
+ "transferSize": 191642,
+ "encodedBodySize": 191342,
+ "decodedBodySize": 191342
+ },
+ "snapshot": {
+ "editors": {
+ "single-owner": {
+ "connected": true,
+ "editor": "vaadin-reference",
+ "status": "editing",
+ "pendingValue": {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ },
+ "error": null,
+ "calls": [
+ "prepare"
+ ],
+ "widgetState": "ready",
+ "control": "vaadin-combo-box",
+ "controlDisabled": false
+ },
+ "required-owner": {
+ "connected": true,
+ "editor": "vaadin-reference",
+ "status": "editing",
+ "pendingValue": {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ },
+ "error": null,
+ "calls": [
+ "prepare"
+ ],
+ "widgetState": "ready",
+ "control": "vaadin-combo-box",
+ "controlDisabled": false
+ },
+ "disabled-owner": {
+ "connected": true,
+ "editor": "vaadin-reference",
+ "status": "saving",
+ "pendingValue": {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ },
+ "error": null,
+ "calls": [
+ "prepare"
+ ],
+ "widgetState": "ready",
+ "control": "vaadin-combo-box",
+ "controlDisabled": true
+ },
+ "multiple-owners": {
+ "connected": true,
+ "editor": "vaadin-reference",
+ "status": "editing",
+ "pendingValue": [
+ {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ }
+ ],
+ "error": null,
+ "calls": [
+ "prepare"
+ ],
+ "widgetState": "ready",
+ "control": "vaadin-multi-select-combo-box",
+ "controlDisabled": false
+ },
+ "search-owner": {
+ "connected": true,
+ "editor": "vaadin-reference",
+ "status": "editing",
+ "pendingValue": {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ },
+ "error": null,
+ "calls": [
+ "prepare"
+ ],
+ "widgetState": "ready",
+ "control": "vaadin-combo-box",
+ "controlDisabled": false
+ }
+ },
+ "semanticEvents": [
+ {
+ "member": "single-owner",
+ "status": "preparing",
+ "value": {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ }
+ },
+ {
+ "member": "single-owner",
+ "status": "editing",
+ "value": {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ }
+ },
+ {
+ "member": "required-owner",
+ "status": "preparing",
+ "value": {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ }
+ },
+ {
+ "member": "required-owner",
+ "status": "editing",
+ "value": {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ }
+ },
+ {
+ "member": "disabled-owner",
+ "status": "preparing",
+ "value": {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ }
+ },
+ {
+ "member": "disabled-owner",
+ "status": "editing",
+ "value": {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ }
+ },
+ {
+ "member": "multiple-owners",
+ "status": "preparing",
+ "value": [
+ {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ }
+ ]
+ },
+ {
+ "member": "multiple-owners",
+ "status": "editing",
+ "value": [
+ {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ }
+ ]
+ },
+ {
+ "member": "search-owner",
+ "status": "preparing",
+ "value": {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ }
+ },
+ {
+ "member": "search-owner",
+ "status": "editing",
+ "value": {
+ "_meta": {
+ "id": "owner-1",
+ "logicalTypeName": "petclinic.Owner",
+ "title": "Owner 001"
+ }
+ }
+ }
+ ],
+ "overlayCount": 0,
+ "horizontalOverflow": 0,
+ "vaadinDefined": true,
+ "flowRuntime": false
+ },
+ "axe": {
+ "violations": [],
+ "incomplete": [
+ {
+ "id": "color-contrast",
+ "impact": "serious",
+ "tags": [
+ "cat.color",
+ "wcag2aa",
+ "wcag143",
+ "TTv5",
+ "TT13.c",
+ "EN-301-549",
+ "EN-9.1.4.3",
+ "ACT"
+ ],
+ "description": "Ensure the contrast between foreground and background colors meets WCAG 2 AA minimum contrast ratio thresholds",
+ "help": "Elements must meet minimum color contrast ratio thresholds",
+ "helpUrl": "https://dequeuniversity.com/rules/axe/4.10/color-contrast?application=axeAPI",
+ "nodes": [
+ {
+ "any": [
+ {
+ "id": "color-contrast",
+ "data": {
+ "fgColor": "#ffffff",
+ "bgColor": "#ffffff",
+ "contrastRatio": 1,
+ "fontSize": "12.0pt (16px)",
+ "fontWeight": "normal",
+ "messageKey": "equalRatio",
+ "expectedContrastRatio": "4.5:1"
+ },
+ "relatedNodes": [
+ {
+ "html": "<button type=\"button\" data-causeway-action=\"save\" data-testid=\"single-owner-save\">Save</button>",
+ "target": [
+ "button[data-testid=\"single-owner-save\"]"
+ ]
+ }
+ ],
+ "impact": "serious",
+ "message": "Element has a 1:1 contrast ratio with the background"
+ }
+ ],
+ "all": [],
+ "none": [],
+ "impact": "serious",
+ "html": "<button type=\"button\" data-causeway-action=\"save\" data-testid=\"single-owner-save\">Save</button>",
+ "target": [
+ "button[data-testid=\"single-owner-save\"]"
+ ],
+ "failureSummary": "Fix any of the following:\n Element has a 1:1 contrast ratio with the background"
+ },
+ {
+ "any": [
+ {
+ "id": "color-contrast",
+ "data": {
+ "fgColor": "#ffffff",
+ "bgColor": "#ffffff",
+ "contrastRatio": 1,
+ "fontSize": "12.0pt (16px)",
+ "fontWeight": "normal",
+ "messageKey": "equalRatio",
+ "expectedContrastRatio": "4.5:1"
+ },
+ "relatedNodes": [
+ {
+ "html": "<button type=\"button\" data-causeway-action=\"save\" data-testid=\"required-owner-save\">Save</button>",
+ "target": [
+ "button[data-testid=\"required-owner-save\"]"
+ ]
+ }
+ ],
+ "impact": "serious",
+ "message": "Element has a 1:1 contrast ratio with the background"
+ }
+ ],
+ "all": [],
+ "none": [],
+ "impact": "serious",
+ "html": "<button type=\"button\" data-causeway-action=\"save\" data-testid=\"required-owner-save\">Save</button>",
+ "target": [
+ "button[data-testid=\"required-owner-save\"]"
+ ],
+ "failureSummary": "Fix any of the following:\n Element has a 1:1 contrast ratio with the background"
+ },
+ {
+ "any": [
+ {
+ "id": "color-contrast",
+ "data": {
+ "fgColor": "#ffffff",
+ "bgColor": "#ffffff",
+ "contrastRatio": 1,
+ "fontSize": "12.0pt (16px)",
+ "fontWeight": "normal",
+ "messageKey": "equalRatio",
+ "expectedContrastRatio": "4.5:1"
+ },
+ "relatedNodes": [
+ {
+ "html": "<button type=\"button\" data-causeway-action=\"save\" data-testid=\"multiple-owners-save\">Save</button>",
+ "target": [
+ "button[data-testid=\"multiple-owners-save\"]"
+ ]
+ }
+ ],
+ "impact": "serious",
+ "message": "Element has a 1:1 contrast ratio with the background"
+ }
+ ],
+ "all": [],
+ "none": [],
+ "impact": "serious",
+ "html": "<button type=\"button\" data-causeway-action=\"save\" data-testid=\"multiple-owners-save\">Save</button>",
+ "target": [
+ "button[data-testid=\"multiple-owners-save\"]"
+ ],
+ "failureSummary": "Fix any of the following:\n Element has a 1:1 contrast ratio with the background"
+ },
+ {
+ "any": [
+ {
+ "id": "color-contrast",
+ "data": {
+ "fgColor": "#ffffff",
+ "bgColor": "#ffffff",
+ "contrastRatio": 1,
+ "fontSize": "12.0pt (16px)",
+ "fontWeight": "normal",
+ "messageKey": "equalRatio",
+ "expectedContrastRatio": "4.5:1"
+ },
+ "relatedNodes": [
+ {
+ "html": "<button type=\"button\" data-causeway-action=\"save\" data-testid=\"search-owner-save\">Save</button>",
+ "target": [
+ "button[data-testid=\"search-owner-save\"]"
+ ]
+ }
+ ],
+ "impact": "serious",
+ "message": "Element has a 1:1 contrast ratio with the background"
+ }
+ ],
+ "all": [],
+ "none": [],
+ "impact": "serious",
+ "html": "<button type=\"button\" data-causeway-action=\"save\" data-testid=\"search-owner-save\">Save</button>",
+ "target": [
+ "button[data-testid=\"search-owner-save\"]"
+ ],
+ "failureSummary": "Fix any of the following:\n Element has a 1:1 contrast ratio with the background"
+ }
+ ]
+ }
+ ]
+ },
+ "cspViolations": [],
+ "consoleErrors": [],
+ "pageErrors": [],
+ "externalRequests": [],
+ "screenshot": "pilot-forced-colors.jpg"
+ }
+ ],
+ "summary": {
+ "scenarios": 5,
+ "axeViolations": 0,
+ "cspViolations": 0,
+ "consoleErrors": 0,
+ "pageErrors": 0,
+ "externalRequests": 0,
+ "overflowScenarios": 0
+ }
+}
diff --git a/openspec/changes/make-vaadin-default-for-webcomponent-viewer/tasks.md b/openspec/changes/make-vaadin-default-for-webcomponent-viewer/tasks.md
index 9ca3a1c1b06..1215a3b5703 100644
--- a/openspec/changes/make-vaadin-default-for-webcomponent-viewer/tasks.md
+++ b/openspec/changes/make-vaadin-default-for-webcomponent-viewer/tasks.md
@@ -1,75 +1,75 @@
## 1. Baseline and policy evidence
-- [ ] 1.1 Record the accepted reference and field closure checksums, gzip budgets, CSP hashes, licenses, and vulnerability status.
-- [ ] 1.2 Record current native defaults, pilot properties, shell attributes, and candidate sample overrides.
-- [ ] 1.3 Record the default, explicit-native, and deprecated compatibility policy matrix.
-- [ ] 1.4 Confirm the Reference Application inventory baseline and existing browser qualification counts before policy changes.
+- [x] 1.1 Record the accepted reference and field closure checksums, gzip budgets, CSP hashes, licenses, and vulnerability status.
+- [x] 1.2 Record current native defaults, pilot properties, shell attributes, and candidate sample overrides.
+- [x] 1.3 Record the default, explicit-native, and deprecated compatibility policy matrix.
+- [x] 1.4 Confirm the Reference Application inventory baseline and existing browser qualification counts before policy changes.
## 2. Common HTMX toolkit policy
-- [ ] 2.1 Add a bounded `EditorToolkit` configuration value with `vaadin` and `native` external forms.
-- [ ] 2.2 Default the effective common policy to Vaadin while tracking whether its setter was explicitly invoked.
-- [ ] 2.3 Retain deprecated reference-widget and field-family accessors with explicit-configuration tracking.
-- [ ] 2.4 Resolve an explicitly configured common policy ahead of all deprecated values.
-- [ ] 2.5 Enter complete old-policy compatibility mode when deprecated configuration is explicit and the common property is absent.
-- [ ] 2.6 Resolve default Vaadin policy to references plus basic, numeric, and local-temporal families.
-- [ ] 2.7 Resolve native policy to no Vaadin reference or field family.
-- [ ] 2.8 Reject invalid common and deprecated values with bounded configuration errors.
-- [ ] 2.9 Add unit tests for defaults, native rollback, explicit precedence, legacy true and false, legacy subsets, and invalid values.
-- [ ] 2.10 Document the deprecated-property compatibility period and deterministic precedence table.
+- [x] 2.1 Add a bounded `EditorToolkit` configuration value with `vaadin` and `native` external forms.
+- [x] 2.2 Default the effective common policy to Vaadin while tracking whether its setter was explicitly invoked.
+- [x] 2.3 Retain deprecated reference-widget and field-family accessors with explicit-configuration tracking.
+- [x] 2.4 Resolve an explicitly configured common policy ahead of all deprecated values.
+- [x] 2.5 Enter complete old-policy compatibility mode when deprecated configuration is explicit and the common property is absent.
+- [x] 2.6 Resolve default Vaadin policy to references plus basic, numeric, and local-temporal families.
+- [x] 2.7 Resolve native policy to no Vaadin reference or field family.
+- [x] 2.8 Reject invalid common and deprecated values with bounded configuration errors.
+- [x] 2.9 Add unit tests for defaults, native rollback, explicit precedence, legacy true and false, legacy subsets, and invalid values.
+- [x] 2.10 Document the deprecated-property compatibility period and deterministic precedence table.
## 3. Foundation default selection
-- [ ] 3.1 Change reference adapter configuration to default enabled while retaining explicit disablement.
-- [ ] 3.2 Change field adapter configuration to default all qualified families while retaining an empty native configuration.
-- [ ] 3.3 Consume explicit resolved shell reference and field policy values without duplicating server precedence logic.
-- [ ] 3.4 Keep existing JavaScript configuration functions usable for custom hosts, tests, injected modules, and native diagnostics.
-- [ ] 3.5 Preserve registry precedence, codec qualification, exact numeric lexical handling, temporal precision limits, and unsupported-shape fallback.
-- [ ] 3.6 Preserve document-scoped reference failure and family-scoped field failure without broadening another family.
-- [ ] 3.7 Add unit tests for foundation defaults, explicit native policy, resolved shell values, lazy imports, and failure fallback.
-- [ ] 3.8 Assert protected values remain absent under default selection and explicit native rollback.
+- [x] 3.1 Change reference adapter configuration to default enabled while retaining explicit disablement.
+- [x] 3.2 Change field adapter configuration to default all qualified families while retaining an empty native configuration.
+- [x] 3.3 Consume explicit resolved shell reference and field policy values without duplicating server precedence logic.
+- [x] 3.4 Keep existing JavaScript configuration functions usable for custom hosts, tests, injected modules, and native diagnostics.
+- [x] 3.5 Preserve registry precedence, codec qualification, exact numeric lexical handling, temporal precision limits, and unsupported-shape fallback.
+- [x] 3.6 Preserve document-scoped reference failure and family-scoped field failure without broadening another family.
+- [x] 3.7 Add unit tests for foundation defaults, explicit native policy, resolved shell values, lazy imports, and failure fallback.
+- [x] 3.8 Assert protected values remain absent under default selection and explicit native rollback.
## 4. Shell attributes, CSP, and route-lazy delivery
-- [ ] 4.1 Render the resolved common toolkit policy as bounded shell diagnostics.
-- [ ] 4.2 Render explicit resolved reference and field-family values for foundation initialization.
-- [ ] 4.3 Generate default CSP from the complete reviewed exact-hash union.
-- [ ] 4.4 Generate native CSP without any Vaadin style hash.
-- [ ] 4.5 Generate deprecated compatibility CSP from only the resolved old-policy subset.
-- [ ] 4.6 Retain `style-src-attr 'none'`, same-origin scripts and connections, and no `unsafe-inline` source in every mode.
-- [ ] 4.7 Assert common policy precedence cannot create mixed shell attributes or broadened hashes.
-- [ ] 4.8 Assert landing, read-only, and otherwise unaffected routes request zero toolkit closures under the default policy.
-- [ ] 4.9 Add controller, shell, CSP, route-fragment, and packaged-asset tests for all policy modes.
+- [x] 4.1 Render the resolved common toolkit policy as bounded shell diagnostics.
+- [x] 4.2 Render explicit resolved reference and field-family values for foundation initialization.
+- [x] 4.3 Generate default CSP from the complete reviewed exact-hash union.
+- [x] 4.4 Generate native CSP without any Vaadin style hash.
+- [x] 4.5 Generate deprecated compatibility CSP from only the resolved old-policy subset.
+- [x] 4.6 Retain `style-src-attr 'none'`, same-origin scripts and connections, and no `unsafe-inline` source in every mode.
+- [x] 4.7 Assert common policy precedence cannot create mixed shell attributes or broadened hashes.
+- [x] 4.8 Assert landing, read-only, and otherwise unaffected routes request zero toolkit closures under the default policy.
+- [x] 4.9 Add controller, shell, CSP, route-fragment, and packaged-asset tests for all policy modes.
## 5. Samples, support policy, and migration documentation
-- [ ] 5.1 Remove Vaadin candidate opt-ins from Petclinic and the Reference Application so ordinary configuration exercises the default.
-- [ ] 5.2 Update explicit-native test launches to use only `editor-toolkit=native`.
-- [ ] 5.3 Update the vanilla sample to demonstrate default Causeway-owned adapters and documented native configuration.
-- [ ] 5.4 Replace pilot and candidate production wording with supported-default and native-rollback terminology.
-- [ ] 5.5 Document the common property, default behavior, precedence, deprecated mapping, and immediate rollback command.
-- [ ] 5.6 Document route-lazy delivery, family qualification, failure fallback, exact-hash CSP, and dependency-update obligations.
-- [ ] 5.7 Document that Grid, uploads, unsupported temporal shapes, Flow, Binder, Pro components, telemetry, CDN assets, and raw Vaadin APIs remain excluded.
-- [ ] 5.8 Retain the separately packaged reference and field closure identities, budgets, legal manifests, and verification commands.
+- [x] 5.1 Remove Vaadin candidate opt-ins from Petclinic and the Reference Application so ordinary configuration exercises the default.
+- [x] 5.2 Update explicit-native test launches to use only `editor-toolkit=native`.
+- [x] 5.3 Update the vanilla sample to demonstrate default Causeway-owned adapters and documented native configuration.
+- [x] 5.4 Replace pilot and candidate production wording with supported-default and native-rollback terminology.
+- [x] 5.5 Document the common property, default behavior, precedence, deprecated mapping, and immediate rollback command.
+- [x] 5.6 Document route-lazy delivery, family qualification, failure fallback, exact-hash CSP, and dependency-update obligations.
+- [x] 5.7 Document that Grid, uploads, unsupported temporal shapes, Flow, Binder, Pro components, telemetry, CDN assets, and raw Vaadin APIs remain excluded.
+- [x] 5.8 Retain the separately packaged reference and field closure identities, budgets, legal manifests, and verification commands.
## 6. Default and native regression qualification
-- [ ] 6.1 Update Petclinic assertions so no override selects Vaadin references and field families.
-- [ ] 6.2 Run Petclinic property, object-action, service-action, reference, cancellation, focus, route, and accessibility journeys in default mode.
-- [ ] 6.3 Run the equivalent Petclinic suite with the common native policy and assert zero Vaadin requests.
-- [ ] 6.4 Update Reference Application assertions and target metadata from candidate to default terminology.
-- [ ] 6.5 Run Reference Application reference, basic, numeric, temporal, protected, action, lifecycle, and route-isolation journeys in default mode.
-- [ ] 6.6 Run the equivalent Reference Application suite with the common native policy and compare authoritative GraphQL outcomes.
-- [ ] 6.7 Inject reference and field closure failures under default selection and verify bounded native recovery and family independence.
-- [ ] 6.8 Verify clean and incremental capability inventory generation remain byte-identical.
+- [x] 6.1 Update Petclinic assertions so no override selects Vaadin references and field families.
+- [x] 6.2 Run Petclinic property, object-action, service-action, reference, cancellation, focus, route, and accessibility journeys in default mode.
+- [x] 6.3 Run the equivalent Petclinic suite with the common native policy and assert zero Vaadin requests.
+- [x] 6.4 Update Reference Application assertions and target metadata from candidate to default terminology.
+- [x] 6.5 Run Reference Application reference, basic, numeric, temporal, protected, action, lifecycle, and route-isolation journeys in default mode.
+- [x] 6.6 Run the equivalent Reference Application suite with the common native policy and compare authoritative GraphQL outcomes.
+- [x] 6.7 Inject reference and field closure failures under default selection and verify bounded native recovery and family independence.
+- [x] 6.8 Verify clean and incremental capability inventory generation remain byte-identical.
## 7. Release gates and evidence
-- [ ] 7.1 Run foundation Node and web-component Maven suites.
-- [ ] 7.2 Run HTMX configuration, shell, CSP, route, and packaging suites.
-- [ ] 7.3 Run deterministic reference and field build, checksum, license, budget, telemetry, and npm audit gates.
-- [ ] 7.4 Run enforcing strict-CSP, axe, keyboard, focus, responsive, theme, reduced-motion, and forced-colors matrices.
-- [ ] 7.5 Assert zero unexpected console errors, page errors, external requests, overflow failures, stale state, or overlay leaks.
-- [ ] 7.6 Run Petclinic and Reference Application default plus explicit-native release suites and ordinary clean Maven packaging.
-- [ ] 7.7 Run applicable RAT checks, strict OpenSpec validation, `git diff --check`, and production-isolation review.
-- [ ] 7.8 Record final gate results, resolved migration policy, supported release obligations, and remaining explicit exclusions.
+- [x] 7.1 Run foundation Node and web-component Maven suites.
+- [x] 7.2 Run HTMX configuration, shell, CSP, route, and packaging suites.
+- [x] 7.3 Run deterministic reference and field build, checksum, license, budget, telemetry, and npm audit gates.
+- [x] 7.4 Run enforcing strict-CSP, axe, keyboard, focus, responsive, theme, reduced-motion, and forced-colors matrices.
+- [x] 7.5 Assert zero unexpected console errors, page errors, external requests, overflow failures, stale state, or overlay leaks.
+- [x] 7.6 Run Petclinic and Reference Application default plus explicit-native release suites and ordinary clean Maven packaging.
+- [x] 7.7 Run applicable RAT checks, strict OpenSpec validation, `git diff --check`, and production-isolation review.
+- [x] 7.8 Record final gate results, resolved migration policy, supported release obligations, and remaining explicit exclusions.
diff --git a/regressiontests/referenceapp/htmx/src/main/resources/application.properties b/regressiontests/referenceapp/htmx/src/main/resources/application.properties
index 3d430d84755..79e795f51c8 100644
--- a/regressiontests/referenceapp/htmx/src/main/resources/application.properties
+++ b/regressiontests/referenceapp/htmx/src/main/resources/application.properties
@@ -18,8 +18,6 @@ causeway.viewer.webcomponents.htmx.graph-ql-endpoint=/graphql
causeway.viewer.webcomponents.htmx.brand=Causeway Reference Application
causeway.viewer.webcomponents.htmx.wicket-comparison-path=/wicket/
causeway.viewer.webcomponents.htmx.application-stylesheet=/css/application.css
-causeway.viewer.webcomponents.htmx.vaadin-reference-widgets=true
-causeway.viewer.webcomponents.htmx.vaadin-field-families=basic,numeric,local-temporal
causeway.viewer.webcomponents.htmx.reference-minimum-search-length=1
causeway.viewer.webcomponents.htmx.reference-maximum-results=50
causeway.viewer.graphql.autocomplete.default-window-size=5
diff --git a/regressiontests/referenceapp/htmx/src/playwright/java/org/apache/causeway/regressiontests/referenceapp/htmx/ReferenceAppHtmxPlaywrightTest.java b/regressiontests/referenceapp/htmx/src/playwright/java/org/apache/causeway/regressiontests/referenceapp/htmx/ReferenceAppHtmxPlaywrightTest.java
index ee8306735b2..8d6517a1ffb 100644
--- a/regressiontests/referenceapp/htmx/src/playwright/java/org/apache/causeway/regressiontests/referenceapp/htmx/ReferenceAppHtmxPlaywrightTest.java
+++ b/regressiontests/referenceapp/htmx/src/playwright/java/org/apache/causeway/regressiontests/referenceapp/htmx/ReferenceAppHtmxPlaywrightTest.java
@@ -61,6 +61,7 @@ class ReferenceAppHtmxPlaywrightTest {
private int port;
private final List<String> browserFailures = new ArrayList<>();
+ private final List<String> toolkitRequests = new ArrayList<>();
private Playwright playwright;
private Browser browser;
private BrowserContext browserContext;
@@ -100,6 +101,9 @@ void openBrowserContext() {
@AfterEach
void closeBrowserContext() {
+ if (nativeToolkit()) {
+ assertThat(toolkitRequests).isEmpty();
+ }
assertNoBrowserFailures();
if (browserContext != null) {
browserContext.close();
@@ -109,7 +113,10 @@ void closeBrowserContext() {
@Test
void menusChoicesAutocompleteCancellationAndRouteDisposal() {
openShell();
- assertThat(candidateRequests()).isZero();
+ assertThat(page.locator("html").getAttribute("data-causeway-editor-toolkit"))
+ .isEqualTo(nativeToolkit() ? "native" : "vaadin");
+ assertThat(toolkitRequests).isEmpty();
+ assertThat(referenceAssetRequests()).isZero();
openMenu("Prog Model");
serviceAction("demo.ActionChoicesMenu", "choices").click();
@@ -125,7 +132,7 @@ void menusChoicesAutocompleteCancellationAndRouteDisposal() {
page.locator(PROMPT).waitFor(new Locator.WaitForOptions()
.setState(com.microsoft.playwright.options.WaitForSelectorState.DETACHED));
waitForLogicalType("demo.ActionChoices");
- assertThat(candidateRequests()).isZero();
+ assertThat(referenceAssetRequests()).isZero();
openObject("demo.ActionAutoCompletePage", invokeViewModel(
"demo_ActionAutoCompleteMenu", "autoComplete", "rich__demo_ActionAutoCompletePage"));
@@ -139,7 +146,7 @@ void menusChoicesAutocompleteCancellationAndRouteDisposal() {
openShell();
assertThat(openCandidateOverlays()).isZero();
- assertThat(candidateRequests()).isZero();
+ assertThat(referenceAssetRequests()).isZero();
assertSemanticAccessibility();
}
@@ -171,18 +178,18 @@ void valuesCollectionsHistoryAndWicketComparisonShareTheFixture() {
assertThat(fieldAssetRequests("local-temporal")).isZero();
}
assertThat(originalDecimal).isNotBlank();
- final String candidateDecimal = "98765432109876543210.123456789";
+ final String updatedDecimal = "98765432109876543210.123456789";
try {
final String encodedId = OBJECT_MAPPER.writeValueAsString(decimalEntityId);
try {
- fillEditor(decimalEditor, candidateDecimal);
+ fillEditor(decimalEditor, updatedDecimal);
page.waitForFunction("() => document.querySelector(\"causeway-property[member='readWriteProperty'] [data-causeway-action='save']\")?.disabled === false");
editableDecimal.locator("[data-causeway-action='save']").click();
page.waitForFunction("() => !document.querySelector(\"causeway-property[member='readWriteProperty'] [data-causeway-editor]\")");
final JsonNode changed = executeGraphQL("{ rich { demo_BigDecimalEntity(object: {id: "
+ encodedId + "}) { readWriteProperty { get } } } }");
assertThat(changed.at("/data/rich/demo_BigDecimalEntity/readWriteProperty/get").asText())
- .isEqualTo(candidateDecimal);
+ .isEqualTo(updatedDecimal);
} finally {
final JsonNode restored = executeGraphQL("mutation { demo_BigDecimalEntity__readWriteProperty(_target: {id: "
+ encodedId + "}, readWriteProperty: " + OBJECT_MAPPER.writeValueAsString(originalDecimal)
@@ -191,7 +198,7 @@ void valuesCollectionsHistoryAndWicketComparisonShareTheFixture() {
.as(restored.toPrettyString()).isTrue();
}
} catch (Exception ex) {
- throw new AssertionError("Exact decimal candidate interaction failed", ex);
+ throw new AssertionError("Exact decimal default interaction failed", ex);
}
page.goBack();
@@ -481,7 +488,7 @@ void populatedPagedConfiguredPolymorphicAndRouteReplacedCollectionsRemainVisible
openShell();
assertThat(page.locator("causeway-collection").count()).isZero();
- assertThat(candidateRequests()).isZero();
+ assertThat(referenceAssetRequests()).isZero();
}
@Test
@@ -506,12 +513,13 @@ void responsiveThemesForcedColorsCspAndExternalIsolation() {
private void openBrowserContext(final Browser.NewContextOptions options) {
browserFailures.clear();
+ toolkitRequests.clear();
browserContext = browser.newContext(options);
browserContext.addInitScript("""
(() => {
globalThis.__referenceAppFailures = [];
globalThis.__referenceAppKnownGaps = [];
- globalThis.__referenceAppCandidateRequests = 0;
+ globalThis.__referenceAppReferenceAssetRequests = 0;
const record = value => globalThis.__referenceAppFailures.push(String(value));
globalThis.addEventListener('error', event => record(`page error: ${event.message}`));
globalThis.addEventListener('unhandledrejection', event => record(`unhandled rejection: ${event.reason}`));
@@ -521,7 +529,7 @@ const record = value => globalThis.__referenceAppFailures.push(String(value));
const response = await originalFetch(...args);
const url = String(response.url || args[0]);
if (url.includes('/causeway-webcomponents/vaadin-reference/vaadin-reference.js')) {
- globalThis.__referenceAppCandidateRequests += 1;
+ globalThis.__referenceAppReferenceAssetRequests += 1;
}
const isGraphQL = new URL(url, location.href).pathname === '/graphql';
if (!response.ok && !isGraphQL) record(`HTTP ${response.status}: ${url}`);
@@ -553,6 +561,10 @@ const record = value => globalThis.__referenceAppFailures.push(String(value));
});
page.onPageError(error -> browserFailures.add("page: " + error));
page.onRequest(request -> {
+ if (request.url().contains("/causeway-webcomponents/vaadin-reference/")
+ || request.url().contains("/causeway-webcomponents/vaadin-fields/")) {
+ toolkitRequests.add(request.url());
+ }
final URI uri = URI.create(request.url());
if (uri.getHost() != null && !Set.of("localhost", "127.0.0.1").contains(uri.getHost())) {
browserFailures.add("external request: " + request.url());
@@ -790,7 +802,7 @@ private void assertFieldEditor(
final String entityResultType,
final String entityLogicalType,
final String member,
- final String candidateTag,
+ final String vaadinTag,
final String nativeTag) {
final String pageId = invokeViewModel(serviceField, actionField, pageResultType);
openObject(entityLogicalType, firstCollectionEntityId(objectField, pageId, entityResultType));
@@ -798,7 +810,7 @@ private void assertFieldEditor(
property.locator("[data-causeway-action='edit']").click();
final Locator editor = resolveEditor("causeway-property[member='" + member + "'] [data-causeway-editor='" + member + "']");
assertThat(editor.evaluate("element => element.localName"))
- .isEqualTo(fieldFamiliesEnabled() ? candidateTag : nativeTag);
+ .isEqualTo(fieldFamiliesEnabled() ? vaadinTag : nativeTag);
if (fieldFamiliesEnabled()) {
assertThat(fieldAssetRequests("basic")).isEqualTo(1);
assertThat(fieldAssetRequests("numeric")).isZero();
@@ -814,13 +826,13 @@ private void assertTemporalEditor(
final String objectField,
final String entityResultType,
final String entityLogicalType,
- final String candidateTag,
+ final String vaadinTag,
final String nativeType) {
final String pageId = invokeViewModel(serviceField, actionField, pageResultType);
final String member = "demo_LocalDateTimes".equals(objectField)
? "readWriteOptionalProperty"
: "readWriteProperty";
- final String entityId = candidateTag == null
+ final String entityId = vaadinTag == null
? firstCollectionEntityId(objectField, pageId, entityResultType)
: pickerCompatibleCollectionEntityId(objectField, pageId, entityResultType, member);
openObject(entityLogicalType, entityId);
@@ -828,8 +840,8 @@ private void assertTemporalEditor(
property.locator("[data-causeway-action='edit']").click();
final Locator editor = resolveEditor("causeway-property[member='" + member + "'] [data-causeway-editor='" + member + "']");
final String localName = String.valueOf(editor.evaluate("element => element.localName"));
- if (candidateTag != null && fieldFamiliesEnabled()) {
- assertThat(localName).isEqualTo(candidateTag);
+ if (vaadinTag != null && fieldFamiliesEnabled()) {
+ assertThat(localName).isEqualTo(vaadinTag);
assertThat(fieldAssetRequests("local-temporal")).isEqualTo(1);
assertThat(fieldAssetRequests("basic")).isZero();
assertThat(fieldAssetRequests("numeric")).isZero();
@@ -880,6 +892,11 @@ private String pickerCompatibleCollectionEntityId(
}
}
+ private static boolean nativeToolkit() {
+ return "native".equalsIgnoreCase(System.getProperty(
+ "causeway.viewer.webcomponents.htmx.editor-toolkit", "vaadin"));
+ }
+
private boolean fieldFamiliesEnabled() {
return !String.valueOf(page.locator("html").getAttribute("data-causeway-field-families")).isBlank()
&& !"null".equals(String.valueOf(page.locator("html").getAttribute("data-causeway-field-families")));
@@ -905,8 +922,8 @@ private int fieldAssetRequests(final String family) {
return ((Number) page.evaluate("family => performance.getEntriesByType('resource').filter(entry => entry.name.includes('/causeway-webcomponents/vaadin-fields/vaadin-' + family + '.js')).length", family)).intValue();
}
- private int candidateRequests() {
- return ((Number) page.evaluate("() => globalThis.__referenceAppCandidateRequests || 0")).intValue();
+ private int referenceAssetRequests() {
+ return ((Number) page.evaluate("() => globalThis.__referenceAppReferenceAssetRequests || 0")).intValue();
}
private int knownGapCount() {
diff --git a/regressiontests/referenceapp/htmx/src/test/java/org/apache/causeway/regressiontests/referenceapp/htmx/ReferenceAppHtmxApplication_IntegTest.java b/regressiontests/referenceapp/htmx/src/test/java/org/apache/causeway/regressiontests/referenceapp/htmx/ReferenceAppHtmxApplication_IntegTest.java
index 09419f92cad..4794bae91aa 100644
--- a/regressiontests/referenceapp/htmx/src/test/java/org/apache/causeway/regressiontests/referenceapp/htmx/ReferenceAppHtmxApplication_IntegTest.java
+++ b/regressiontests/referenceapp/htmx/src/test/java/org/apache/causeway/regressiontests/referenceapp/htmx/ReferenceAppHtmxApplication_IntegTest.java
@@ -92,11 +92,15 @@ void servesStrictHtmxShellGraphqlAndWicketComparison() throws Exception {
assertThat(shell.headers().firstValue("content-security-policy").orElse(""))
.contains("default-src 'self'")
.contains("style-src-attr 'none'")
+ .contains("sha256-0wLqlhzs6Y30XLr3aVbYP1PYgStuEbKPfSQ0hPe+kY4=")
.doesNotContain("unsafe-inline");
assertThat(shell.body())
.contains("<causeway-menubars>")
.contains("id=\"causeway-route\"")
.contains("/causeway-htmx/causeway-htmx.mjs")
+ .contains("data-causeway-editor-toolkit=\"vaadin\"")
+ .contains("data-causeway-reference-widgets=\"vaadin\"")
+ .contains("data-causeway-field-families=\"basic,numeric,local-temporal\"")
.contains("Compare Wicket viewer");
final JsonNode root = graphQL("{__typename}");
diff --git a/viewers/webcomponents/foundation/USAGE.adoc b/viewers/webcomponents/foundation/USAGE.adoc
index 365dac04d02..41544c49f6f 100644
--- a/viewers/webcomponents/foundation/USAGE.adoc
+++ b/viewers/webcomponents/foundation/USAGE.adoc
@@ -297,23 +297,20 @@ Applications can register a more-specific editor through `defaultEditorRegistry.
Editors render pending semantic values but never execute GraphQL independently.
Codecs own authoritative normalization, control conversion, parsing, local validation, and GraphQL-variable conversion.
-=== Optional Vaadin reference widgets
+=== Default Vaadin reference widgets
-The foundation artifact packages a pinned free-core Vaadin Combo Box and Multi-Select Combo Box closure for explicitly enabled reference inputs.
-The closure is not requested until the semantic registry renders its first eligible reference editor.
-Routes and applications that leave the option disabled continue to use the existing native choice and autocomplete editors and make no Vaadin request.
+The foundation artifact packages a pinned free-core Vaadin Combo Box and Multi-Select Combo Box closure for qualified reference inputs.
+The internal adapter is enabled by default, but the closure is not requested until the semantic registry renders its first eligible reference editor.
+Routes without an eligible connected reference editor make no Vaadin reference request.
-A plain HTML application enables the pilot before importing `index.mjs`:
+A plain HTML application uses the supported default by importing `index.mjs` without a toolkit opt-in.
+It can select the native rollback before that import:
[source,javascript]
----
const {configureCausewayReferenceWidgets} =
await import('/causeway-webcomponents/reference-widget.mjs');
-configureCausewayReferenceWidgets({
- enabled: true,
- minimumSearchLength: 2,
- maximumResults: 50
-});
+configureCausewayReferenceWidgets({enabled: false});
await import('/causeway-webcomponents/index.mjs');
----
@@ -326,13 +323,13 @@ When only legacy `autoComplete` exists, `maximumResults` remains an accepted com
Native autocomplete renders the bounded first window and states when more matches require refinement.
A list-valued input selects Multi-Select Combo Box only when the introspected input and GraphQL interaction already provide authoritative list pending-value semantics.
-Unsupported shapes, disabled configuration, over-bound fixed choices, module failure, and rollback retain or recover the existing editor.
+Unsupported shapes, explicit native configuration, over-bound fixed choices, module failure, and rollback retain or recover the existing editor.
`<causeway-reference-editor>` is a semantic Causeway adapter.
Applications observe existing property and prompt state events and do not consume Vaadin tags, data-provider callbacks, or value events.
Vaadin package names, internal tags, theme details, and bundle chunks are not a supported application extension tier.
-The candidate bundle is 48,684 bytes gzip for the pinned pilot closure, contains no Flow client or usage-statistics collector, and is served only from the foundation JAR.
+The supported reference bundle is 48,684 bytes gzip for the pinned closure, contains no Flow client or usage-statistics collector, and is served only from the foundation JAR.
Its four byte-exact style elements require the documented CSP SHA-256 sources while `style-src-attr 'none'` remains in effect.
Dependency or bundle updates must regenerate and review package metadata, licenses, checksums, CSP hashes, browser evidence, and the compressed budget together.
@@ -489,25 +486,23 @@ causeway-object {
}
----
-== Optional Vaadin semantic field families
+== Default Vaadin semantic field families
-The foundation can qualify internal Vaadin free-core controls for existing semantic editors without changing application markup or events.
-The empty configuration keeps every scalar editor native.
-An HTMX shell can enable `basic`, `numeric`, and `local-temporal` independently, or ordinary JavaScript can configure them before importing `index.mjs`:
+The foundation qualifies internal Vaadin free-core controls for existing semantic editors without changing application markup or events.
+`basic`, `numeric`, and `local-temporal` are enabled by default and each remains independently route-lazy.
+Ordinary JavaScript can select the complete native rollback before importing `index.mjs`:
[source,javascript]
----
import {configureCausewayFieldWidgets} from './field-widget.mjs';
-configureCausewayFieldWidgets({
- families: ['basic', 'numeric', 'local-temporal']
-});
+configureCausewayFieldWidgets({families: []});
----
`basic` covers reversible text, multiline, protected, Boolean, enum, bounded scalar choice, and URL inputs.
`numeric` keeps `Long`, `BigInteger`, and `BigDecimal` lexical in text fields while using integer or number controls only for machine numeric codecs.
`local-temporal` covers `LocalDate`, `LocalTime`, and `LocalDateTime`; values beyond millisecond fractional precision remain native because the picker cannot preserve them.
-Offset, zoned, legacy temporal, Blob, Clob, resource, custom, reference, collection, and unsupported values never become field candidates.
+Offset, zoned, legacy temporal, Blob, Clob, resource, custom, reference, collection, and unsupported values never become eligible field adapters.
References retain their separate adapter.
Each family loads its own same-origin generated ESM asset on first eligible connection.
diff --git a/viewers/webcomponents/foundation/src/field-widget.mjs b/viewers/webcomponents/foundation/src/field-widget.mjs
index 0affb5d72f1..bb00c2a0c96 100644
--- a/viewers/webcomponents/foundation/src/field-widget.mjs
+++ b/viewers/webcomponents/foundation/src/field-widget.mjs
@@ -22,15 +22,17 @@ const DEFAULT_MODULE_URLS = Object.freeze({
numeric: new URL('./vaadin-fields/vaadin-numeric.js', import.meta.url).href,
'local-temporal': new URL('./vaadin-fields/vaadin-local-temporal.js', import.meta.url).href
});
-let configuration = Object.freeze({families: Object.freeze([]), moduleUrls: DEFAULT_MODULE_URLS});
+let configuration = Object.freeze({families: Object.freeze([...FAMILY_IDS]), moduleUrls: DEFAULT_MODULE_URLS});
const familyModules = new Map();
const failedFamilies = new Set();
-const documentFamilies = globalThis.document?.documentElement?.dataset?.causewayFieldFamilies;
-if (documentFamilies) configureCausewayFieldWidgets({families: documentFamilies});
+const documentPolicy = globalThis.document?.documentElement?.dataset;
+if (documentPolicy && Object.hasOwn(documentPolicy, 'causewayFieldFamilies')) {
+ configureCausewayFieldWidgets({families: documentPolicy.causewayFieldFamilies});
+}
export function configureCausewayFieldWidgets(options = {}) {
- const families = normalizeFamilies(options.families ?? []);
+ const families = normalizeFamilies(options.families ?? FAMILY_IDS);
const moduleUrls = {...DEFAULT_MODULE_URLS};
for (const family of FAMILY_IDS) {
const configured = options.moduleUrls?.[family];
diff --git a/viewers/webcomponents/foundation/src/reference-widget.mjs b/viewers/webcomponents/foundation/src/reference-widget.mjs
index 433aa8f38e7..559655215d0 100644
--- a/viewers/webcomponents/foundation/src/reference-widget.mjs
+++ b/viewers/webcomponents/foundation/src/reference-widget.mjs
@@ -10,19 +10,20 @@ import {escapeHtml} from './rendering.mjs';
const DEFAULT_MODULE_URL = new URL('./vaadin-reference/vaadin-reference.js', import.meta.url).href;
const DEFAULT_CONFIGURATION = Object.freeze({
- enabled: false,
+ enabled: true,
maximumResults: 50,
minimumSearchLength: 2,
moduleUrl: DEFAULT_MODULE_URL
});
let configuration = DEFAULT_CONFIGURATION;
-let candidateModulePromise;
+let referenceModulePromise;
-if (globalThis.document?.documentElement?.dataset?.causewayReferenceWidgets === 'vaadin') {
+const documentPolicy = globalThis.document?.documentElement?.dataset;
+if (documentPolicy && Object.hasOwn(documentPolicy, 'causewayReferenceWidgets')) {
configureCausewayReferenceWidgets({
- enabled: true,
- minimumSearchLength: Number(globalThis.document.documentElement.dataset.causewayReferenceMinimumSearchLength),
- maximumResults: Number(globalThis.document.documentElement.dataset.causewayReferenceMaximumResults)
+ enabled: documentPolicy.causewayReferenceWidgets === 'vaadin',
+ minimumSearchLength: Number(documentPolicy.causewayReferenceMinimumSearchLength),
+ maximumResults: Number(documentPolicy.causewayReferenceMaximumResults)
});
}
@@ -33,7 +34,7 @@ export function configureCausewayReferenceWidgets(options = {}) {
minimumSearchLength: nonNegativeInteger(options.minimumSearchLength, DEFAULT_CONFIGURATION.minimumSearchLength),
moduleUrl: options.moduleUrl ? new URL(options.moduleUrl, globalThis.document?.baseURI ?? import.meta.url).href : DEFAULT_MODULE_URL
});
- candidateModulePromise = undefined;
+ referenceModulePromise = undefined;
return configuration;
}
@@ -124,8 +125,8 @@ export class CausewayReferenceEditorElement extends HTMLElement {
async #upgrade(generation) {
try {
- candidateModulePromise ??= import(configuration.moduleUrl);
- await candidateModulePromise;
+ referenceModulePromise ??= import(configuration.moduleUrl);
+ await referenceModulePromise;
if (!this.isConnected || generation !== this._generation) return;
const tagName = this.hasAttribute('multiple') ? 'vaadin-multi-select-combo-box' : 'vaadin-combo-box';
await globalThis.customElements.whenDefined(tagName);
@@ -165,9 +166,9 @@ export class CausewayReferenceEditorElement extends HTMLElement {
} catch (error) {
if (!this.isConnected || generation !== this._generation) return;
configuration = Object.freeze({...configuration, enabled: false});
- candidateModulePromise = undefined;
+ referenceModulePromise = undefined;
this.dataset.widgetState = 'fallback';
- this.dataset.widgetError = error?.message ?? 'Candidate module failed to load.';
+ this.dataset.widgetError = 'The configured reference adapter could not be loaded.';
this.dispatchEvent(new CustomEvent('causeway-reference-load-failed', {
bubbles: true,
composed: true,
@@ -286,7 +287,7 @@ export class CausewayReferenceEditorElement extends HTMLElement {
option.selected = multiple
? (Array.isArray(this._value) && this._value.some(value => sameReference(value, item)))
: sameReference(this._value, item);
- select.append(option);
+ select.appendChild(option);
}
select.addEventListener('change', () => {
this._value = multiple
diff --git a/viewers/webcomponents/foundation/test/field-widget.test.mjs b/viewers/webcomponents/foundation/test/field-widget.test.mjs
index e286b2c16e7..f04ba419f94 100644
--- a/viewers/webcomponents/foundation/test/field-widget.test.mjs
+++ b/viewers/webcomponents/foundation/test/field-widget.test.mjs
@@ -46,7 +46,11 @@ function context(overrides = {}) {
};
}
-test('normalizes the explicit family allow-list and rejects unsafe policy', () => {
+test('defaults to every qualified field family', () => {
+ assert.deepEqual(causewayFieldWidgetConfiguration().families, ['basic', 'numeric', 'local-temporal']);
+});
+
+test('normalizes the deprecated-compatible family allow-list and rejects unsafe policy', () => {
assert.deepEqual(configureCausewayFieldWidgets({families: 'numeric,basic'}).families, ['basic', 'numeric']);
assert.throws(() => configureCausewayFieldWidgets({families: 'basic,basic'}), /must not be repeated/);
assert.throws(() => configureCausewayFieldWidgets({families: 'unknown'}), /Unknown/);
diff --git a/viewers/webcomponents/foundation/test/interaction.test.mjs b/viewers/webcomponents/foundation/test/interaction.test.mjs
index 7599c35d042..3f59398a4e2 100644
--- a/viewers/webcomponents/foundation/test/interaction.test.mjs
+++ b/viewers/webcomponents/foundation/test/interaction.test.mjs
@@ -32,6 +32,7 @@ const {
buildMutationInteractionOperation,
buildObjectInteractionOperation,
commandSelection,
+ causewayReferenceWidgetConfiguration,
configureCausewayReferenceWidgets,
defaultEditorRegistry,
normalizeAutoCompleteWindow,
@@ -165,40 +166,40 @@ test('editor registry selects standard inputs and supports application overrides
name: 'name', value: 'Classics', choices: [], enumValues: [], inputType: scalar('String'),
inputId: 'name-input', labelId: 'name-label', descriptionId: '', errorId: '', testId: 'name-editor'
});
- assert.equal(text.editorId, 'text');
- assert.match(text.html, /type="text"/);
+ assert.equal(text.editorId, 'vaadin-field');
+ assert.match(text.html, /data-family="basic" data-control="text-field"/);
const multiline = renderCausewayEditor({
name: 'notes', value: 'First line\nSecond line', choices: [], enumValues: [], inputType: scalar('String'), multiLine: 5,
inputId: 'notes-input', labelId: 'notes-label', descriptionId: 'notes-description', errorId: '', testId: 'notes-editor'
});
- assert.equal(multiline.editorId, 'multiline');
- assert.match(multiline.html, /<textarea[^>]+rows="5"/);
- assert.match(multiline.html, /First line\nSecond line<\/textarea>/);
+ assert.equal(multiline.editorId, 'vaadin-field');
+ assert.match(multiline.html, /data-family="basic" data-control="text-area"/);
+ assert.match(multiline.html, /data-rows="5"/);
+ assert.match(multiline.html, /data-value="First line\nSecond line"/);
assert.equal(parseCausewayEditorValue(multiline.editor, {value: 'Updated\nnotes'}), 'Updated\nnotes');
const number = renderCausewayEditor({
name: 'capacity', value: 24, choices: [], enumValues: [], inputType: scalar('Int'),
inputId: 'capacity-input', labelId: 'capacity-label', descriptionId: '', errorId: '', testId: ''
});
- assert.equal(number.editorId, 'number');
+ assert.equal(number.editorId, 'vaadin-field');
assert.equal(parseCausewayEditorValue(number.editor, {value: '25', inputType: scalar('Int')}), 25);
const dateTime = renderCausewayEditor({
name: 'visitAt', value: '2026-08-20T09:00:00', choices: [], enumValues: [], inputType: scalar('LocalDateTime'),
inputId: 'visit-at-input', labelId: 'visit-at-label', descriptionId: '', errorId: '', testId: ''
});
- assert.equal(dateTime.editorId, 'temporal');
- assert.match(dateTime.html, /type="datetime-local"/);
- assert.match(dateTime.html, /step="any"/);
+ assert.equal(dateTime.editorId, 'vaadin-field');
+ assert.match(dateTime.html, /data-family="local-temporal" data-control="date-time-picker"/);
assert.equal(parseCausewayEditorValue(dateTime.editor, {value: '2026-08-21T10:15:00'}), '2026-08-21T10:15:00');
const choices = renderCausewayEditor({
name: 'status', value: 'ACTIVE', choices: ['ACTIVE', 'PAUSED'], enumValues: [], inputType: {kind: 'ENUM', name: 'Status'},
inputId: 'status-input', labelId: 'status-label', descriptionId: '', errorId: '', testId: ''
});
- assert.equal(choices.editorId, 'choice');
- assert.match(choices.html, /<select/);
+ assert.equal(choices.editorId, 'vaadin-field');
+ assert.match(choices.html, /data-family="basic" data-control="select"/);
const registry = new CausewayEditorRegistry(defaultEditorRegistry.registrations);
registry.register({id: 'custom-name', priority: 1000, supports: context => context.name === 'name', render: () => '<textarea></textarea>'});
@@ -242,7 +243,7 @@ test('property interactions preserve exact decimal lexical state and map codec e
errors: [], generation: 1
});
assert.equal(await property.beginEdit(), true);
- assert.equal(property.getAttribute('data-editor'), 'exact-number');
+ assert.equal(property.getAttribute('data-editor'), 'vaadin-field');
assert.match(property.innerHTML, /value="1.2300"/);
const invalid = new Event('input');
@@ -267,7 +268,8 @@ test('property interactions preserve exact decimal lexical state and map codec e
assert.equal(calls.some(call => call.startsWith('update:')), false);
});
-test('opt-in reference widgets preserve identities, multi values, bounds and fallback', () => {
+test('default reference widgets preserve identities, bounds and explicit native fallback', () => {
+ assert.equal(causewayReferenceWidgetConfiguration().enabled, true);
const references = [
{_meta: {id: 'owner-1', logicalTypeName: 'example.Owner', title: 'Owner One'}},
{_meta: {id: 'owner-2', logicalTypeName: 'example.Owner', title: 'Owner Two'}}
@@ -300,12 +302,12 @@ test('opt-in reference widgets preserve identities, multi values, bounds and fal
});
assert.equal(overBound.editorId, 'choice');
configureCausewayReferenceWidgets({enabled: false});
- const disabledPilot = renderCausewayEditor({
+ const nativeFallback = renderCausewayEditor({
name: 'owner', value: references[0], choices: references, suggestions: [], autoComplete: false,
enumValues: [], inputType: named('example_Owner'), inputId: 'owner-input', labelId: 'owner-label',
descriptionId: '', errorId: '', testId: ''
});
- assert.equal(disabledPilot.editorId, 'choice');
+ assert.equal(nativeFallback.editorId, 'choice');
});
test('editable properties support prepare, validation, cancel and authoritative save', async () => {
@@ -364,7 +366,7 @@ test('editable properties support prepare, validation, cancel and authoritative
assert.match(property.innerHTML, /property-name-edit/);
assert.equal(await property.beginEdit(), true);
assert.match(property.innerHTML, /property-name-editor/);
- assert.match(property.innerHTML, /<textarea[^>]+rows="5"/);
+ assert.match(property.innerHTML, /data-control="text-area"[^>]+data-rows="5"/);
property.setPendingValue('Deferred');
const pendingValidation = property.validatePending();
const editorTarget = {
@@ -494,6 +496,30 @@ test('windowed Vaadin reference adapter requests authoritative later pages', asy
document.body.removeChild(editor);
});
+test('default reference module failure is bounded and falls back natively', async () => {
+ configureCausewayReferenceWidgets({
+ enabled: true,
+ moduleUrl: new URL('./fixtures/missing-reference-module.mjs', import.meta.url).href
+ });
+ const editor = new CausewayReferenceEditorElement();
+ editor.id = 'failed-reference';
+ editor.setAttribute('data-causeway-editor', 'owner');
+ editor.setAttribute('data-label', 'Owner');
+ editor.setAttribute('data-items', JSON.stringify([{id: 'owner-1', title: 'Owner One'}]));
+ editor.setAttribute('data-value', 'null');
+ let failure;
+ editor.addEventListener('causeway-reference-load-failed', event => { failure = event.detail; });
+
+ document.body.appendChild(editor);
+ await new Promise(resolve => setTimeout(resolve, 0));
+
+ assert.equal(editor.dataset.widgetState, 'fallback');
+ assert.equal(editor.childNodes[0].localName, 'select');
+ assert.equal(failure.message, 'The configured reference adapter could not be loaded.');
+ assert.doesNotMatch(failure.message, /missing-reference-module/);
+ document.body.removeChild(editor);
+});
+
test('reference autocomplete cancels stale work and rejects over-bound results', async () => {
configureCausewayReferenceWidgets({enabled: true, minimumSearchLength: 2, maximumResults: 2});
let stateListener;
@@ -673,7 +699,7 @@ test('protected action values remain write-only in markup and semantic prompt ev
controller.addEventListener('causeway-action-prompt-state-change', event => published.push(event.detail));
document.body.appendChild(controller);
assert.equal(await controller.beginAction('changePassword', context), true);
- assert.match(controller.innerHTML, /type="password"/);
+ assert.match(controller.innerHTML, /data-control="password-field"/);
const input = new Event('input');
input.target = {
diff --git a/viewers/webcomponents/foundation/test/value-codecs.test.mjs b/viewers/webcomponents/foundation/test/value-codecs.test.mjs
index ce215a0e774..54d497c016d 100644
--- a/viewers/webcomponents/foundation/test/value-codecs.test.mjs
+++ b/viewers/webcomponents/foundation/test/value-codecs.test.mjs
@@ -26,11 +26,14 @@ const {
CausewayValueCodecError,
CausewayValueCodecRegistry,
defaultValueCodecRegistry,
+ configureCausewayFieldWidgets,
parseCausewayValue,
renderCausewayEditor,
selectCausewayValueCodec
} = await import('../src/index.mjs');
+configureCausewayFieldWidgets({families: []});
+
const scalar = name => ({kind: 'SCALAR', name, ofType: null});
const required = type => ({kind: 'NON_NULL', name: null, ofType: type});
const context = (name, value = null, options = {}) => ({
diff --git a/viewers/webcomponents/foundation/vaadin-fields/README.adoc b/viewers/webcomponents/foundation/vaadin-fields/README.adoc
index ea326fc6f5c..f342c19562a 100644
--- a/viewers/webcomponents/foundation/vaadin-fields/README.adoc
+++ b/viewers/webcomponents/foundation/vaadin-fields/README.adoc
@@ -38,5 +38,7 @@ Local time and local date-time values with more than millisecond fractional prec
Blob, Clob, and local resource paths remain explicitly unsupported inputs until a reversible authoritative GraphQL upload contract exists.
References retain their separately packaged closure.
-Disable all field families by leaving `causeway.viewer.webcomponents.htmx.vaadin-field-families` empty.
+Qualified field families are enabled by default and remain independently route-lazy.
+Set `causeway.viewer.webcomponents.htmx.editor-toolkit=native` to disable all Vaadin adapters immediately.
+The old field-family allow-list remains readable only during the documented compatibility period.
A failing closure disables only its family for the current document and rerenders the existing native semantic editor.
diff --git a/viewers/webcomponents/foundation/vaadin-reference/README.adoc b/viewers/webcomponents/foundation/vaadin-reference/README.adoc
index f829f08d450..1fd547eb310 100644
--- a/viewers/webcomponents/foundation/vaadin-reference/README.adoc
+++ b/viewers/webcomponents/foundation/vaadin-reference/README.adoc
@@ -4,7 +4,7 @@
// See the NOTICE file distributed with this work for additional information regarding copyright ownership.
// The ASF licenses this file to you under the Apache License, Version 2.0.
-This directory owns the pinned, selective browser bundle used by the opt-in Causeway reference-widget pilot.
+This directory owns the pinned, selective browser bundle used by the supported default Causeway reference adapter.
The bundle contains Vaadin Combo Box and Multi-Select Combo Box free-core components, aliases usage-statistics collection to Vaadin's no-op module, and packages no Flow or commercial component.
Normal Maven builds verify the checked-in generated assets, package metadata, licenses, checksums, CSP hashes, and compressed budget without contacting npm.
diff --git a/viewers/webcomponents/htmx/README.adoc b/viewers/webcomponents/htmx/README.adoc
index 6e1c58c527b..62628c45617 100644
--- a/viewers/webcomponents/htmx/README.adoc
+++ b/viewers/webcomponents/htmx/README.adoc
@@ -24,20 +24,39 @@ The shell uses external same-origin scripts and styles and requires no inline sc
`causeway.viewer.webcomponents.htmx.language` defaults to `en`.
`causeway.viewer.webcomponents.htmx.application-stylesheet` optionally adds one same-origin application stylesheet after the default theme.
`causeway.viewer.webcomponents.htmx.wicket-comparison-path` optionally adds a footer link and is intended only for comparison samples.
-`causeway.viewer.webcomponents.htmx.vaadin-reference-widgets` defaults to `false` and explicitly enables the internal free-core reference-widget pilot.
-`causeway.viewer.webcomponents.htmx.vaadin-field-families` defaults to empty and accepts a unique comma-separated subset of `basic`, `numeric`, and `local-temporal`.
-Unknown, blank, or repeated family entries fail bounded configuration rather than broadening policy.
+`causeway.viewer.webcomponents.htmx.editor-toolkit` accepts `vaadin` or `native` and defaults to `vaadin`.
+The Vaadin policy enables qualified reference, basic, numeric, and local-temporal internal adapters, while the native policy is the immediate complete rollback.
+`causeway.viewer.webcomponents.htmx.vaadin-reference-widgets` and `causeway.viewer.webcomponents.htmx.vaadin-field-families` remain readable for a bounded deprecation period.
+When the common property is explicit it wins over both deprecated properties.
+When the common property is absent but either deprecated property is explicit, the complete former policy is preserved: references default false and field families default empty unless their corresponding old value is supplied.
+Unknown, blank, or repeated deprecated family entries fail bounded configuration rather than broadening policy.
`causeway.viewer.webcomponents.htmx.reference-minimum-search-length` defaults to `2`.
`causeway.viewer.webcomponents.htmx.reference-maximum-results` defaults to `50` and is the requested page-size fallback for advertised GraphQL autocomplete windows as well as the accepted complete-response bound for legacy non-windowed autocomplete.
An advertised field's smaller introspected default window size takes precedence.
+[source,properties]
+----
+# Supported default
+causeway.viewer.webcomponents.htmx.editor-toolkit=vaadin
+
+# Immediate rollback and diagnostic comparison
+causeway.viewer.webcomponents.htmx.editor-toolkit=native
+----
+
The complete shell applies a restrictive same-origin content-security policy and returns `private, no-store`.
-The default policy and asset requests remain unchanged while the pilot is disabled.
-When a Vaadin reference or field family is enabled, the policy adds the deterministic deduplicated union of only its reviewed byte-exact `style-src` and `style-src-elem` SHA-256 sources, retains `style-src-attr 'none'`, and never adds `unsafe-inline`.
+The default Vaadin policy adds the deterministic deduplicated union of only the reviewed byte-exact `style-src` and `style-src-elem` SHA-256 sources, retains `style-src-attr 'none'`, and never adds `unsafe-inline`.
The reference, basic, numeric, and local-temporal JavaScript closures remain independently route-lazy and are requested only when an eligible semantic editor is instantiated.
-Disabling every policy restores the native strict policy without changing routes or GraphQL.
+Landing, read-only, and otherwise unaffected routes therefore make zero Vaadin asset requests even though their policy permits reviewed hashes.
+The native policy removes every Vaadin hash and asset request without changing routes, GraphQL, persisted data, or application markup.
Applications adding other third-party resources must deliberately supply an equivalent deployment policy rather than weakening this module silently.
+== Toolkit release obligations
+
+The default toolkit is supported only through the checked-in selective reference and field closures.
+A dependency update must regenerate and review npm integrity, package entry points, production licenses, telemetry opt-out, raw and gzip budgets, SHA-256 checksums, exact style hashes, and same-origin assets as one change.
+Release qualification runs deterministic build verification, zero-vulnerability production audit, enforcing CSP, axe, keyboard, focus, responsive, light, dark, reduced-motion, forced-colors, console, page-error, external-request, overflow, Petclinic, vanilla sample, Reference Application, and explicit-native rollback gates.
+A failed closure retains its existing Causeway-owned native fallback; a deployment can roll back all adapters with the common native property without changing routes, GraphQL, persisted values, or application markup.
+
== Canonical routes
The canonical object route is `<base-path>/object/<logical-type>/<identifier>`.
@@ -108,3 +127,4 @@ See `../sample-htmx-petclinic/PROVENANCE.adoc` for the pinned Apache Petclinic s
The module does not add routing awareness to `<causeway-object>`.
It does not construct domain GraphQL operations, translate GraphQL values, parse effective grid or menu XML, expose metamodel internals, or define Vue and Svelte lifecycle APIs.
It does not require applications that use only the component library to adopt HTMX, Wicket, Petclinic, or the default theme.
+The default toolkit policy adds no Grid query contract, upload adapter, unsupported temporal adapter, Flow, Binder, Pro component, server-side Vaadin state, telemetry, CDN asset, or application-facing raw Vaadin API.
diff --git a/viewers/webcomponents/htmx/src/main/java/org/apache/causeway/viewer/webcomponents/htmx/HtmxPageRenderer.java b/viewers/webcomponents/htmx/src/main/java/org/apache/causeway/viewer/webcomponents/htmx/HtmxPageRenderer.java
index ad157a5ab2f..4d8e9ee4160 100644
--- a/viewers/webcomponents/htmx/src/main/java/org/apache/causeway/viewer/webcomponents/htmx/HtmxPageRenderer.java
+++ b/viewers/webcomponents/htmx/src/main/java/org/apache/causeway/viewer/webcomponents/htmx/HtmxPageRenderer.java
@@ -154,19 +154,15 @@ String renderShell(final String contextPath, final String fragment, final String
}
private String widgetAttributes() {
- var attributes = "";
- if (properties.isVaadinReferenceWidgets()) {
- final var minimumSearchLength = Math.max(0, properties.getReferenceMinimumSearchLength());
- final var maximumResults = Math.max(1, properties.getReferenceMaximumResults());
- attributes += " data-causeway-reference-widgets=\"vaadin\""
- + " data-causeway-reference-minimum-search-length=\"" + minimumSearchLength + "\""
- + " data-causeway-reference-maximum-results=\"" + maximumResults + "\"";
- }
- if (!properties.getVaadinFieldFamilies().isBlank()) {
- attributes += " data-causeway-field-families=\""
- + escape(properties.getVaadinFieldFamilies()) + "\"";
- }
- return attributes;
+ final var minimumSearchLength = Math.max(0, properties.getReferenceMinimumSearchLength());
+ final var maximumResults = Math.max(1, properties.getReferenceMaximumResults());
+ final var referenceWidgets = properties.isEffectiveVaadinReferenceWidgets() ? "vaadin" : "native";
+ return " data-causeway-editor-toolkit=\"" + properties.getResolvedEditorToolkit() + "\""
+ + " data-causeway-reference-widgets=\"" + referenceWidgets + "\""
+ + " data-causeway-reference-minimum-search-length=\"" + minimumSearchLength + "\""
+ + " data-causeway-reference-maximum-results=\"" + maximumResults + "\""
+ + " data-causeway-field-families=\""
+ + escape(properties.getEffectiveVaadinFieldFamilies()) + "\"";
}
private String applicationStylesheet(final String contextPath) {
diff --git a/viewers/webcomponents/htmx/src/main/java/org/apache/causeway/viewer/webcomponents/htmx/HtmxViewerController.java b/viewers/webcomponents/htmx/src/main/java/org/apache/causeway/viewer/webcomponents/htmx/HtmxViewerController.java
index 160faa05988..6f15bc3705d 100644
--- a/viewers/webcomponents/htmx/src/main/java/org/apache/causeway/viewer/webcomponents/htmx/HtmxViewerController.java
+++ b/viewers/webcomponents/htmx/src/main/java/org/apache/causeway/viewer/webcomponents/htmx/HtmxViewerController.java
@@ -37,7 +37,8 @@ public class HtmxViewerController {
private static final MediaType HTML_UTF8 = MediaType.parseMediaType("text/html;charset=UTF-8");
private static final String CONTENT_SECURITY_POLICY = "default-src 'self'; script-src 'self'; style-src 'self'; "
- + "img-src 'self' data:; connect-src 'self'; object-src 'none'; base-uri 'self'; frame-ancestors 'self'";
+ + "style-src-elem 'self'; style-src-attr 'none'; img-src 'self' data:; connect-src 'self'; "
+ + "object-src 'none'; base-uri 'self'; frame-ancestors 'self'";
private static final List<String> VAADIN_REFERENCE_STYLE_HASHES = List.of(
"sha256-xGEkK13KcZJdGhZfeIjuH6IWVGTHtjs/IqUVa8T0XXw=",
"sha256-LGebpGBP4rWWgHT+HLo2ODJGtFNV4EbTdFjEntFbBEQ=",
@@ -121,10 +122,10 @@ public ResponseEntity<String> route(final HttpServletRequest request) {
private String contentSecurityPolicy() {
final var hashes = new LinkedHashSet<String>();
- if (properties.isVaadinReferenceWidgets()) {
+ if (properties.isEffectiveVaadinReferenceWidgets()) {
hashes.addAll(VAADIN_REFERENCE_STYLE_HASHES);
}
- for (final var family : properties.getVaadinFieldFamilies().split(",")) {
+ for (final var family : properties.getEffectiveVaadinFieldFamilies().split(",")) {
hashes.addAll(switch (family) {
case "basic" -> VAADIN_BASIC_STYLE_HASHES;
case "numeric" -> VAADIN_NUMERIC_STYLE_HASHES;
@@ -141,7 +142,9 @@ private String contentSecurityPolicy() {
final var vaadinStylePolicy = "style-src 'self' " + sources
+ "; style-src-elem 'self' " + sources
+ "; style-src-attr 'none';";
- return CONTENT_SECURITY_POLICY.replace("style-src 'self';", vaadinStylePolicy);
+ return CONTENT_SECURITY_POLICY.replace(
+ "style-src 'self'; style-src-elem 'self'; style-src-attr 'none';",
+ vaadinStylePolicy);
}
private String applicationPath(final HttpServletRequest request) {
diff --git a/viewers/webcomponents/htmx/src/main/java/org/apache/causeway/viewer/webcomponents/htmx/HtmxViewerProperties.java b/viewers/webcomponents/htmx/src/main/java/org/apache/causeway/viewer/webcomponents/htmx/HtmxViewerProperties.java
index fe50536ae3f..cccaec8f1e0 100644
--- a/viewers/webcomponents/htmx/src/main/java/org/apache/causeway/viewer/webcomponents/htmx/HtmxViewerProperties.java
+++ b/viewers/webcomponents/htmx/src/main/java/org/apache/causeway/viewer/webcomponents/htmx/HtmxViewerProperties.java
@@ -23,14 +23,35 @@
@ConfigurationProperties(prefix = "causeway.viewer.webcomponents.htmx")
public class HtmxViewerProperties {
+ public enum EditorToolkit {
+ VAADIN("vaadin"),
+ NATIVE("native");
+
+ private final String externalName;
+
+ EditorToolkit(final String externalName) {
+ this.externalName = externalName;
+ }
+
+ public String externalName() {
+ return externalName;
+ }
+ }
+
+ static final String ALL_VAADIN_FIELD_FAMILIES = "basic,numeric,local-temporal";
+
private String basePath = "/htmx";
private String graphQlEndpoint = "/graphql";
private String brand = "Apache Causeway";
private String language = "en";
private String wicketComparisonPath;
private String applicationStylesheet;
+ private EditorToolkit editorToolkit = EditorToolkit.VAADIN;
+ private boolean editorToolkitConfigured;
private boolean vaadinReferenceWidgets;
+ private boolean vaadinReferenceWidgetsConfigured;
private String vaadinFieldFamilies = "";
+ private boolean vaadinFieldFamiliesConfigured;
private int referenceMinimumSearchLength = 2;
private int referenceMaximumResults = 50;
@@ -82,20 +103,81 @@ public void setApplicationStylesheet(final String applicationStylesheet) {
this.applicationStylesheet = applicationStylesheet;
}
+ public EditorToolkit getEditorToolkit() {
+ return editorToolkit;
+ }
+
+ public void setEditorToolkit(final EditorToolkit editorToolkit) {
+ if (editorToolkit == null) {
+ throw new IllegalArgumentException("Editor toolkit must be vaadin or native.");
+ }
+ this.editorToolkit = editorToolkit;
+ this.editorToolkitConfigured = true;
+ }
+
+ /**
+ * @deprecated Use {@code editor-toolkit}.
+ */
+ @Deprecated(forRemoval = false)
public boolean isVaadinReferenceWidgets() {
return vaadinReferenceWidgets;
}
+ /**
+ * @deprecated Use {@code editor-toolkit}.
+ */
+ @Deprecated(forRemoval = false)
public void setVaadinReferenceWidgets(final boolean vaadinReferenceWidgets) {
this.vaadinReferenceWidgets = vaadinReferenceWidgets;
+ this.vaadinReferenceWidgetsConfigured = true;
}
+ /**
+ * @deprecated Use {@code editor-toolkit}.
+ */
+ @Deprecated(forRemoval = false)
public String getVaadinFieldFamilies() {
return vaadinFieldFamilies;
}
+ /**
+ * @deprecated Use {@code editor-toolkit}.
+ */
+ @Deprecated(forRemoval = false)
public void setVaadinFieldFamilies(final String vaadinFieldFamilies) {
this.vaadinFieldFamilies = normalizeFieldFamilies(vaadinFieldFamilies);
+ this.vaadinFieldFamiliesConfigured = true;
+ }
+
+ public boolean isEffectiveVaadinReferenceWidgets() {
+ if (editorToolkitConfigured) {
+ return editorToolkit == EditorToolkit.VAADIN;
+ }
+ if (usesDeprecatedToolkitConfiguration()) {
+ return vaadinReferenceWidgetsConfigured && vaadinReferenceWidgets;
+ }
+ return true;
+ }
+
+ public String getEffectiveVaadinFieldFamilies() {
+ if (editorToolkitConfigured) {
+ return editorToolkit == EditorToolkit.VAADIN ? ALL_VAADIN_FIELD_FAMILIES : "";
+ }
+ if (usesDeprecatedToolkitConfiguration()) {
+ return vaadinFieldFamiliesConfigured ? vaadinFieldFamilies : "";
+ }
+ return ALL_VAADIN_FIELD_FAMILIES;
+ }
+
+ public boolean usesDeprecatedToolkitConfiguration() {
+ return !editorToolkitConfigured && (vaadinReferenceWidgetsConfigured || vaadinFieldFamiliesConfigured);
+ }
+
+ public String getResolvedEditorToolkit() {
+ if (usesDeprecatedToolkitConfiguration()) {
+ return "compatibility";
+ }
+ return editorToolkit.externalName();
}
public int getReferenceMinimumSearchLength() {
diff --git a/viewers/webcomponents/htmx/src/test/java/org/apache/causeway/viewer/webcomponents/htmx/HtmxViewerControllerTest.java b/viewers/webcomponents/htmx/src/test/java/org/apache/causeway/viewer/webcomponents/htmx/HtmxViewerControllerTest.java
index 9c9e91bde48..af50c10f450 100644
--- a/viewers/webcomponents/htmx/src/test/java/org/apache/causeway/viewer/webcomponents/htmx/HtmxViewerControllerTest.java
+++ b/viewers/webcomponents/htmx/src/test/java/org/apache/causeway/viewer/webcomponents/htmx/HtmxViewerControllerTest.java
@@ -47,9 +47,15 @@ void returnsCompleteStableShellForOrdinaryObjectRequest() {
.contains("<causeway-interaction-controller data-causeway-route-interactions>");
assertThat(response.getHeaders().getFirst("Content-Security-Policy"))
.contains("default-src 'self'")
- .doesNotContain("sha256-")
- .doesNotContain("style-src-attr");
- assertThat(response.getBody()).doesNotContain("data-causeway-reference-widgets");
+ .contains("sha256-0wLqlhzs6Y30XLr3aVbYP1PYgStuEbKPfSQ0hPe+kY4=")
+ .contains("sha256-8YLhGMhYZnbpzrpjhu2GmLRimv2CABlByy++wN9OR0w=")
+ .contains("sha256-3QT3eM+q9TclSqSU3m57G/bQwWnIhIFfAxgKI5k9zxs=")
+ .contains("style-src-attr 'none'")
+ .doesNotContain("'unsafe-inline'");
+ assertThat(response.getBody())
+ .contains("data-causeway-editor-toolkit=\"vaadin\"")
+ .contains("data-causeway-reference-widgets=\"vaadin\"")
+ .contains("data-causeway-field-families=\"basic,numeric,local-temporal\"");
assertThat(response.getHeaders().getFirst("HX-Push-Url")).isNull();
}
@@ -74,7 +80,24 @@ void preservesLongOpaqueIdentityAcrossFullFragmentAndHistoryResponses() {
}
@Test
- void addsOnlyPinnedReferenceWidgetStyleHashesWhenPilotIsEnabled() {
+ void explicitNativePolicyRemovesVaadinAdaptersAndHashes() {
+ properties.setEditorToolkit(HtmxViewerProperties.EditorToolkit.NATIVE);
+
+ final var response = controller(List.of()).route(request("/htmx", "", false));
+
+ assertThat(response.getHeaders().getFirst("Content-Security-Policy"))
+ .doesNotContain("sha256-")
+ .contains("style-src-attr 'none'")
+ .doesNotContain("'unsafe-inline'");
+ assertThat(response.getBody())
+ .contains("data-causeway-editor-toolkit=\"native\"")
+ .contains("data-causeway-reference-widgets=\"native\"")
+ .contains("data-causeway-field-families=\"\"");
+ }
+
+ @Test
+ @SuppressWarnings("deprecation")
+ void addsOnlyPinnedReferenceWidgetStyleHashesInDeprecatedCompatibilityMode() {
properties.setVaadinReferenceWidgets(true);
properties.setReferenceMinimumSearchLength(3);
properties.setReferenceMaximumResults(40);
@@ -85,19 +108,25 @@ void addsOnlyPinnedReferenceWidgetStyleHashesWhenPilotIsEnabled() {
.contains("style-src-attr 'none'")
.doesNotContain("'unsafe-inline'");
assertThat(response.getBody())
+ .contains("data-causeway-editor-toolkit=\"compatibility\"")
.contains("data-causeway-reference-widgets=\"vaadin\"")
.contains("data-causeway-reference-minimum-search-length=\"3\"")
- .contains("data-causeway-reference-maximum-results=\"40\"");
+ .contains("data-causeway-reference-maximum-results=\"40\"")
+ .contains("data-causeway-field-families=\"\"");
}
@Test
- void addsOnlyEnabledFieldFamilyHashesAndCanonicalShellPolicy() {
+ @SuppressWarnings("deprecation")
+ void addsOnlyEnabledFieldFamilyHashesInDeprecatedCompatibilityMode() {
properties.setVaadinFieldFamilies("numeric, basic");
final var response = controller(List.of()).route(request("/htmx", "", false));
final var policy = response.getHeaders().getFirst("Content-Security-Policy");
- assertThat(response.getBody()).contains("data-causeway-field-families=\"basic,numeric\"");
+ assertThat(response.getBody())
+ .contains("data-causeway-editor-toolkit=\"compatibility\"")
+ .contains("data-causeway-reference-widgets=\"native\"")
+ .contains("data-causeway-field-families=\"basic,numeric\"");
assertThat(policy)
.contains("sha256-0wLqlhzs6Y30XLr3aVbYP1PYgStuEbKPfSQ0hPe+kY4=")
.contains("sha256-8YLhGMhYZnbpzrpjhu2GmLRimv2CABlByy++wN9OR0w=")
@@ -109,7 +138,8 @@ void addsOnlyEnabledFieldFamilyHashesAndCanonicalShellPolicy() {
}
@Test
- void deduplicatesReferenceAndFieldHashesAndRejectsInvalidFamilies() {
+ @SuppressWarnings("deprecation")
+ void deduplicatesDeprecatedReferenceAndFieldHashesAndRejectsInvalidFamilies() {
properties.setVaadinReferenceWidgets(true);
properties.setVaadinFieldFamilies("local-temporal");
@@ -126,6 +156,26 @@ void deduplicatesReferenceAndFieldHashesAndRejectsInvalidFamilies() {
.isInstanceOf(IllegalArgumentException.class);
}
+ @Test
+ @SuppressWarnings("deprecation")
+ void explicitCommonPolicyPreventsDeprecatedValuesFromMixingShellPolicy() {
+ properties.setVaadinReferenceWidgets(false);
+ properties.setVaadinFieldFamilies("");
+ properties.setEditorToolkit(HtmxViewerProperties.EditorToolkit.VAADIN);
+
+ final var response = controller(List.of()).route(request("/htmx", "", false));
+ final var policy = response.getHeaders().getFirst("Content-Security-Policy");
+
+ assertThat(response.getBody())
+ .contains("data-causeway-editor-toolkit=\"vaadin\"")
+ .contains("data-causeway-reference-widgets=\"vaadin\"")
+ .contains("data-causeway-field-families=\"basic,numeric,local-temporal\"");
+ assertThat(policy)
+ .contains("sha256-0wLqlhzs6Y30XLr3aVbYP1PYgStuEbKPfSQ0hPe+kY4=")
+ .contains("sha256-8YLhGMhYZnbpzrpjhu2GmLRimv2CABlByy++wN9OR0w=")
+ .contains("sha256-3QT3eM+q9TclSqSU3m57G/bQwWnIhIFfAxgKI5k9zxs=");
+ }
+
@Test
void returnsOnlyCustomFragmentAndCanonicalHistoryForHtmxRequest() {
final var custom = new HtmxPageFragmentFactory() {
diff --git a/viewers/webcomponents/htmx/src/test/java/org/apache/causeway/viewer/webcomponents/htmx/HtmxViewerPropertiesTest.java b/viewers/webcomponents/htmx/src/test/java/org/apache/causeway/viewer/webcomponents/htmx/HtmxViewerPropertiesTest.java
new file mode 100644
index 00000000000..630a8525e23
--- /dev/null
+++ b/viewers/webcomponents/htmx/src/test/java/org/apache/causeway/viewer/webcomponents/htmx/HtmxViewerPropertiesTest.java
@@ -0,0 +1,109 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.causeway.viewer.webcomponents.htmx;
+
+import org.junit.jupiter.api.Test;
+
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThatThrownBy;
+
+class HtmxViewerPropertiesTest {
+
+ @Test
+ void defaultsToEveryQualifiedVaadinAdapter() {
+ final var properties = new HtmxViewerProperties();
+
+ assertThat(properties.getEditorToolkit()).isEqualTo(HtmxViewerProperties.EditorToolkit.VAADIN);
+ assertThat(properties.getResolvedEditorToolkit()).isEqualTo("vaadin");
+ assertThat(properties.isEffectiveVaadinReferenceWidgets()).isTrue();
+ assertThat(properties.getEffectiveVaadinFieldFamilies())
+ .isEqualTo("basic,numeric,local-temporal");
+ assertThat(properties.usesDeprecatedToolkitConfiguration()).isFalse();
+ }
+
+ @Test
+ void explicitNativePolicyDisablesEveryVaadinAdapter() {
+ final var properties = new HtmxViewerProperties();
+
+ properties.setEditorToolkit(HtmxViewerProperties.EditorToolkit.NATIVE);
+
+ assertThat(properties.getResolvedEditorToolkit()).isEqualTo("native");
+ assertThat(properties.isEffectiveVaadinReferenceWidgets()).isFalse();
+ assertThat(properties.getEffectiveVaadinFieldFamilies()).isEmpty();
+ }
+
+ @Test
+ @SuppressWarnings("deprecation")
+ void explicitCommonPolicyOverridesDeprecatedValues() {
+ final var properties = new HtmxViewerProperties();
+ properties.setVaadinReferenceWidgets(false);
+ properties.setVaadinFieldFamilies("");
+
+ properties.setEditorToolkit(HtmxViewerProperties.EditorToolkit.VAADIN);
+
+ assertThat(properties.usesDeprecatedToolkitConfiguration()).isFalse();
+ assertThat(properties.getResolvedEditorToolkit()).isEqualTo("vaadin");
+ assertThat(properties.isEffectiveVaadinReferenceWidgets()).isTrue();
+ assertThat(properties.getEffectiveVaadinFieldFamilies())
+ .isEqualTo("basic,numeric,local-temporal");
+ }
+
+ @Test
+ @SuppressWarnings("deprecation")
+ void anyDeprecatedPropertyActivatesTheCompleteOldDefaultPolicy() {
+ final var referenceOnly = new HtmxViewerProperties();
+ referenceOnly.setVaadinReferenceWidgets(true);
+ assertThat(referenceOnly.getResolvedEditorToolkit()).isEqualTo("compatibility");
+ assertThat(referenceOnly.isEffectiveVaadinReferenceWidgets()).isTrue();
+ assertThat(referenceOnly.getEffectiveVaadinFieldFamilies()).isEmpty();
+
+ final var fieldsOnly = new HtmxViewerProperties();
+ fieldsOnly.setVaadinFieldFamilies("local-temporal,basic");
+ assertThat(fieldsOnly.getResolvedEditorToolkit()).isEqualTo("compatibility");
+ assertThat(fieldsOnly.isEffectiveVaadinReferenceWidgets()).isFalse();
+ assertThat(fieldsOnly.getEffectiveVaadinFieldFamilies()).isEqualTo("basic,local-temporal");
+ }
+
+ @Test
+ @SuppressWarnings("deprecation")
+ void deprecatedFalseAndEmptyValuesRetainNativeBehavior() {
+ final var properties = new HtmxViewerProperties();
+ properties.setVaadinReferenceWidgets(false);
+ properties.setVaadinFieldFamilies("");
+
+ assertThat(properties.usesDeprecatedToolkitConfiguration()).isTrue();
+ assertThat(properties.isEffectiveVaadinReferenceWidgets()).isFalse();
+ assertThat(properties.getEffectiveVaadinFieldFamilies()).isEmpty();
+ }
+
+ @Test
+ @SuppressWarnings("deprecation")
+ void invalidValuesAreRejectedWithoutBroadeningPolicy() {
+ final var properties = new HtmxViewerProperties();
+
+ assertThatThrownBy(() -> properties.setEditorToolkit(null))
+ .isInstanceOf(IllegalArgumentException.class)
+ .hasMessageContaining("vaadin or native");
+ assertThatThrownBy(() -> properties.setVaadinFieldFamilies("basic,unknown"))
+ .isInstanceOf(IllegalArgumentException.class)
+ .hasMessageContaining("basic, numeric, and local-temporal");
+ assertThatThrownBy(() -> properties.setVaadinFieldFamilies("basic,basic"))
+ .isInstanceOf(IllegalArgumentException.class);
+ }
+}
diff --git a/viewers/webcomponents/sample-html/README.adoc b/viewers/webcomponents/sample-html/README.adoc
index b3f37a62b13..4ed3687da40 100644
--- a/viewers/webcomponents/sample-html/README.adoc
+++ b/viewers/webcomponents/sample-html/README.adoc
@@ -137,7 +137,7 @@ The root identity and expected values are:
|`findRelated(search)`, with autocomplete and a related-object collection result
|Safe reference action
-|`selectRelated(related)`, with fixed object choices rendered through the explicitly enabled route-lazy reference-widget pilot
+|`selectRelated(related)`, with fixed object choices rendered through the default route-lazy reference adapter
|Void mutating action
|`clearNotes`, invoked through a top-level mutation and followed by context refresh
@@ -209,7 +209,8 @@ Ordinary values are enabled at the Causeway metamodel level, while the `code` pr
The `secret` property and `hiddenAction` render no semantic content, and the coverage guide explains their absence without reproducing a hidden value.
The `summary`, `capacity`, `featured`, `status`, and `notes` properties expose explicit edit affordances, while the page remains read-only for every property without `editable`.
The standard interaction controller invokes `inspect` directly, opens accessible prompts for `updateDetails`, `findRelated`, and `selectRelated`, executes `clearNotes`, and publishes typed semantic results without automatic navigation.
-The page configures the optional reference pilot before importing the complete foundation index, but no Vaadin asset is requested until the `selectRelated` prompt creates its eligible semantic reference editor.
+The page uses the foundation's supported default adapters, but no Vaadin asset is requested until an eligible semantic editor such as the `selectRelated` prompt connects.
+A plain-HTML diagnostic host can select native controls by calling `configureCausewayReferenceWidgets({enabled: false})` and `configureCausewayFieldWidgets({families: []})` before importing `index.mjs`.
Both collections are activated declaratively by the sample page.
`relatedObjects` loads through a secondary context-owned operation and renders the declared `name` and `code` columns.
@@ -327,7 +328,7 @@ The following selectors are intended as public test hooks for browser automation
|Parameterized safe autocomplete and collection-result action
|`[data-testid="action-select-related"]`
-|Parameterized safe object-reference action and route-lazy candidate trigger
+|Parameterized safe object-reference action and route-lazy reference trigger
|`[data-testid="action-clear-notes"]`
|Mutating void-result action
@@ -454,7 +455,7 @@ Forced fallback produced canonical 12/4/8 spans without another grid request, an
Lighthouse navigation audits again scored 100 for Accessibility, Best Practices, and SEO in both desktop light-mode and mobile dark-mode configurations.
Pointer and keyboard checks covered property cancellation, invalid and corrected validation, authoritative save, enum choices, action defaults, autocomplete, invalid blocking, Escape cancellation, focus restoration, and disabled and hidden actions.
The `inspect`, `updateDetails`, `findRelated`, `selectRelated`, and `clearNotes` flows produced scalar, object, collection, and void semantic results without automatic navigation.
-The `selectRelated` prompt loaded the candidate closure once, preserved stable object identity, restored focus on Escape, and left all earlier routes free of candidate requests.
+The `selectRelated` prompt loaded the default reference closure once, preserved stable object identity, restored focus on Escape, and left all earlier routes free of Vaadin requests.
Network inspection confirmed rich queries for safe behavior, top-level mutations for property updates and mutating actions, typed enum and target variables, successful responses, and complete context refresh after mutation.
Wide light-mode and narrow dark-mode checks remained usable and readable, with no application console errors.
Lighthouse navigation audits scored 100 for Accessibility, Best Practices, and SEO in both desktop light-mode and mobile dark-mode configurations.
diff --git a/viewers/webcomponents/sample-html/src/main/resources/static/sample-html/index.html b/viewers/webcomponents/sample-html/src/main/resources/static/sample-html/index.html
index 5e2672da199..8424b49ad15 100644
--- a/viewers/webcomponents/sample-html/src/main/resources/static/sample-html/index.html
+++ b/viewers/webcomponents/sample-html/src/main/resources/static/sample-html/index.html
@@ -523,10 +523,6 @@ <h2 id="sample-composite-heading">Complete object from context plus component</h
report(interactionOutput, `result:${event.detail.actionId}:${result?.kind ?? 'unknown'}${value}${target}`);
});
- const {configureCausewayReferenceWidgets} = await import('/causeway-webcomponents/reference-widget.mjs');
- const {configureCausewayFieldWidgets} = await import('/causeway-webcomponents/field-widget.mjs');
- configureCausewayReferenceWidgets({enabled: true, minimumSearchLength: 2, maximumResults: 50});
- configureCausewayFieldWidgets({families: ['basic', 'numeric', 'local-temporal']});
await import('/causeway-webcomponents/index.mjs');
</script>
</body>
diff --git a/viewers/webcomponents/sample-htmx-petclinic/README.adoc b/viewers/webcomponents/sample-htmx-petclinic/README.adoc
index 43ccab2300e..4c12eaf266a 100644
--- a/viewers/webcomponents/sample-htmx-petclinic/README.adoc
+++ b/viewers/webcomponents/sample-htmx-petclinic/README.adoc
@@ -9,9 +9,9 @@ It ports the Pet Owner, Pet, Visit, home, fixture, menu, and grid concepts from
The application runs the GraphQL, generic HTMX, and current Wicket viewers over one Causeway metamodel, H2 database, security policy, effective menu definition, effective grid definitions, and deterministic fixture.
The Wicket viewer is a side-by-side presentation reference rather than a dependency of the generic HTMX module.
-The sample explicitly enables the route-lazy Vaadin free-core reference adapter and qualified basic, numeric, and local-temporal field families.
-Its strict CSP adds only the pinned deduplicated hashes for enabled closures, preserves `style-src-attr 'none'`, and makes no candidate request until an eligible editor opens.
-Causeway elements, codecs, GraphQL interactions, and semantic events remain authoritative, and empty field-family plus disabled reference configuration provides the native rollback.
+The sample uses the supported default route-lazy Vaadin free-core reference adapter and qualified basic, numeric, and local-temporal field families without an application opt-in.
+Its strict CSP adds only the pinned deduplicated hashes for reviewed closures, preserves `style-src-attr 'none'`, and makes no Vaadin request until an eligible editor opens.
+Causeway elements, codecs, GraphQL interactions, and semantic events remain authoritative, and the common native toolkit policy provides immediate rollback.
== Run
@@ -57,7 +57,7 @@ mvn -f viewers/webcomponents/pom.xml \
test
----
-Add `-Dcauseway.viewer.webcomponents.htmx.vaadin-reference-widgets=false -Dcauseway.viewer.webcomponents.htmx.vaadin-field-families=` to run the same suite through explicit native editors.
+Add `-Dcauseway.viewer.webcomponents.htmx.editor-toolkit=native` to run the same suite through explicit native editors.
Set `-Dplaywright.headless=false` only when deliberately debugging in a visible browser.
Set `-Dplaywright.chromium.executable=/absolute/path/to/chromium` or `-Dplaywright.chromium.channel=chrome` to use an installed browser instead of Playwright's bundled Chromium.
diff --git a/viewers/webcomponents/sample-htmx-petclinic/src/main/resources/application.properties b/viewers/webcomponents/sample-htmx-petclinic/src/main/resources/application.properties
index 75c2c4cd86e..c21e025aff7 100644
--- a/viewers/webcomponents/sample-htmx-petclinic/src/main/resources/application.properties
+++ b/viewers/webcomponents/sample-htmx-petclinic/src/main/resources/application.properties
@@ -28,7 +28,5 @@ causeway.viewer.webcomponents.htmx.graph-ql-endpoint=/graphql
causeway.viewer.webcomponents.htmx.brand=Pet Clinic
causeway.viewer.webcomponents.htmx.wicket-comparison-path=/wicket/
causeway.viewer.webcomponents.htmx.application-stylesheet=/css/application.css
-causeway.viewer.webcomponents.htmx.vaadin-reference-widgets=true
-causeway.viewer.webcomponents.htmx.vaadin-field-families=basic,numeric,local-temporal
causeway.viewer.webcomponents.htmx.reference-minimum-search-length=2
causeway.viewer.webcomponents.htmx.reference-maximum-results=50
diff --git a/viewers/webcomponents/sample-htmx-petclinic/src/playwright/java/org/apache/causeway/viewer/webcomponents/sample/htmx/petclinic/PetClinicHtmxPlaywrightTest.java b/viewers/webcomponents/sample-htmx-petclinic/src/playwright/java/org/apache/causeway/viewer/webcomponents/sample/htmx/petclinic/PetClinicHtmxPlaywrightTest.java
index 58cf27ec044..ef77ba64ae3 100644
--- a/viewers/webcomponents/sample-htmx-petclinic/src/playwright/java/org/apache/causeway/viewer/webcomponents/sample/htmx/petclinic/PetClinicHtmxPlaywrightTest.java
+++ b/viewers/webcomponents/sample-htmx-petclinic/src/playwright/java/org/apache/causeway/viewer/webcomponents/sample/htmx/petclinic/PetClinicHtmxPlaywrightTest.java
@@ -66,6 +66,7 @@ class PetClinicHtmxPlaywrightTest {
private PetOwnerRepository ownerRepository;
private final List<String> browserFailures = new ArrayList<>();
+ private final List<String> toolkitRequests = new ArrayList<>();
private Playwright playwright;
private Browser browser;
@@ -100,6 +101,7 @@ void stopBrowser() {
@BeforeEach
void openPage() {
browserFailures.clear();
+ toolkitRequests.clear();
browserContext = browser.newContext(new Browser.NewContextOptions()
.setViewportSize(1440, 900)
.setColorScheme(ColorScheme.LIGHT));
@@ -139,6 +141,12 @@ const record = message => globalThis.__causewayPlaywrightFailures.push(String(me
}
});
page.onPageError(error -> browserFailures.add("page: " + error));
+ page.onRequest(request -> {
+ if (request.url().contains("/causeway-webcomponents/vaadin-reference/")
+ || request.url().contains("/causeway-webcomponents/vaadin-fields/")) {
+ toolkitRequests.add(request.url());
+ }
+ });
page.onRequestFailed(request -> {
final var failure = request.failure();
if (!(request.url().contains("/graphql") && failure != null && failure.contains("ERR_ABORTED"))) {
@@ -149,6 +157,9 @@ const record = message => globalThis.__causewayPlaywrightFailures.push(String(me
@AfterEach
void closePage() {
+ if (nativeToolkit()) {
+ assertThat(toolkitRequests).isEmpty();
+ }
assertNoBrowserFailures();
if (browserContext != null) {
browserContext.close();
@@ -160,6 +171,9 @@ void closePage() {
void routesHomeObjectsHistoryCollectionsAndResponsiveLayout() {
openHome();
+ assertThat(page.locator("html").getAttribute("data-causeway-editor-toolkit"))
+ .isEqualTo(nativeToolkit() ? "native" : "vaadin");
+ assertThat(toolkitRequests).isEmpty();
assertThat(page.locator(ROUTE_PAGE).getAttribute("data-page-kind")).isEqualTo("custom");
assertThat(page.locator("[data-testid='petclinic-custom-home']").isVisible()).isTrue();
assertFocused(ROUTE_PAGE);
@@ -679,6 +693,11 @@ private void assertFocused(final String selector) {
}
@SuppressWarnings("unchecked")
+ private static boolean nativeToolkit() {
+ return "native".equalsIgnoreCase(System.getProperty(
+ "causeway.viewer.webcomponents.htmx.editor-toolkit", "vaadin"));
+ }
+
private void assertNoBrowserFailures() {
if (page != null && !page.isClosed()) {
final var recorded = (List<Object>) page.evaluate("() => globalThis.__causewayPlaywrightFailures ?? []");
diff --git a/viewers/webcomponents/sample-htmx-petclinic/src/test/java/org/apache/causeway/viewer/webcomponents/sample/htmx/petclinic/PetClinicHtmxApplication_IntegTest.java b/viewers/webcomponents/sample-htmx-petclinic/src/test/java/org/apache/causeway/viewer/webcomponents/sample/htmx/petclinic/PetClinicHtmxApplication_IntegTest.java
index 4e983cc5e1d..b2ad357dd55 100644
--- a/viewers/webcomponents/sample-htmx-petclinic/src/test/java/org/apache/causeway/viewer/webcomponents/sample/htmx/petclinic/PetClinicHtmxApplication_IntegTest.java
+++ b/viewers/webcomponents/sample-htmx-petclinic/src/test/java/org/apache/causeway/viewer/webcomponents/sample/htmx/petclinic/PetClinicHtmxApplication_IntegTest.java
@@ -69,8 +69,20 @@ void loadsDeterministicPetclinicFixture() {
void servesStableShellCanonicalFragmentsAssetsAndWicketComparison() throws Exception {
final var shell = get("/htmx");
assertThat(shell.statusCode()).isEqualTo(200);
- assertThat(shell.headers().firstValue("content-security-policy").orElse(""))
- .contains("default-src 'self'");
+ final boolean nativeToolkit = nativeToolkit();
+ final String csp = shell.headers().firstValue("content-security-policy").orElse("");
+ assertThat(csp)
+ .contains("default-src 'self'")
+ .doesNotContain("'unsafe-inline'");
+ if (nativeToolkit) {
+ assertThat(csp)
+ .doesNotContain("sha256-")
+ .contains("style-src-attr 'none'");
+ } else {
+ assertThat(csp)
+ .contains("style-src-attr 'none'")
+ .contains("sha256-0wLqlhzs6Y30XLr3aVbYP1PYgStuEbKPfSQ0hPe+kY4=");
+ }
assertThat(shell.body())
.contains("<causeway-menubars>")
.contains("id=\"causeway-route\"")
@@ -78,6 +90,9 @@ void servesStableShellCanonicalFragmentsAssetsAndWicketComparison() throws Excep
.contains("data-navigation-generation=\"0\"")
.contains("/causeway-htmx/causeway-htmx.mjs")
.contains("/webjars/htmx.org/2.0.6/dist/htmx.min.js")
+ .contains("data-causeway-editor-toolkit=\"" + (nativeToolkit ? "native" : "vaadin") + "\"")
+ .contains("data-causeway-reference-widgets=\"" + (nativeToolkit ? "native" : "vaadin") + "\"")
+ .contains("data-causeway-field-families=\"" + (nativeToolkit ? "" : "basic,numeric,local-temporal") + "\"")
.contains("Compare Wicket viewer");
final var generic = get("/htmx/object/petclinic.PetOwner/s_owner-mary", "HX-Request", "true");
@@ -229,6 +244,11 @@ private void assertNoGraphQLErrors(final JsonNode response) {
.isTrue();
}
+ private static boolean nativeToolkit() {
+ return "native".equalsIgnoreCase(System.getProperty(
+ "causeway.viewer.webcomponents.htmx.editor-toolkit", "vaadin"));
+ }
+
private HttpResponse<String> get(final String path, final String... header) throws Exception {
final var builder = HttpRequest.newBuilder(uri(path)).GET();
if (header.length == 2) {