fix(02): remove custom ViewToolbar; use Schedule-X built-in header

- Remove <ViewToolbar> render and its import from CalendarShell
- Remove createCalendarControlsPlugin import, useState instance, and plugin
  array entry (calendar-controls only served the custom toolbar)
- Delete ViewToolbar.tsx (no longer referenced anywhere)
- Remove calendar-controls mock from CalendarShell.test.tsx
- CSS audit confirmed no rules hide Schedule-X weekday-name row; no CSS changes needed
- All four views (day/week/month-grid/month-agenda) remain; Schedule-X's native
  header exposes them in its own view switcher
This commit is contained in:
Lucas Berger
2026-06-05 14:54:40 -04:00
parent 1f0b9546a8
commit d240657059
3 changed files with 5 additions and 236 deletions
@@ -56,41 +56,6 @@ vi.mock('@schedule-x/event-modal', () => ({
})),
}))
// Mock @schedule-x/calendar-controls so CalendarShell can create the plugin
vi.mock('@schedule-x/calendar-controls', () => ({
createCalendarControlsPlugin: vi.fn(() => ({
name: 'calendarControls',
beforeRender: vi.fn(),
onRender: vi.fn(),
setDate: vi.fn(),
setView: vi.fn(),
getDate: vi.fn(() => Temporal.Now.plainDateISO()),
getView: vi.fn(() => 'month-grid'),
setFirstDayOfWeek: vi.fn(),
setLocale: vi.fn(),
setViews: vi.fn(),
setDayBoundaries: vi.fn(),
setWeekOptions: vi.fn(),
setCalendars: vi.fn(),
setMinDate: vi.fn(),
setMaxDate: vi.fn(),
setMonthGridOptions: vi.fn(),
setTimezone: vi.fn(),
setResources: vi.fn(),
getFirstDayOfWeek: vi.fn(),
getLocale: vi.fn(),
getViews: vi.fn(() => []),
getDayBoundaries: vi.fn(),
getWeekOptions: vi.fn(),
getCalendars: vi.fn(() => ({})),
getMinDate: vi.fn(),
getMaxDate: vi.fn(),
getMonthGridOptions: vi.fn(),
getResources: vi.fn(() => []),
getRange: vi.fn(() => null),
})),
}))
// Mock the API client
vi.mock('../api/client.js', () => ({
fetchMe: vi.fn(),