Skip to content

Commit ab2209a

Browse files
authored
refactor(web): rename calendar view to week view (#1725)
1 parent 10e4962 commit ab2209a

145 files changed

Lines changed: 250 additions & 254 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/development/common-change-recipes.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,11 @@ Do not edit recurring behavior from one layer only.
8585

8686
## Change A Shared Hotkey Dialog (Day + Week)
8787

88-
Use this for overlays mounted in both `CalendarView` and `DayViewContent` (for example Dedication).
88+
Use this for overlays mounted in both `WeekView` and `DayViewContent` (for example Dedication).
8989

90-
1. Update the shared dialog component in `packages/web/src/views/Calendar/components/Dedication/Dedication.tsx`.
90+
1. Update the shared dialog component in `packages/web/src/views/Week/components/Dedication/Dedication.tsx`.
9191
2. Confirm both mount points still render it:
92-
- `packages/web/src/views/Calendar/Calendar.tsx`
92+
- `packages/web/src/views/Week/WeekView.tsx`
9393
- `packages/web/src/views/Day/view/DayViewContent.tsx`
9494
3. Keep keyboard behavior aligned:
9595
- toggle hotkey (`ctrl+shift+0`)

docs/development/feature-file-map.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Use this document to find the first files to inspect for common Compass changes.
1010
- Router config: `packages/web/src/routers/index.tsx`
1111
- Router loaders: `packages/web/src/routers/loaders.ts`
1212
- Client version polling: `packages/web/src/common/hooks/useVersionCheck.ts`
13-
- Update CTA wiring: `packages/web/src/views/Calendar/components/Sidebar/SidebarIconRow/SidebarIconRow.tsx`
13+
- Update CTA wiring: `packages/web/src/views/Week/components/Sidebar/SidebarIconRow/SidebarIconRow.tsx`
1414

1515
## Authentication And Session
1616

@@ -50,21 +50,24 @@ Use this document to find the first files to inspect for common Compass changes.
5050
- Shared responsive sidebar state hook (`xl` breakpoint behavior): `packages/web/src/common/hooks/useSidebarState.ts`
5151
- Day keyboard shortcuts (includes `[` toggle): `packages/web/src/views/Day/hooks/shortcuts/useDayViewShortcuts.ts`
5252
- Day view hooks: `packages/web/src/views/Day/hooks`
53-
- Week/calendar view: `packages/web/src/views/Calendar`
53+
- Week view: `packages/web/src/views/Week`
5454
- Now view: `packages/web/src/views/Now`
5555
- Now keyboard shortcuts (includes `[` toggle): `packages/web/src/views/Now/shortcuts/useNowShortcuts.ts`
56-
- Dedication dialog implementation (native `dialog` + hotkeys): `packages/web/src/views/Calendar/components/Dedication/Dedication.tsx`
56+
- Dedication dialog implementation (native `dialog` + hotkeys): `packages/web/src/views/Week/components/Dedication/Dedication.tsx`
5757
- Dedication dialog mount points:
58-
- week view: `packages/web/src/views/Calendar/Calendar.tsx`
58+
- week view: `packages/web/src/views/Week/WeekView.tsx`
5959
- day view: `packages/web/src/views/Day/view/DayViewContent.tsx`
6060

61-
## Calendar Sidebar
61+
## Week Sidebar
6262

63-
- Sidebar shell and tab rendering: `packages/web/src/views/Calendar/components/Sidebar/Sidebar.tsx`
64-
- Footer icon row actions (tasks/month, command palette, sync/update): `packages/web/src/views/Calendar/components/Sidebar/SidebarIconRow/SidebarIconRow.tsx`
65-
- Sidebar layout constants and icon group styling: `packages/web/src/views/Calendar/components/Sidebar/styled.ts`
63+
- Sidebar shell and tab rendering: `packages/web/src/views/Week/components/Sidebar/Sidebar.tsx`
64+
- Someday tab rendering: `packages/web/src/views/Week/components/Sidebar/SomedayTab/SomedayTab.tsx`
65+
- Someday week section: `packages/web/src/views/Week/components/Sidebar/SomedayTab/SomedayWeekSection/SomedayWeekSection.tsx`
66+
- Someday month section: `packages/web/src/views/Week/components/Sidebar/SomedayTab/SomedayMonthSection/SomedayMonthSection.tsx`
67+
- Footer icon row actions (tasks/month, command palette, sync/update): `packages/web/src/views/Week/components/Sidebar/SidebarIconRow/SidebarIconRow.tsx`
68+
- Sidebar layout constants and icon group styling: `packages/web/src/views/Week/components/Sidebar/styled.ts`
6669
- Google connection/status UI contract for sidebar + command palette: `packages/web/src/auth/hooks/google/useConnectGoogle/useConnectGoogle.ts`
67-
- Sidebar icon row behavior tests: `packages/web/src/views/Calendar/components/Sidebar/SidebarIconRow/SidebarIconRow.test.tsx`
70+
- Sidebar icon row behavior tests: `packages/web/src/views/Week/components/Sidebar/SidebarIconRow/SidebarIconRow.test.tsx`
6871

6972
## Offline Storage
7073

docs/frontend/frontend-runtime-flow.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ Responsibilities:
9999
Files:
100100

101101
- `packages/web/src/common/hooks/useVersionCheck.ts`
102-
- `packages/web/src/views/Calendar/components/Sidebar/SidebarIconRow/SidebarIconRow.tsx`
102+
- `packages/web/src/views/Week/components/Sidebar/SidebarIconRow/SidebarIconRow.tsx`
103103

104104
Runtime behavior:
105105

@@ -111,13 +111,16 @@ Runtime behavior:
111111

112112
When the server version differs from `BUILD_VERSION`, `isUpdateAvailable` becomes `true` and the sidebar shows a refresh action that triggers `window.location.reload()`.
113113

114-
## Calendar Sidebar Footer Controls
114+
## Week Sidebar Footer Controls
115115

116116
Files:
117117

118-
- `packages/web/src/views/Calendar/components/Sidebar/Sidebar.tsx`
119-
- `packages/web/src/views/Calendar/components/Sidebar/SidebarIconRow/SidebarIconRow.tsx`
120-
- `packages/web/src/views/Calendar/components/Sidebar/styled.ts`
118+
- `packages/web/src/views/Week/components/Sidebar/Sidebar.tsx`
119+
- `packages/web/src/views/Week/components/Sidebar/SomedayTab/SomedayTab.tsx`
120+
- `packages/web/src/views/Week/components/Sidebar/SomedayTab/SomedayWeekSection/SomedayWeekSection.tsx`
121+
- `packages/web/src/views/Week/components/Sidebar/SomedayTab/SomedayMonthSection/SomedayMonthSection.tsx`
122+
- `packages/web/src/views/Week/components/Sidebar/SidebarIconRow/SidebarIconRow.tsx`
123+
- `packages/web/src/views/Week/components/Sidebar/styled.ts`
121124
- `packages/web/src/auth/hooks/google/useConnectGoogle/useConnectGoogle.ts`
122125

123126
Layout contract:
@@ -148,8 +151,8 @@ Icon state constraints:
148151

149152
Files:
150153

151-
- `packages/web/src/views/Calendar/components/Dedication/Dedication.tsx`
152-
- `packages/web/src/views/Calendar/Calendar.tsx`
154+
- `packages/web/src/views/Week/components/Dedication/Dedication.tsx`
155+
- `packages/web/src/views/Week/WeekView.tsx`
153156
- `packages/web/src/views/Day/view/DayViewContent.tsx`
154157

155158
Runtime behavior:
@@ -326,7 +329,7 @@ Files:
326329

327330
- `packages/web/src/auth/hooks/google/useConnectGoogle/useConnectGoogle.ts`
328331
- `packages/web/src/auth/google/google.auth.util.ts`
329-
- `packages/web/src/views/Calendar/components/Sidebar/SidebarIconRow/SidebarIconRow.tsx`
332+
- `packages/web/src/views/Week/components/Sidebar/SidebarIconRow/SidebarIconRow.tsx`
330333

331334
UI state comes from a single server-enriched metadata field (`google.connectionState`) plus one client-only loading state:
332335

packages/web/src/__tests__/__mocks__/server/mock.handlers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
} from "@core/__mocks__/v1/events/events.misc";
1212
import { Status } from "@core/errors/status.codes";
1313
import { ENV_WEB } from "@web/common/constants/env.constants";
14-
import { freshenEventStartEndDate } from "@web/views/Calendar/calendar.render.test.utils";
14+
import { freshenEventStartEndDate } from "@web/views/Week/week-view.render.test.utils";
1515

1616
export const globalHandlers = [
1717
rest.get("http://localhost/version.json", (_req, res, ctx) => {

packages/web/src/__tests__/utils/state/draft.test.util.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ import { renderHook } from "@web/__tests__/__mocks__/mock.render";
55
import { type Schema_WebEvent } from "@web/common/types/web.event.types";
66
import { assembleGridEvent } from "@web/common/utils/event/event.util";
77
import { draftSlice } from "@web/ducks/events/slices/draft.slice";
8-
import { useDraftActions } from "@web/views/Calendar/components/Draft/hooks/actions/useDraftActions";
9-
import { useDraftState } from "@web/views/Calendar/components/Draft/hooks/state/useDraftState";
10-
import { useDateCalcs } from "@web/views/Calendar/hooks/grid/useDateCalcs";
11-
import { useGridLayout } from "@web/views/Calendar/hooks/grid/useGridLayout";
12-
import { useToday } from "@web/views/Calendar/hooks/useToday";
13-
import { useWeek } from "@web/views/Calendar/hooks/useWeek";
8+
import { useDraftActions } from "@web/views/Week/components/Draft/hooks/actions/useDraftActions";
9+
import { useDraftState } from "@web/views/Week/components/Draft/hooks/state/useDraftState";
10+
import { useDateCalcs } from "@web/views/Week/hooks/grid/useDateCalcs";
11+
import { useGridLayout } from "@web/views/Week/hooks/grid/useGridLayout";
12+
import { useToday } from "@web/views/Week/hooks/useToday";
13+
import { useWeek } from "@web/views/Week/hooks/useWeek";
1414

1515
export function setupDraftState(event: Schema_WebEvent) {
1616
const draft = assembleGridEvent(event);

packages/web/src/common/parsers/view.parser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import dayjs, { type Dayjs } from "@core/util/date/dayjs";
22
import { type Schema_WebEvent } from "@web/common/types/web.event.types";
3-
import { type WeekNavigationSource } from "@web/views/Calendar/hooks/useWeek";
3+
import { type WeekNavigationSource } from "@web/views/Week/hooks/useWeek";
44

55
export class EventInViewParser {
66
private readonly event: Schema_WebEvent;

packages/web/src/common/utils/datetime/web.date.util.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { theme } from "@web/common/styles/theme";
1212
import { type Option_Time } from "@web/common/types/util.types";
1313
import { type Schema_SelectedDates } from "@web/common/types/web.event.types";
1414
import { roundToNext } from "@web/common/utils/round/round.util";
15-
import { GRID_TIME_STEP } from "@web/views/Calendar/layout.constants";
15+
import { GRID_TIME_STEP } from "@web/views/Week/layout.constants";
1616

1717
export const dateIsValid = (date: string) => {
1818
const notNaN = !Number.isNaN(new Date(date).getTime());

packages/web/src/common/utils/draft/draft.util.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ import { getElemById } from "@web/common/utils/grid/grid.util";
1212
import { roundToNext } from "@web/common/utils/round/round.util";
1313
import { draftSlice } from "@web/ducks/events/slices/draft.slice";
1414
import { type Activity_DraftEvent } from "@web/ducks/events/slices/draft.slice.types";
15-
import { type DateCalcs } from "@web/views/Calendar/hooks/grid/useDateCalcs";
15+
import { type DateCalcs } from "@web/views/Week/hooks/grid/useDateCalcs";
1616
import {
1717
DRAFT_DURATION_MIN,
1818
GRID_TIME_STEP,
19-
} from "@web/views/Calendar/layout.constants";
19+
} from "@web/views/Week/layout.constants";
2020

2121
export const assembleAlldayDraft = async (
2222
e: MouseEvent,

packages/web/src/common/utils/grid/grid.util.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {
44
FLEX_EQUAL,
55
FLEX_TMRW,
66
FLEX_TODAY,
7-
} from "@web/views/Calendar/layout.constants";
7+
} from "@web/views/Week/layout.constants";
88
import { getFlexBasis, getLineClamp, getPrevDayWidth } from "./grid.util";
99

1010
describe("getLineClamp", () => {

packages/web/src/common/utils/grid/grid.util.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
FLEX_EQUAL,
1010
FLEX_TMRW,
1111
FLEX_TODAY,
12-
} from "@web/views/Calendar/layout.constants";
12+
} from "@web/views/Week/layout.constants";
1313

1414
export const assignEventToRow = (
1515
eventDays: number[],

0 commit comments

Comments
 (0)