diff --git a/src/sidebarApps/files/style.scss b/src/sidebarApps/files/style.scss index 906d1d647..4b3a8b7fa 100644 --- a/src/sidebarApps/files/style.scss +++ b/src/sidebarApps/files/style.scss @@ -64,6 +64,13 @@ } } + > .list > .tile[data-type="root"] > .text { + min-width: 0; + width: auto !important; + overflow: hidden !important; + text-overflow: ellipsis !important; + } + /* Add indent guides for folders (excluding first level) */ .list.collapsible > ul > .collapsible > ul { position: relative; diff --git a/tests/unit/fileSidebarStyles.test.js b/tests/unit/fileSidebarStyles.test.js new file mode 100644 index 000000000..3f0f39046 --- /dev/null +++ b/tests/unit/fileSidebarStyles.test.js @@ -0,0 +1,58 @@ +import { fileURLToPath } from "node:url"; +import { Window } from "happy-dom"; +import * as sass from "sass"; +import { describe, expect, it } from "vitest"; + +const stylesheetPath = fileURLToPath( + new URL("../../src/sidebarApps/files/style.scss", import.meta.url), +); + +function renderFileTreeStyles() { + const window = new Window(); + const { document } = window; + const style = document.createElement("style"); + + style.textContent = sass.compile(stylesheetPath).css; + document.head.append(style); + document.body.innerHTML = ` +