feat: add shared workspace layouts

This commit is contained in:
2026-08-18 02:17:13 +02:00
parent 934db6d44b
commit dd7ad4d9c7
11 changed files with 207 additions and 11 deletions
+30
View File
@@ -46,3 +46,33 @@ assert(!embeddedMarkup.includes("page-scroll-viewport"), "embedded pages defer s
assert(!embeddedMarkup.includes("content-pad"), "embedded pages do not add a second content inset");
assert(embeddedMarkup.includes("page-layout-embedded"), "embedded mode remains explicit");
assert(embeddedMarkup.includes('data-help-documentation-type="admin"'), "embedded administration keeps its documentation type");
const workspaceMarkup = renderToStaticMarkup(
<PlatformLanguageProvider>
<PageLayout
title="Workspace page"
description={<p className="version-line">Version 3</p>}
mode="workspace"
notices={<div role="status">Additional notice</div>}
>
Workspace content
</PageLayout>
</PlatformLanguageProvider>
);
assert(!workspaceMarkup.includes("page-scroll-viewport"), "workspace pages defer scrolling to the workspace content pane");
assert(workspaceMarkup.includes("page-layout-workspace content-pad workspace-data-page"), "workspace pages keep the standard content inset");
assert(workspaceMarkup.includes('class="version-line"'), "rich page descriptions keep their own semantic element");
assert(!workspaceMarkup.includes("<p><p"), "rich page descriptions are not nested in an invalid paragraph");
assert(workspaceMarkup.includes("page-layout-notices"), "additional page notices use the central notice region");
const headerLoadingMarkup = renderToStaticMarkup(
<PlatformLanguageProvider>
<PageLayout title="Refreshing" mode="workspace" headerLoading>
Stable content
</PageLayout>
</PlatformLanguageProvider>
);
assert(headerLoadingMarkup.includes("loading-indicator"), "page headings can expose partial refresh progress");
assert(!headerLoadingMarkup.includes('aria-busy="true"'), "partial refresh does not block the stable page body");