fix(ui): collapse empty page header slots
Quality / quality (windows-latest) (push) Waiting to run
Quality / quality (ubuntu-latest) (push) Failing after 9m57s

This commit is contained in:
2026-08-25 15:56:57 +05:30
parent d0bccfe37e
commit 027873459d
5 changed files with 18 additions and 3 deletions
+1 -1
View File
@@ -688,7 +688,7 @@
},
"packages/ui": {
"name": "@wrnexus/ui",
"version": "0.8.45",
"version": "0.8.46",
"dependencies": {
"@wrnexus/core": "workspace:*",
},
+1 -1
View File
@@ -61,7 +61,7 @@
"packages/ui/components/Modal.wrn": "7fa4b877772736f29f690e24d8742922b310397ef3083f0b78acb67a9f0d14b2",
"packages/ui/components/Nav.wrn": "c45b0ecb42250f4b3ede33c8932a025f789dda9ef48dbf332459ae458163e69a",
"packages/ui/components/Navbar.wrn": "b68a824e479ce6957afc3e9710442281cdc1a8d02cd96501fe060271f54368e4",
"packages/ui/components/PageHeader.wrn": "321cde36ce8d521a57901033d46e8b437f42e558cca27f49ca26f7172aff1d54",
"packages/ui/components/PageHeader.wrn": "29a93cdca7285548b79ebe5b6421eef6dbb4d5ae8be2508fa2d681e1068ba07f",
"packages/ui/components/Pagination.wrn": "d54226705d4556f76ee5f0d6ae82d101ca6d006397756d547a9aa5954415ba39",
"packages/ui/components/PinInput.wrn": "4dc398456f6392d7925db941debb484c7cb0358ecef527f696fe5ec4800a7602",
"packages/ui/components/Popover.wrn": "1246b99b4236bc7109a5d1427d013bb07bbea7a2da4f821517d2545ee0b5c019",
+8
View File
@@ -576,6 +576,14 @@ current: true
display: none;
}
/* Compiled empty slots retain inert template markers, so :empty alone
cannot collapse their spacing in the rendered document. */
.wrn-page-header__meta:not(:has(> :not(template))),
.wrn-page-header__body:not(:has(> :not(template))),
.wrn-page-header__actions--slot-only:not(:has(> :not(template))) {
display: none;
}
.wrn-page-header__meta {
margin-top: 1.1rem;
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@wrnexus/ui",
"version": "0.8.45",
"version": "0.8.46",
"private": true,
"type": "module",
"main": "src/index.ts",
+7
View File
@@ -3349,6 +3349,13 @@ test("custom scrollbar styles the scrollbar and drops its fake output", async ()
expect(style).toContain("18rem");
});
test("page header collapses compiled empty slot markers", () => {
const source = readFileSync(uiComponentPath("PageHeader"), "utf8");
expect(source).toContain(".wrn-page-header__meta:not(:has(> :not(template)))");
expect(source).toContain(".wrn-page-header__body:not(:has(> :not(template)))");
expect(source).toContain(".wrn-page-header__actions--slot-only:not(:has(> :not(template)))");
});
test("layout components ship their own styles instead of Tailwind utilities", () => {
/*
* These were built from utility classes and class: conditionals. That works