From ea554c12cfd225e5e35164b7bb0fabf522d6edf1 Mon Sep 17 00:00:00 2001 From: Alain Bourgeois Date: Thu, 16 Apr 2026 18:22:06 +0200 Subject: [PATCH 1/2] test --- jest.config.mjs | 1 + test/helpers/globals.js | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 test/helpers/globals.js diff --git a/jest.config.mjs b/jest.config.mjs index a1881765..153f5db4 100644 --- a/jest.config.mjs +++ b/jest.config.mjs @@ -3,6 +3,7 @@ export default { coverageDirectory: 'coverage', preset: 'ts-jest/presets/js-with-babel', testEnvironment: 'jsdom', + setupFiles: ['./test/helpers/globals.js'], testEnvironmentOptions: { customExportConditions: ['node'] }, diff --git a/test/helpers/globals.js b/test/helpers/globals.js new file mode 100644 index 00000000..c0e78db1 --- /dev/null +++ b/test/helpers/globals.js @@ -0,0 +1,24 @@ +const { TextEncoder, TextDecoder } = require('util') + +// Some transitive deps (solid-logic) use TextEncoder at module-load time. +global.TextEncoder = TextEncoder +global.TextDecoder = TextDecoder +globalThis.TextEncoder = TextEncoder +globalThis.TextDecoder = TextDecoder + +const rdf = require('rdflib') +const solidLogic = require('solid-logic') + +// solid-ui's UMD bundle expects a browser-style global named $rdf. +global.$rdf = rdf +globalThis.$rdf = rdf +if (typeof window !== 'undefined') { + window.$rdf = rdf +} + +// solid-ui's UMD bundle also expects a browser-style global named SolidLogic. +global.SolidLogic = solidLogic +globalThis.SolidLogic = solidLogic +if (typeof window !== 'undefined') { + window.SolidLogic = solidLogic +} From ae9fc8a0924441e46a6858df1717e40871f3d4e2 Mon Sep 17 00:00:00 2001 From: Alain Bourgeois Date: Fri, 17 Apr 2026 20:27:31 +0200 Subject: [PATCH 2/2] remove horizontal navbar --- src/outline/manager.js | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/src/outline/manager.js b/src/outline/manager.js index 2fb0fcaa..641199da 100644 --- a/src/outline/manager.js +++ b/src/outline/manager.js @@ -336,20 +336,24 @@ export default function (context) { ) } - div.appendChild( - UI.tabs.tabWidget({ - dom, - subject: me, - items, - renderMain, - renderTab, - ordered: true, - orientation: 0, - backgroundColor: '#eeeeee', // black? - selectedTab: options.selectedTab, - onClose: options.onClose - }) - ) + const tabWidgetEl = UI.tabs.tabWidget({ + dom, + subject: me, + items, + renderMain, + renderTab, + ordered: true, + orientation: 0, + backgroundColor: '#eeeeee', // black? + selectedTab: options.selectedTab, + onClose: options.onClose + }) + // Hide the tab strip visually while keeping tabs clickable for programmatic navigation + const tabNav = tabWidgetEl.querySelector('nav') + if (tabNav) { + tabNav.style.cssText = 'position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;' + } + div.appendChild(tabWidgetEl) return div } this.getDashboard = globalAppTabs