From c46c7a458811d4fd1713cf100194dae1e409d58f Mon Sep 17 00:00:00 2001 From: poli0981 <127664709+poli0981@users.noreply.github.com> Date: Sat, 3 Oct 2026 09:03:00 +0700 Subject: [PATCH] feat(settings): option to hide scrollbars MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Settings › Appearance › Hide scrollbars removes every scrollbar in the app; the mouse wheel, touchpad, touch and keyboard still scroll. - hideScrollbars setting (default off), coerced to a boolean by healSettings; portable like the theme, no store version bump (the heal back-fills it, and older builds can still read newer backups) - applied as : theme-init.js before first paint, main.tsx at boot, an App store subscription afterwards (the toggle, a restored backup and its undo) - unlayered CSS beats .scrollbar-thin: scrollbar-width: none on every element for Chromium and Firefox, ::-webkit-scrollbar for the WebKit webviews on macOS and Linux - labels in 8 locales Co-Authored-By: Claude Opus 5.5 --- public/theme-init.js | 12 +++++-- src/App.tsx | 11 +++++++ src/i18n/locales/_schema.json | 2 +- src/i18n/locales/en/ui.json | 4 ++- src/i18n/locales/es/ui.json | 4 ++- src/i18n/locales/id/ui.json | 4 ++- src/i18n/locales/ja/ui.json | 4 ++- src/i18n/locales/ko/ui.json | 4 ++- src/i18n/locales/pt-BR/ui.json | 4 ++- src/i18n/locales/vi/ui.json | 4 ++- src/i18n/locales/zh/ui.json | 4 ++- src/main.tsx | 11 ++++--- src/pages/SettingsPage.tsx | 6 ++++ src/store/settings-heal.ts | 14 ++++++++ src/store/settings-store.ts | 5 +++ src/styles/globals.css | 16 +++++++++ src/utils/scrollbars.ts | 9 ++++++ tests/store/settings-heal.test.ts | 17 ++++++++++ tests/utils/scrollbars.test.ts | 54 +++++++++++++++++++++++++++++++ 19 files changed, 173 insertions(+), 16 deletions(-) create mode 100644 src/utils/scrollbars.ts create mode 100644 tests/utils/scrollbars.test.ts diff --git a/public/theme-init.js b/public/theme-init.js index 75f3ca4..5fd1b6c 100644 --- a/public/theme-init.js +++ b/public/theme-init.js @@ -1,14 +1,18 @@ -// Applies the saved theme and UI language before the first paint, so a -// light-theme user never sees the dark default flash. A separate file rather -// than an inline