Skip to content

Show loading, failure, and unauthorized states in query tables - #338

Merged
woksin merged 17 commits into
mainfrom
feature/query-states-and-a11y
Sep 26, 2026
Merged

woksin merged 17 commits into
mainfrom
feature/query-states-and-a11y

Conversation

@woksin

@woksin woksin commented Sep 26, 2026

Copy link
Copy Markdown
Contributor

Query-backed tables and DataPage now tell your users when data is loading, when a query failed, and when they are not allowed to see it. Until now, all three looked like an empty result.

Added

Changed

Distinguish loading, failed, unauthorized, and successful empty results with accessible state rows, configurable messages, and stable styling parts. Keep existing rows busy during refetches; cover both Arc query wrappers and DataPage.
The label used the cratis:sr-only utility, which ships in styles/base rather than the PivotViewer area stylesheet. styles/base is documented as required, but if it were missing the label would render as visible text. A rule in Spinner.css keeps it hidden with the area sheet alone, as DataTables and the form fields already do.
@woksin woksin added the minor label Sep 26, 2026
woksin and others added 6 commits September 26, 2026 09:32
Group identical declarations within their owning stylesheets, keeping each per-area export self-contained. Consolidate the now-redundant Toolbar comments around the shared rules. The packed aggregate is 32429 gzip bytes (339 below its unchanged 32768-byte ceiling); no per-area ceiling needs adjustment.
Every enum member reachable from a JS export subpath must carry a TSDoc
comment, so DataTableStatus.Ready/Loading/Failed/Unauthorized now each
describe the state they select.
The aggregate stylesheet landed 23 gzip bytes over its 32 KiB ceiling.
The legacy sr-only declarations (padding, margin, border, clip, nowrap)
are belt-and-braces the clipped 1px box does not need, and the rule sits
too far from the other sr-only copies for gzip to back-reference it, so
it pays full price for every declaration. clip-path: inset(50%) on the
absolute 1px box hides the label on its own while keeping the text in
the accessibility tree.
Grouping .cratis-field-input:disabled with a :has() selector made browsers without :has() support (Firefox before 121, including ESR 115; Safari before 15.4; Chrome before 105) drop the whole rule, so disabled text, number, and select fields looked enabled there. The two rules are separate again. Aggregate CSS: raw 206066, gzip 32428, 1156 blocks.
Cratis Stagehand pushed its own fixes for the same two #338 CI failures. Keep the reviewed DataTableStatus comments and the full visually hidden rule for the PivotViewer loading label: the CSS deduplication already leaves 339 gzip bytes of headroom, so the label rule does not need to lose white-space: nowrap or the clip fallback.
@woksin
woksin merged commit 12128ac into main Sep 26, 2026
50 checks passed
@cratis-direct
cratis-direct Bot deleted the feature/query-states-and-a11y branch September 26, 2026 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant