fix(foundry): stabilize workspace window glass compositing
This commit is contained in:
@@ -59,3 +59,21 @@ test("dropdown scroll keeps portal geometry stable and contained", async () => {
|
||||
assert.match(dropdownRule, /overflow:\s*auto;/);
|
||||
assert.match(dropdownRule, /overscroll-behavior:\s*contain;/);
|
||||
});
|
||||
|
||||
test("workspace windows keep their glass rim without masked compositor overlays", async () => {
|
||||
const [workspace, styles] = await Promise.all([
|
||||
readFile(new URL("../packages/ui-react/src/WorkspaceWindow.tsx", import.meta.url), "utf8"),
|
||||
readFile(new URL("../packages/ui-core/styles.css", import.meta.url), "utf8"),
|
||||
]);
|
||||
const rootClass = workspace.match(/className=\{cn\("(?<classes>[^"]+)"/)?.groups?.classes ?? "";
|
||||
const windowRule = styles.match(/\.nodedc-workspace-window \{(?<body>[\s\S]*?)\n\}/)?.groups?.body ?? "";
|
||||
const materialOverride = styles.match(/\.nodedc-workspace-window\.nodedc-glass-material::before \{(?<body>[\s\S]*?)\n\}/)?.groups?.body ?? "";
|
||||
|
||||
assert.match(rootClass, /\bnodedc-glass-material\b/);
|
||||
assert.doesNotMatch(rootClass, /\bnodedc-material-rim\b/);
|
||||
assert.match(windowRule, /box-sizing:\s*border-box;/);
|
||||
assert.match(windowRule, /border:\s*1px solid;/);
|
||||
assert.match(windowRule, /border-color:[\s\S]*--nodedc-modal-glass-outline-opacity/);
|
||||
assert.match(materialOverride, /content:\s*none;/);
|
||||
assert.doesNotMatch(materialOverride, /mask/);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user