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/28 04:30:16 UTC

(causeway) 14/16: docs(openspec): plan property tooltip and alignment refinement

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 9de3c34d5bcf52026a8e10229d3e4aa0c7dd0898
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Fri Aug 28 01:05:09 2026 +0200

    docs(openspec): plan property tooltip and alignment refinement
---
 .../.openspec.yaml                                 |  2 +
 .../design.md                                      | 56 ++++++++++++++++++++++
 .../proposal.md                                    | 28 +++++++++++
 .../specs/domain-web-components/spec.md            | 44 +++++++++++++++++
 .../tasks.md                                       | 15 ++++++
 5 files changed, 145 insertions(+)

diff --git a/openspec/changes/refine-property-description-and-value-alignment/.openspec.yaml b/openspec/changes/refine-property-description-and-value-alignment/.openspec.yaml
new file mode 100644
index 00000000000..f05b045c8af
--- /dev/null
+++ b/openspec/changes/refine-property-description-and-value-alignment/.openspec.yaml
@@ -0,0 +1,2 @@
+schema: spec-driven
+created: 2026-08-27
diff --git a/openspec/changes/refine-property-description-and-value-alignment/design.md b/openspec/changes/refine-property-description-and-value-alignment/design.md
new file mode 100644
index 00000000000..0af07ecd3c2
--- /dev/null
+++ b/openspec/changes/refine-property-description-and-value-alignment/design.md
@@ -0,0 +1,56 @@
+## Context
+
+A disabled property currently renders a dedicated circular information indicator as a third grid item and attaches the disabled-reason tooltip to that indicator.
+The property label already identifies the affected member and can own the same bounded tooltip without inserting another visual control between label and value.
+The read-only output does not explicitly express string alignment, so surrounding application or browser styles can place textual values at the logical end while editors remain start aligned.
+
+## Goals / Non-Goals
+
+**Goals:**
+
+- Remove the standalone disabled-reason information indicator.
+- Attach the bounded disabled-reason tooltip to the property label and make that label keyboard focusable only when it owns the tooltip.
+- Preserve accessible description references for both the label trigger and property output.
+- Preserve an independent non-redundant property-description title and description content.
+- Mark GraphQL `String` output explicitly and align it to the logical start in baseline and cohesive-theme styles.
+
+**Non-Goals:**
+
+- Change whether a property is disabled or reveal reasons that authorization omitted.
+- Remove ordinary property descriptions or change multiline description placement.
+- Impose a new alignment policy on numeric, temporal, boolean, enum, reference, or custom-rendered values.
+- Change property editing, value formatting, or GraphQL behavior.
+
+## Decisions
+
+Derive one label class and attribute set from property presentation state.
+When a bounded disabled reason exists, add a tooltip-owner class, `tabindex="0"`, `data-tooltip`, and `aria-describedby` to the existing label.
+Retain the visually hidden disabled-reason span as the accessible description source, but remove the visible standalone information indicator.
+Keep the ordinary property description in its existing markup and retain its `title` on the label so disabled reason and descriptive metadata remain distinct.
+
+Reuse the current CSS-only tooltip behavior on the label-owned tooltip class.
+The label becomes `position: relative` and reveals the tooltip on hover or `:focus-visible`, preserving pointer and keyboard access without a key modifier.
+
+Use the introspected GraphQL named type to add `causeway-property-value-string` to the output only for `String` properties.
+Apply `text-align: start` to that class in baseline and cohesive-theme styles.
+A dedicated class avoids broadening the rule to numeric and other scalar presentations and gives application themes a stable semantic hook.
+
+Keeping the circular indicator and merely moving it closer to the label was rejected because it would retain the redundant control and grid disruption.
+Using only the native `title` attribute for disabled reasons was rejected because it is not reliably keyboard-discoverable and cannot retain the current bounded styled tooltip.
+Applying start alignment to every property value was rejected because numeric and application-specific renderers may intentionally use another alignment.
+
+## Risks / Trade-offs
+
+- [Risk] Making a label focusable adds a tab stop. → Add it only when a disabled reason is available and the label owns useful tooltip content.
+- [Risk] A label can have both a description title and disabled tooltip. → Keep the disabled reason in the styled `data-tooltip` and the ordinary description in its existing title and accessible description IDs.
+- [Risk] GraphQL custom string-like scalars remain unaffected. → Scope the first change to the standard `String` type requested and leave custom scalar alignment application-controlled.
+- [Risk] Removing the indicator could reduce visual discoverability. → Use a help cursor and retain hover and focus tooltip behavior on the semantically named label.
+
+## Migration Plan
+
+No application migration is required.
+Rollback restores the dedicated indicator markup and removes the semantic string-value class and alignment rule.
+
+## Open Questions
+
+None.
diff --git a/openspec/changes/refine-property-description-and-value-alignment/proposal.md b/openspec/changes/refine-property-description-and-value-alignment/proposal.md
new file mode 100644
index 00000000000..2c09a431a2f
--- /dev/null
+++ b/openspec/changes/refine-property-description-and-value-alignment/proposal.md
@@ -0,0 +1,28 @@
+## Why
+
+Disabled properties currently place a separate circular information control between the label and value, which disrupts row alignment and makes the reason feel detached from the property it describes.
+Read-only string values can also inherit end alignment even though their corresponding editors are left aligned, producing an inconsistent transition between view and edit modes.
+
+## What Changes
+
+- Remove the standalone disabled-reason information indicator from the property grid.
+- Make the property label itself the hover and keyboard-focus tooltip target for a bounded disabled reason while retaining accessible description semantics.
+- Preserve an independent non-redundant property-description tooltip when one exists.
+- Mark GraphQL `String` property values with a semantic presentation class and explicitly align them to the logical start in baseline and cohesive-theme styles.
+- Preserve non-string value alignment policy and property edit, disabled, responsive, and multiline behavior.
+- Add regression coverage for label-owned disabled tooltips, keyboard accessibility, absence of the standalone indicator, and string alignment.
+
+## Capabilities
+
+### New Capabilities
+
+None.
+
+### Modified Capabilities
+
+- `domain-web-components`: Move disabled-reason presentation onto the property label tooltip and require logical-start alignment for string property values.
+
+## Impact
+
+The change affects the foundation property custom element, shared component styles, the cohesive theme, and browser-side tests.
+It adds no dependency and changes no GraphQL operation, disabled-state decision, property value, edit command, or application configuration.
diff --git a/openspec/changes/refine-property-description-and-value-alignment/specs/domain-web-components/spec.md b/openspec/changes/refine-property-description-and-value-alignment/specs/domain-web-components/spec.md
new file mode 100644
index 00000000000..7f0fd41f2ea
--- /dev/null
+++ b/openspec/changes/refine-property-description-and-value-alignment/specs/domain-web-components/spec.md
@@ -0,0 +1,44 @@
+## MODIFIED Requirements
+
+### Requirement: Read-only property semantics
+The `<causeway-property>` component SHALL render property visibility, usability, description, null state, value, loading state, member-scoped errors, and semantic multiline presentation from its context state and public attributes.
+A standard GraphQL `String` property value MUST be explicitly aligned to the logical start so its view and edit presentations remain consistent.
+
+#### Scenario: Visible property value
+- **WHEN** a visible property read completes successfully
+- **THEN** the component renders its semantic label and value using the selected value renderer
+
+#### Scenario: String property value
+- **WHEN** a visible property has the standard GraphQL `String` output type
+- **THEN** the component marks its output with the semantic string-value presentation class
+- **AND** baseline and cohesive-theme presentation align the value to the logical start
+
+#### Scenario: Property description is available
+- **WHEN** a property descriptor supplies a non-redundant description
+- **THEN** the component exposes that description as the property's default explanatory tooltip and accessible description
+
+#### Scenario: Described multiline property renders at wide width
+- **WHEN** a read-only multiline property has a visible value, description, and built-in edit affordance at a wide layout width
+- **THEN** the value remains in the normal value column beside the label
+- **AND** the description appears beneath the label in the label column
+- **AND** the edit affordance remains a compact content-sized control rather than stretching across the value column
+
+#### Scenario: Described multiline property renders at narrow width
+- **WHEN** the available inline size requires a multiline property to collapse
+- **THEN** its label, description, value, and edit affordance remain readable in logical order
+- **AND** the presentation introduces no horizontal page overflow, clipping, or overlap
+
+#### Scenario: Hidden property
+- **WHEN** the rich object state reports that a property is hidden
+- **THEN** the component omits the property's label, value, and interactive content
+
+#### Scenario: Disabled property
+- **WHEN** the rich object state reports that a property is disabled with a bounded reason
+- **THEN** the component exposes its disabled state without presenting an edit affordance
+- **AND** attaches the disabled-reason tooltip to the property label rather than rendering a separate information indicator
+- **AND** makes the label tooltip available by pointer hover and ordinary keyboard focus
+- **AND** retains the disabled reason as an accessible description without replacing a distinct property-description tooltip
+
+#### Scenario: Null property
+- **WHEN** the property value is null
+- **THEN** the component renders the library's explicit null presentation rather than an unsupported-value error
diff --git a/openspec/changes/refine-property-description-and-value-alignment/tasks.md b/openspec/changes/refine-property-description-and-value-alignment/tasks.md
new file mode 100644
index 00000000000..b0901fdd141
--- /dev/null
+++ b/openspec/changes/refine-property-description-and-value-alignment/tasks.md
@@ -0,0 +1,15 @@
+## 1. Label-Owned Disabled Tooltip
+
+- [ ] 1.1 Remove the standalone disabled-reason information indicator while retaining the bounded visually hidden reason.
+- [ ] 1.2 Attach pointer and keyboard tooltip attributes plus accessible description linkage to the property label only when a disabled reason exists.
+- [ ] 1.3 Replace indicator-specific baseline tooltip styles with label-owned tooltip styles without changing ordinary property-description presentation.
+
+## 2. String Value Alignment
+
+- [ ] 2.1 Detect the standard GraphQL `String` output type and add a semantic string-value class to its read-only output.
+- [ ] 2.2 Add baseline and cohesive-theme logical-start alignment for string property values without changing other value types.
+
+## 3. Verification
+
+- [ ] 3.1 Add interaction and style tests for label-owned disabled tooltips, keyboard access, standalone-indicator removal, semantic string marking, and logical-start alignment.
+- [ ] 3.2 Run focused and complete foundation tests, Petclinic browser acceptance, syntax and formatting checks, and strict OpenSpec validation.