mirror of
https://github.com/penpot/penpot.git
synced 2025-01-22 22:49:01 -05:00
Merge pull request #5057 from penpot/eva-fix-css-compilation
🔧 Rearrange css files for compilation
This commit is contained in:
commit
eb720b053a
4 changed files with 14 additions and 7 deletions
|
@ -117,7 +117,7 @@ test("User goes to the Viewer Inspect code, code tab", async ({ page }) => {
|
||||||
});
|
});
|
||||||
|
|
||||||
await viewerPage.showCode();
|
await viewerPage.showCode();
|
||||||
await viewerPage.page.getByTestId("code").click();
|
await viewerPage.page.getByRole("tab", { name: "code" }).click();
|
||||||
|
|
||||||
await expect(
|
await expect(
|
||||||
viewerPage.page.getByRole("button", { name: "Copy all code" }),
|
viewerPage.page.getByRole("button", { name: "Copy all code" }),
|
||||||
|
|
|
@ -115,20 +115,30 @@ export async function compileSassAll(worker) {
|
||||||
return path.startsWith("app/main/ui/ds/");
|
return path.startsWith("app/main/ui/ds/");
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const isOldComponentSystemFile = (path) => {
|
||||||
|
return path.startsWith("app/main/ui/components/");
|
||||||
|
};
|
||||||
|
|
||||||
let files = (await fs.readdir(sourceDir, { recursive: true })).filter(
|
let files = (await fs.readdir(sourceDir, { recursive: true })).filter(
|
||||||
isSassFile,
|
isSassFile,
|
||||||
);
|
);
|
||||||
|
|
||||||
const appFiles = files
|
const appFiles = files
|
||||||
.filter((path) => !isDesignSystemFile(path))
|
.filter((path) => !isDesignSystemFile(path))
|
||||||
|
.filter((path) => !isOldComponentSystemFile(path))
|
||||||
.map((path) => ph.join(sourceDir, path));
|
.map((path) => ph.join(sourceDir, path));
|
||||||
|
|
||||||
const dsFiles = files
|
const dsFiles = files
|
||||||
.filter(isDesignSystemFile)
|
.filter(isDesignSystemFile)
|
||||||
.map((path) => ph.join(sourceDir, path));
|
.map((path) => ph.join(sourceDir, path));
|
||||||
|
|
||||||
|
const oldComponentsFiles = files
|
||||||
|
.filter(isOldComponentSystemFile)
|
||||||
|
.map((path) => ph.join(sourceDir, path));
|
||||||
|
|
||||||
const procs = [compileSass(worker, "resources/styles/main-default.scss", {})];
|
const procs = [compileSass(worker, "resources/styles/main-default.scss", {})];
|
||||||
|
|
||||||
for (let path of [...dsFiles, ...appFiles]) {
|
for (let path of [...oldComponentsFiles, ...dsFiles, ...appFiles]) {
|
||||||
const proc = limitFn(() => compileSass(worker, path, { modules: true }));
|
const proc = limitFn(() => compileSass(worker, path, { modules: true }));
|
||||||
procs.push(proc);
|
procs.push(proc);
|
||||||
}
|
}
|
||||||
|
|
|
@ -519,10 +519,8 @@
|
||||||
@include bodySmallTypography;
|
@include bodySmallTypography;
|
||||||
color: var(--modal-title-foreground-color);
|
color: var(--modal-title-foreground-color);
|
||||||
}
|
}
|
||||||
// TODO: This fix is temporary, the error is caused by the
|
|
||||||
// cascading order of the compiled css files.
|
.custom-input-checkbox {
|
||||||
// https://tree.taiga.io/project/penpot/task/8658
|
|
||||||
.custom-input-checkbox.custom-input-checkbox {
|
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -372,7 +372,6 @@
|
||||||
[:& fm/image-radio-buttons {:options start-options
|
[:& fm/image-radio-buttons {:options start-options
|
||||||
:img-width "159px"
|
:img-width "159px"
|
||||||
:img-height "120px"
|
:img-height "120px"
|
||||||
:class (stl/css :image-radio)
|
|
||||||
:name :start-with
|
:name :start-with
|
||||||
:on-change on-start-change}]
|
:on-change on-start-change}]
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue