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/09/06 14:56:26 UTC
(causeway) 15/19: docs(openspec): refine conditional unreferenced property tab
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 509fe15807e19fab3834bed1be6cb5f225a715cb
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Sun Sep 6 14:55:41 2026 +0100
docs(openspec): refine conditional unreferenced property tab
---
.../add-unreferenced-member-components/design.md | 5 +++++
.../add-unreferenced-member-components/proposal.md | 1 +
.../specs/domain-web-components/spec.md | 23 ++++++++++++++++++++++
.../generic-htmx-web-component-viewer/spec.md | 7 +++++++
.../specs/generic-vue-web-component-viewer/spec.md | 7 +++++++
.../add-unreferenced-member-components/tasks.md | 7 +++++++
6 files changed, 50 insertions(+)
diff --git a/openspec/changes/add-unreferenced-member-components/design.md b/openspec/changes/add-unreferenced-member-components/design.md
index 39b3b3f23f8..a3adc8a62b0 100644
--- a/openspec/changes/add-unreferenced-member-components/design.md
+++ b/openspec/changes/add-unreferenced-member-components/design.md
@@ -75,6 +75,10 @@ Producer supersession and disconnection will retire reservations and trigger det
`<cw-unreferenced-properties name="Other">` will generate one owned `<cw-fieldset>` containing an ordinary `<cw-property>` for each remaining property.
Its optional boolean `editable` attribute will be the only mechanism that opts generated properties into edit affordances; domain capability remains authoritative after that application opt-in.
+When `<cw-unreferenced-properties>` is a direct child of `<cw-tabgroup>`, the tabgroup will treat the ready non-empty host as a conditional tab panel whose control label is the catch-all's bounded `name` and whose order is its authored position among ordinary tabs.
+Loading, empty, and error catch-all states will contribute neither a tab control nor a panel, while state transitions will preserve an existing selection or deterministically select and focus the first available ordinary tab if the disappearing conditional tab owned selection or keyboard focus.
+Outside a direct tabgroup position, the property catch-all retains its standalone fieldset presentation.
+
`<cw-unreferenced-collections name="Other collections">` will generate one owned `<cw-tabgroup>` with one tab per remaining collection.
Each tab will contain the required row and twelve-span column around one ordinary `<cw-collection>`, and the collection's authoritative friendly name will label the tab and collection.
A single collection will remain a single tab rather than collapsing its tab group.
@@ -106,6 +110,7 @@ No response payload, authorization rule, or inferred member identity will be exp
### Keep host integration declarative
HTMX resources and Vue templates may place the three custom elements directly beneath valid layout columns.
+They may also place `<cw-unreferenced-properties>` directly among a tabgroup's ordinary tabs when conditional **Other** tab presentation is desired.
Both hosts will rely on foundation registration, context lookup, allocation, generated structure, state, styling, and interaction behavior.
Browser coverage will exercise actual context boundaries and equivalent generated semantics without adding host adapters or host-specific state.
diff --git a/openspec/changes/add-unreferenced-member-components/proposal.md b/openspec/changes/add-unreferenced-member-components/proposal.md
index 2fe98d122ff..98bd41aea77 100644
--- a/openspec/changes/add-unreferenced-member-components/proposal.md
+++ b/openspec/changes/add-unreferenced-member-components/proposal.md
@@ -11,6 +11,7 @@ Causeway `layout.xml` already solves this through deterministic unreferenced-mem
- Coordinate allocation once per object-context boundary so each remaining member is rendered exactly once in authoritative member order and asynchronous claim producers cannot cause stable duplication.
- Permit exactly one effective catch-all destination per member kind; the first valid destination in document order wins and later duplicates fail closed with bounded diagnostics.
- Render remaining properties as ordinary `<cw-property>` children of an **Other** fieldset, remaining collections as ordinary `<cw-collection>` children in one tab per collection, and remaining actions as ordinary `<cw-action>` controls in a wrapping horizontal group.
+- Permit `<cw-unreferenced-properties>` directly within `<cw-tabgroup>` so its non-empty **Other** fieldset becomes a conditional tab at the authored position while loading, empty, and error states contribute no tab.
- Add explicit property editing opt-in, accessible group names, inspectable loading/ready/empty/error state, parser-late synchronization, supersession, and disconnection cleanup.
- Extend strict column composition to admit the three new catch-all elements while continuing to reject arbitrary children.
- Verify equivalent direct use from HTMX and Vue without host-owned allocation, data fetching, ordering, or interaction state.
diff --git a/openspec/changes/add-unreferenced-member-components/specs/domain-web-components/spec.md b/openspec/changes/add-unreferenced-member-components/specs/domain-web-components/spec.md
index b8f8a45d20e..0d268dab1a5 100644
--- a/openspec/changes/add-unreferenced-member-components/specs/domain-web-components/spec.md
+++ b/openspec/changes/add-unreferenced-member-components/specs/domain-web-components/spec.md
@@ -130,6 +130,29 @@ It MUST preserve authoritative action order and ordinary interaction ownership.
- **WHEN** the application supplies a bounded `name`
- **THEN** the group uses that value as its accessible name without changing action labels or identities
+### Requirement: Conditional unreferenced property tab
+
+A `<cw-tabgroup>` SHALL accept `<cw-unreferenced-properties>` as a direct automatic tab destination in addition to ordinary `<cw-tab>` children.
+The tabgroup MUST expose a tab control and associated panel for that destination only while its allocation state is `ready`, MUST use the catch-all's bounded `name` as the control label, and MUST preserve its authored position among ordinary tabs.
+
+#### Scenario: Remaining properties make the conditional tab available
+
+- **WHEN** a direct `<cw-unreferenced-properties>` child resolves one or more remaining authorized properties
+- **THEN** its containing tabgroup exposes one keyboard-operable tab at that child's authored position
+- **AND** the tab panel contains the catch-all's owned Other fieldset and ordinary property children
+
+#### Scenario: Conditional tab has no presentable allocation
+
+- **WHEN** the direct catch-all is loading, empty, or in error
+- **THEN** it contributes no tab control or presentable panel
+- **AND** no empty Other tab or heading remains visible
+
+#### Scenario: Conditional tab availability changes
+
+- **WHEN** parser-late claims or lifecycle changes make the direct catch-all appear or disappear
+- **THEN** the tab list synchronizes without changing an unaffected selected tab
+- **AND** if the disappearing conditional tab owned selection or keyboard focus, the first available ordinary tab becomes selected and receives valid focus
+
### Requirement: Unreferenced composition lifecycle and states
Every unreferenced member component SHALL expose `data-causeway-unreferenced-state` as `loading`, `ready`, `empty`, or `error` and SHALL retire generation-scoped work on supersession or disconnection.
diff --git a/openspec/changes/add-unreferenced-member-components/specs/generic-htmx-web-component-viewer/spec.md b/openspec/changes/add-unreferenced-member-components/specs/generic-htmx-web-component-viewer/spec.md
index 2551474670e..0836c102f03 100644
--- a/openspec/changes/add-unreferenced-member-components/specs/generic-htmx-web-component-viewer/spec.md
+++ b/openspec/changes/add-unreferenced-member-components/specs/generic-htmx-web-component-viewer/spec.md
@@ -3,6 +3,7 @@
### Requirement: HTMX unreferenced member composition
Application-authored HTMX page resources SHALL be permitted to place `<cw-unreferenced-properties>`, `<cw-unreferenced-collections>`, and `<cw-unreferenced-actions>` beneath valid columns in an existing object-context boundary.
+They SHALL also be permitted to place `<cw-unreferenced-properties>` directly among a tabgroup's ordinary tabs for conditional non-empty Other-tab presentation.
The HTMX host MUST preserve these elements and MUST NOT calculate member inventories, inspect explicit claims, allocate destinations, generate member controls, or duplicate their interaction behavior.
#### Scenario: Exact page declares catch-all elements
@@ -11,6 +12,12 @@ The HTMX host MUST preserve these elements and MUST NOT calculate member invento
- **THEN** strict template validation preserves their names and bounded public attributes
- **AND** the existing context and interaction controller serve all generated ordinary member descendants
+#### Scenario: Exact page declares a conditional property tab
+
+- **WHEN** a valid exact HTMX page places `<cw-unreferenced-properties>` directly between ordinary tabs
+- **THEN** strict template validation preserves that authored order
+- **AND** foundation alone adds or removes the Other tab according to the catch-all allocation state
+
#### Scenario: Remaining members render in HTMX
- **WHEN** the current authorized object has unclaimed properties, collections, or actions
diff --git a/openspec/changes/add-unreferenced-member-components/specs/generic-vue-web-component-viewer/spec.md b/openspec/changes/add-unreferenced-member-components/specs/generic-vue-web-component-viewer/spec.md
index 4cbb186d784..94e518b4fe0 100644
--- a/openspec/changes/add-unreferenced-member-components/specs/generic-vue-web-component-viewer/spec.md
+++ b/openspec/changes/add-unreferenced-member-components/specs/generic-vue-web-component-viewer/spec.md
@@ -3,6 +3,7 @@
### Requirement: Vue unreferenced member composition parity
Application-authored Vue pages SHALL be able to use `<cw-unreferenced-properties>`, `<cw-unreferenced-collections>`, and `<cw-unreferenced-actions>` directly as native custom elements beneath a valid object-context boundary.
+They SHALL also be able to place `<cw-unreferenced-properties>` directly among a tabgroup's ordinary tabs for conditional non-empty Other-tab presentation.
Vue MUST NOT wrap the elements, mirror their allocation in reactive state, derive member identity, generate controls, or own their lifecycle.
#### Scenario: Vue template declares catch-all elements
@@ -11,6 +12,12 @@ Vue MUST NOT wrap the elements, mirror their allocation in reactive state, deriv
- **THEN** Vue treats them as native custom elements and preserves their bounded attributes
- **AND** the existing application-owned GraphQL client, context, and interaction controller serve generated ordinary member descendants
+#### Scenario: Vue template declares a conditional property tab
+
+- **WHEN** a Vue page places `<cw-unreferenced-properties>` directly between ordinary tabs
+- **THEN** Vue preserves that native custom element and authored order
+- **AND** foundation alone adds or removes the Other tab according to the catch-all allocation state
+
#### Scenario: Equivalent Vue and HTMX contexts resolve
- **WHEN** equivalent Vue and HTMX pages expose the same authorized inventory, explicit claims, pending producers, and catch-all destinations
diff --git a/openspec/changes/add-unreferenced-member-components/tasks.md b/openspec/changes/add-unreferenced-member-components/tasks.md
index 2e77b0d5c1e..ae87a38688c 100644
--- a/openspec/changes/add-unreferenced-member-components/tasks.md
+++ b/openspec/changes/add-unreferenced-member-components/tasks.md
@@ -38,3 +38,10 @@
- [x] 5.1 Run complete foundation JavaScript and host policy tests, HTMX and Vue default/secured/native/Vaadin browser suites, responsive and accessibility checks, and focused allocation lifecycle regressions.
- [x] 5.2 Run Maven packaging and RAT/license verification, Vue production build verification, IDE compilation and inspections, strict OpenSpec validation, and whitespace checks.
+
+## 6. Conditional Property Tab Refinement
+
+- [ ] 6.1 Permit `<cw-unreferenced-properties>` as a direct tabgroup child and synchronize a tab control and panel only while its allocation is ready and non-empty.
+- [ ] 6.2 Preserve authored tab order, unaffected selection, keyboard navigation, relationships, and deterministic focus fallback when the conditional tab appears or disappears.
+- [ ] 6.3 Move the HTMX and Vue PetOwner declarations between Identity and Metadata and verify the conditional Other tab without duplicate headings or members.
+- [ ] 6.4 Update foundation and host documentation, focused component tests, browser parity assertions, generated Vue assets, and complete validation.