From 95ed6be5c6539d3b5c44fd8505f82cf0e45a7ebc Mon Sep 17 00:00:00 2001 From: Adam Mathes Date: Tue, 17 Feb 2026 15:06:42 -0800 Subject: Refine Settings UI: Fix dark mode text colors, split font controls for headers and body, update monospace stack, and soft-deprecate tags --- frontend-vanilla/src/main.test.ts | 8 +++-- frontend-vanilla/src/main.ts | 26 ++++++++++++++-- frontend-vanilla/src/regression.test.ts | 4 ++- frontend-vanilla/src/store.ts | 7 +++++ frontend-vanilla/src/style.css | 54 ++++++++++++++++++++++++++++++--- 5 files changed, 89 insertions(+), 10 deletions(-) (limited to 'frontend-vanilla') diff --git a/frontend-vanilla/src/main.test.ts b/frontend-vanilla/src/main.test.ts index 7dddc3f..7cad61a 100644 --- a/frontend-vanilla/src/main.test.ts +++ b/frontend-vanilla/src/main.test.ts @@ -4,12 +4,10 @@ import { router } from './router'; import { renderLayout, renderFeeds, - renderTags, renderFilters, renderItems, renderSettings, fetchFeeds, - fetchTags, fetchItems, init, logout @@ -76,6 +74,7 @@ describe('main application logic', () => { expect(feedList?.innerHTML).toContain('Test Feed'); }); + /* FIXME: Tags feature soft-deprecated it('renderTags should populate tag list', () => { renderLayout(); store.setTags([{ title: 'Test Tag' } as any]); @@ -83,6 +82,7 @@ describe('main application logic', () => { const tagList = document.getElementById('tag-list'); expect(tagList?.innerHTML).toContain('Test Tag'); }); + */ it('renderFilters should update active filter', () => { renderLayout(); @@ -118,6 +118,7 @@ describe('main application logic', () => { expect(store.feeds[0].title).toBe('API Feed'); }); + /* FIXME: Tags feature soft-deprecated it('fetchTags should update store', async () => { vi.mocked(apiFetch).mockResolvedValueOnce({ ok: true, @@ -128,6 +129,7 @@ describe('main application logic', () => { expect(store.tags).toHaveLength(1); expect(store.tags[0].title).toBe('API Tag'); }); + */ it('fetchItems should update store items', async () => { vi.mocked(apiFetch).mockResolvedValueOnce({ @@ -348,6 +350,7 @@ describe('main application logic', () => { getCurrentRouteSpy.mockRestore(); }); + /* FIXME: Tags feature soft-deprecated it('should navigate to tag when clicking tag from settings page', () => { renderLayout(); store.setTags([{ title: 'Tech' } as any]); @@ -363,6 +366,7 @@ describe('main application logic', () => { expect(navigateSpy).toHaveBeenCalledWith('/tag/Tech', expect.any(Object)); getCurrentRouteSpy.mockRestore(); }); + */ it('deleteFeed should call API', async () => { vi.mocked(apiFetch).mockResolvedValueOnce({ ok: true } as Response); diff --git a/frontend-vanilla/src/main.ts b/frontend-vanilla/src/main.ts index 4e1d216..62a47cc 100644 --- a/frontend-vanilla/src/main.ts +++ b/frontend-vanilla/src/main.ts @@ -23,7 +23,8 @@ let appEl: HTMLDivElement | null = null; export function renderLayout() { appEl = document.querySelector('#app'); if (!appEl) return; - appEl.className = `theme-${store.theme} font-${store.fontTheme}`; + // Apply both font themes (font-* for body, heading-font-* for headers) + appEl.className = `theme-${store.theme} font-${store.fontTheme} heading-font-${store.headingFontTheme}`; appEl.innerHTML = `
@@ -394,6 +395,15 @@ export function renderSettings() {
+ + + +