fix(ui): unify heading help, table sizing and navigation contracts

Verified with the coordinated workspace changes by devkit full run
2026-09-08T225814-186389-0000-3e3ed7cd (all seven phases passed).
This shared UI pass does not mark the individual module reviews complete.
This commit is contained in:
2026-09-09 02:03:16 +02:00
parent 6591aaa3fd
commit 6d37aa527f
54 changed files with 1728 additions and 117 deletions
+31
View File
@@ -91,3 +91,34 @@ const delegatedHeaderMarkup = renderToStaticMarkup(
assert(!delegatedHeaderMarkup.includes("page-layout-header"), "composite workspaces can delegate their visible heading to contributed content");
assert(delegatedHeaderMarkup.includes("page-layout-workspace content-pad workspace-data-page"), "headerless composite pages retain the central content frame");
for (const state of ["clean", "dirty", "invalid", "save-failed", "conflict", "saving"] as const) {
for (const behavior of ["reset", "exit"] as const) {
const markup = renderToStaticMarkup(
<PlatformLanguageProvider>
<PageActionBar variant="editor" state={state}
discardAction={{ label: "Cancel", behavior, "aria-label": "test-cancel" }}
saveAction={{ label: "Save", "aria-label": "test-save" }} />
</PlatformLanguageProvider>
);
const cancelButton = markup.match(/<button\b[^>]*aria-label="test-cancel"[^>]*>/)?.[0];
const saveButton = markup.match(/<button\b[^>]*aria-label="test-save"[^>]*>/)?.[0];
assert(cancelButton && saveButton, "editor actions remain visible in every draft state");
const disabled = (button: string | undefined) => /\bdisabled=""/.test(button ?? "");
assert(disabled(cancelButton) === (state === "saving" || (state === "clean" && behavior === "reset")),
`${behavior} action has the correct disabled state when ${state}`);
assert(disabled(saveButton) === ["clean", "invalid", "saving"].includes(state),
`cancel availability must not enable invalid/no-op/concurrent saving when ${state}`);
assert(!markup.includes('behavior="'), "the action contract must not leak non-HTML attributes");
}
}
const permissionBlockedExit = renderToStaticMarkup(
<PlatformLanguageProvider>
<PageActionBar variant="editor" state="clean"
discardAction={{ label: "Cancel", behavior: "exit", disabled: true, disabledReason: "Explicitly blocked", "aria-label": "test-blocked-cancel" }}
saveAction={{ label: "Save" }} />
</PlatformLanguageProvider>
);
assert(/\bdisabled=""/.test(permissionBlockedExit.match(/<button\b[^>]*aria-label="test-blocked-cancel"[^>]*>/)?.[0] ?? ""),
"exit semantics preserve an explicit owning-page blocker");