CALENDAR: duplicate view switchers — title dropdown and segmented control both offer Agenda/Day/Week/Month/Year #352

Closed
opened 2026-09-28 15:14:29 +00:00 by kayg · 7 comments
Owner

Owner (2026-09-28, screenshots): with the sidebar collapsed on desktop, the Calendar header shows the segmented control (Agenda · Day · Week · Month · Year) and the title 'September 2026 ⌄' opens a menu with the same five views (plus shortcuts 1–5 and 'Go to today T'). With the sidebar open, the segmented control collapses into an 'Agenda ⌄' dropdown. 'The duplicated options here really don't make sense.'
Rule (chrome rules §34, one control per job): exactly one view switcher is visible at any width. Wide: the segmented control; narrow (or when the sidebar takes the room): a single 'Agenda ⌄' view menu. The title dropdown is only for date navigation (month/year jump, Go to today), never views. Keep the 1–5 shortcuts and show them in the view control's tooltips. Check every width (390/820/1440, sidebar open and collapsed) that only one switcher exists. Add an e2e asserting it.

Owner (2026-09-28, screenshots): with the sidebar collapsed on desktop, the Calendar header shows the segmented control (Agenda · Day · Week · Month · Year) **and** the title 'September 2026 ⌄' opens a menu with the same five views (plus shortcuts 1–5 and 'Go to today T'). With the sidebar open, the segmented control collapses into an 'Agenda ⌄' dropdown. 'The duplicated options here really don't make sense.' Rule (chrome rules §34, one control per job): **exactly one view switcher is visible at any width.** Wide: the segmented control; narrow (or when the sidebar takes the room): a single 'Agenda ⌄' view menu. The title dropdown is only for date navigation (month/year jump, Go to today), never views. Keep the 1–5 shortcuts and show them in the view control's tooltips. Check every width (390/820/1440, sidebar open and collapsed) that only one switcher exists. Add an e2e asserting it.
Author
Owner

Starting #352 on branch job/cal-switcher, based on dev at eb4ff20a9862a627f6d0aea1ca617ca9a9491bce. I am tracing the Calendar header and title menu, then I will add a regression e2e for one visible view switcher across the requested viewport/sidebar states.

Starting #352 on branch `job/cal-switcher`, based on dev at `eb4ff20a9862a627f6d0aea1ca617ca9a9491bce`. I am tracing the Calendar header and title menu, then I will add a regression e2e for one visible view switcher across the requested viewport/sidebar states.
Author
Owner

Owner decision (2026-09-28), replaces the rule above: 'keep it simple and consistent':

  • The H1 is never a dropdown, in any view (no ⌄, no menu on the title; it is just the title).
  • Wide window + sidebar open → the views live in the sidebar (Agenda, Day, Week, Month, Year as sidebar rows via the shared sidebar row + section header, with the 1–5 shortcuts in their tooltips).
  • Wide window + sidebar closed → the views show as pills in the header (the segmented control).
  • Narrow window (sidebar open or closed) → the views live in the sidebar.
    So there is never a view dropdown anywhere, and never two switchers at once. 'Go to today' stays as the Today pill/T shortcut; date jumping stays in the mini calendar. Update DESIGN §34 (chrome rules: sub-views live in the sidebar) accordingly. The e2e asserts exactly one switcher and no title dropdown for every width × sidebar state.
**Owner decision (2026-09-28), replaces the rule above:** 'keep it simple and consistent': - **The H1 is never a dropdown, in any view** (no ⌄, no menu on the title; it is just the title). - **Wide window + sidebar open → the views live in the sidebar** (Agenda, Day, Week, Month, Year as sidebar rows via the shared sidebar row + section header, with the 1–5 shortcuts in their tooltips). - **Wide window + sidebar closed → the views show as pills** in the header (the segmented control). - **Narrow window (sidebar open or closed) → the views live in the sidebar.** So there is never a view dropdown anywhere, and never two switchers at once. 'Go to today' stays as the Today pill/T shortcut; date jumping stays in the mini calendar. Update DESIGN §34 (chrome rules: sub-views live in the sidebar) accordingly. The e2e asserts exactly one switcher and no title dropdown for every width × sidebar state.
Author
Owner

Finding: Calendar currently puts its five view choices and “Go to today” in the title menu. CalendarTools adds another compact view menu when the sidebar is open. The Calendar sidebar has no view rows today. The fix will use the shared SidebarLinks rows and SidebarSectionHeader for sidebar views, keep pills in a wide collapsed header, and leave the title plain.

Finding: Calendar currently puts its five view choices and “Go to today” in the title menu. CalendarTools adds another compact view menu when the sidebar is open. The Calendar sidebar has no view rows today. The fix will use the shared SidebarLinks rows and SidebarSectionHeader for sidebar views, keep pills in a wide collapsed header, and leave the title plain.
Author
Owner

Resuming #352 on branch job/cal-switcher. Current HEAD: f46c010c28. Current merge-base with dev: cf919dd3bf. The newest owner comment replaces the earlier rule; I am updating the retained work to use shared sidebar rows for wide-open and all narrow layouts, pills only for wide-collapsed, and a plain H1 in every state.

Resuming #352 on branch job/cal-switcher. Current HEAD: f46c010c284a269d2d1e65927cdc9186449a3b67. Current merge-base with dev: cf919dd3bfb13e8bb09a923b61f359c861b20bd9. The newest owner comment replaces the earlier rule; I am updating the retained work to use shared sidebar rows for wide-open and all narrow layouts, pills only for wide-collapsed, and a plain H1 in every state.
Author
Owner

Screenshot review found that calendar-820-open-dark.png and calendar-1440-open-dark.png render in the light palette. The e2e currently forces root theme attributes without persisting the selected appearance, so later app state can override them. I am correcting the fixture setup and adding a rendered-theme assertion before capture.

Screenshot review found that calendar-820-open-dark.png and calendar-1440-open-dark.png render in the light palette. The e2e currently forces root theme attributes without persisting the selected appearance, so later app state can override them. I am correcting the fixture setup and adding a rendered-theme assertion before capture.
Author
Owner

Completed — Forgejo #352

Implemented the Calendar view switcher rule from the newest owner comment. The H1 stays plain. The shared Calendar views section and rows appear in the sidebar; roomy wide headers use view pills when the sidebar is closed. Today and date navigation remain in the header. DESIGN §34 and the production e2e matrix cover the behavior.

The e2e now selects light/dark via the real appearance preference before the app loads, and asserts the rendered theme and palette before taking each screenshot. This fixed a review-fixture race where asynchronous appearance hydration changed some “dark” screenshots back to light.

Files: apps/web/src/lib/components/app-sidebar.svelte, apps/web/src/lib/components/SidebarLinks.svelte, packages/ui/src/components/calendar/CalendarTools.svelte, packages/ui/src/components/calendar/CalendarTitle.svelte, apps/web/src/routes/calendar/[view]/[date]/+page.svelte, apps/web/e2e/calendar-view-switcher.mjs, docs/DESIGN.md.

Head: 6253256526362ecd8b5f1cd19bfa887ba793e7f8 (job/cal-switcher). The branch push completed; git push reported Everything up-to-date.

Evidence

All 12 production screenshots (390/820/1440 × sidebar open/closed × light/dark):

Gates

cargo fmt --check: exit 0; stdout/stderr were empty.

cargo clippy --all-targets -- -D warnings:

Finished `dev` profile [unoptimized + debuginfo] target(s) in 81m 58s

bun run check:

Loading svelte-check in workspace: /home/kayg/Developer/calternal-wt/cal-switcher/apps/web
Getting Svelte diagnostics...

svelte-check found 0 errors and 0 warnings

bun run test:

 Test Files  113 passed (113)
      Tests  745 passed (745)
   Start at  23:57:44
   Duration  115.25s (transform 59%, environment 16%, import 14%, tests 8%, setup 3%)

Calendar e2e:

PASS Calendar view switcher matrix: 3 widths × 2 sidebar states × 2 themes; screenshots in /home/kayg/Developer/calternal-wt/cal-switcher/artifacts/calendar-switcher-352

cargo test was time-boxed to 15 minutes to stay within the job limit. It ended with exit 124 while compiling; test runners did not start. Last output:

   Compiling serde_with v3.23.0
   Compiling calternal-tags v0.1.0 (/home/kayg/Developer/calternal-wt/cal-switcher/crates/calternal-tags)

cargo clean completed:

     Removed 17743 files, 6.5GiB total

Generated web output was removed. Cargo commands used OPENSSL_NO_VENDOR=1 to use the host OpenSSL during verification; vendored OpenSSL packaging was not validated in this run.

Decisions and gaps

No product decision outside the owner comment was needed; DESIGN §34 now records the placement rule. The e2e writes the scheme through /api/v1/appearance before its first app appearance read because the server is the source of the saved scheme.

Known gap: the full workspace cargo test result is unverified because compilation did not finish within the time-box.

## Completed — Forgejo #352 Implemented the Calendar view switcher rule from the newest owner comment. The H1 stays plain. The shared Calendar views section and rows appear in the sidebar; roomy wide headers use view pills when the sidebar is closed. Today and date navigation remain in the header. DESIGN §34 and the production e2e matrix cover the behavior. The e2e now selects light/dark via the real appearance preference before the app loads, and asserts the rendered theme and palette before taking each screenshot. This fixed a review-fixture race where asynchronous appearance hydration changed some “dark” screenshots back to light. Files: `apps/web/src/lib/components/app-sidebar.svelte`, `apps/web/src/lib/components/SidebarLinks.svelte`, `packages/ui/src/components/calendar/CalendarTools.svelte`, `packages/ui/src/components/calendar/CalendarTitle.svelte`, `apps/web/src/routes/calendar/[view]/[date]/+page.svelte`, `apps/web/e2e/calendar-view-switcher.mjs`, `docs/DESIGN.md`. Head: `6253256526362ecd8b5f1cd19bfa887ba793e7f8` (`job/cal-switcher`). The branch push completed; `git push` reported `Everything up-to-date`. ### Evidence All 12 production screenshots (390/820/1440 × sidebar open/closed × light/dark): - 390: [open light](https://git.kayg.org/attachments/bcc9f6a5-702c-49a0-bd2b-50150637b7ee), [open dark](https://git.kayg.org/attachments/851f2fb3-64e6-4f6f-9de6-31edab15ca12), [closed light](https://git.kayg.org/attachments/4be80fba-4631-46c4-896f-785d8b9cbd3c), [closed dark](https://git.kayg.org/attachments/e1e0ee9a-21ff-45c3-9f6a-a11d23f18247) - 820: [open light](https://git.kayg.org/attachments/53fe82b0-c76a-4fcb-b3f4-22fa3a5b0ac5), [open dark](https://git.kayg.org/attachments/2e41000d-670b-4384-b07e-50a55c001a5a), [closed light](https://git.kayg.org/attachments/47cca624-a97f-4db9-a42a-f035fac55c52), [closed dark](https://git.kayg.org/attachments/1d2aa464-911d-4dda-9926-63454c292894) - 1440: [open light](https://git.kayg.org/attachments/555cd2d7-9990-4603-87cd-5edd6561eaf4), [open dark](https://git.kayg.org/attachments/a2b3c1d4-3662-469c-8eb1-61aef355d05f), [closed light](https://git.kayg.org/attachments/9af3e6e7-9c30-4747-b074-e95b80c63d87), [closed dark](https://git.kayg.org/attachments/6867f5db-4386-4515-8005-bb67ec98e843) ### Gates `cargo fmt --check`: exit 0; stdout/stderr were empty. `cargo clippy --all-targets -- -D warnings`: ```text Finished `dev` profile [unoptimized + debuginfo] target(s) in 81m 58s ``` `bun run check`: ```text Loading svelte-check in workspace: /home/kayg/Developer/calternal-wt/cal-switcher/apps/web Getting Svelte diagnostics... svelte-check found 0 errors and 0 warnings ``` `bun run test`: ```text Test Files 113 passed (113) Tests 745 passed (745) Start at 23:57:44 Duration 115.25s (transform 59%, environment 16%, import 14%, tests 8%, setup 3%) ``` Calendar e2e: ```text PASS Calendar view switcher matrix: 3 widths × 2 sidebar states × 2 themes; screenshots in /home/kayg/Developer/calternal-wt/cal-switcher/artifacts/calendar-switcher-352 ``` `cargo test` was time-boxed to 15 minutes to stay within the job limit. It ended with exit 124 while compiling; test runners did not start. Last output: ```text Compiling serde_with v3.23.0 Compiling calternal-tags v0.1.0 (/home/kayg/Developer/calternal-wt/cal-switcher/crates/calternal-tags) ``` `cargo clean` completed: ```text Removed 17743 files, 6.5GiB total ``` Generated web output was removed. Cargo commands used `OPENSSL_NO_VENDOR=1` to use the host OpenSSL during verification; vendored OpenSSL packaging was not validated in this run. ### Decisions and gaps No product decision outside the owner comment was needed; DESIGN §34 now records the placement rule. The e2e writes the scheme through `/api/v1/appearance` before its first app appearance read because the server is the source of the saved scheme. Known gap: the full workspace `cargo test` result is unverified because compilation did not finish within the time-box.
Author
Owner

Merged into dev by Claude after visual review (a9a16e90) and deployed to calternal.cloud. Closing.

Merged into dev by Claude after visual review (a9a16e90) and deployed to calternal.cloud. Closing.
kayg closed this issue 2026-09-28 22:31:10 +00:00
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/calternal#352
No description provided.