feat: remove dark mode support

Remove ThemeToggle component, theme store, dark: Tailwind variants,
and dark color values from NOTE_COLORS. Simplify color logic to use
a single bg property. Delete dark mode e2e tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Frederic Cabassut
2026-03-05 23:07:18 +01:00
co-authored by Claude Opus 4.6
parent 510d15e548
commit 33a8cd6afc
22 changed files with 95 additions and 200 deletions
-32
View File
@@ -1,32 +0,0 @@
import { test, expect } from './helpers/fixtures.js';
test.describe('Dark Mode', () => {
test('Scenario: Dark mode can be toggled on and off', async ({ authenticatedPage: page }) => {
// When the user enables dark mode
await page.getByTestId('theme-toggle').click();
// Then the application is displayed in dark mode
const isDark = await page.evaluate(() =>
document.documentElement.classList.contains('dark')
);
expect(isDark).toBe(true);
// When the user disables dark mode
await page.getByTestId('theme-toggle').click();
// Then the application is displayed in light mode
const isLight = await page.evaluate(() =>
!document.documentElement.classList.contains('dark')
);
expect(isLight).toBe(true);
});
test('Scenario: Theme preference is remembered across page loads', async ({ authenticatedPage: page }) => {
// When the user enables dark mode
await page.getByTestId('theme-toggle').click();
// Then the preference is persisted
const theme = await page.evaluate(() => localStorage.getItem('theme'));
expect(theme).toBeTruthy();
});
});