Skip to content

Commit 1c22fd4

Browse files
Uarmaganclaude
andauthored
fix: restore Day calendar parity with Week grid behavior (#1820)
* refactor(web): add shared calendar grid constants * refactor(web): share calendar grid measurements * refactor(web): add visible-date event positioning * refactor(web): share calendar layout cache * refactor(web): share timed deck layout * refactor(web): extract calendar event cards * refactor(web): share calendar grid shell * refactor(web): share calendar event targeting * feat(web): add day calendar interaction adapter * feat(web): render day with shared calendar grid * refactor(web): remove old day calendar agenda * fix(web): restore day calendar parity * refactor(web): move calendar interaction primitives to common * refactor(web): use neutral calendar event DOM attributes * refactor(web): keep day calendar focus helpers in day * refactor(web): split day calendar grid responsibilities * refactor(web): trust shared calendar event positioning * refactor(web): clean shared calendar grid boundaries * chore(web): remove unused drag dependencies * refactor(web): clean calendar grid review findings * feat(web): share calendar deck layout and refine event selection - Reuse the shared timed-event deck layout across Day and Week, including active timed draft decks - Mark the event being edited with a lifted in-palette background instead of a dark fill or accent ring Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * refactor(web): remove elf event state --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 64122e7 commit 1c22fd4

185 files changed

Lines changed: 8213 additions & 7938 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.

.cursorrules/development.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ bun run test:backend # Run backend tests (~15 seconds)
6565
### Code Formatting
6666

6767
```bash
68-
bunx prettier . --write # Format all code (~15 seconds)
68+
bun run format # Format all code with Biome (~15 seconds)
6969
```
7070

7171
### CLI Tools
@@ -102,8 +102,8 @@ The backend requires:
102102

103103
The repository includes Husky hooks that automatically:
104104

105-
- Run `bunx lint-staged` on pre-commit (formats code with Prettier)
106-
- Run `bunx prettier . --write` on pre-push (ensures consistent formatting)
105+
- Run Biome formatting/checks before code is submitted
106+
- Use `bun run format` for formatting and `bun run lint:fix` for safe fixes
107107

108108
Your commits will pass these checks automatically.
109109

@@ -112,7 +112,7 @@ Your commits will pass these checks automatically.
112112
- The backend requires external service credentials to run
113113
- Frontend works standalone without backend services
114114
- Always use UTC timezone for consistency (`TZ=Etc/UTC`)
115-
- ESLint and Prettier configurations are already set up
115+
- Biome is the formatter and linter for this repo
116116
- The project uses React 18+ with the new JSX transform
117117

118118
## File Structure
@@ -144,5 +144,5 @@ packages/
144144
- Install with `bun install`
145145
- Start frontend: `bun run dev:web` (recommended)
146146
- Run tests: `bun run test:web`, `bun run test:backend`, `bun run test:core`
147-
- Format code: `bunx prettier . --write`
147+
- Format code: `bun run format`
148148
- Pre-commit hooks run automatically

.cursorrules/git-conventions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ Use conventional commit format: `type(scope): description`
6868

6969
The repository includes Husky hooks that will:
7070

71-
- Run `bunx lint-staged` on pre-commit (formats code with Prettier)
72-
- Run `bunx prettier . --write` on pre-push (ensures consistent formatting)
71+
- Run Biome formatting/checks before code is submitted
72+
- Use `bun run format` for formatting and `bun run lint:fix` for safe fixes
7373

7474
**ALWAYS ensure your commits pass these checks before pushing.**
7575

.cursorrules/styling.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,11 @@ Always use module aliased paths for imports when importing Compass modules.
7070

7171
**Examples:**
7272

73-
-`import { Component } from '@web/components'`
74-
-`import { util } from '@web/common/utils'`
75-
-`import { types } from '@core/types'`
73+
-`import { Component } from "@web/components"`
74+
-`import { util } from "@web/common/utils"`
75+
-`import { types } from "@core/types"`
7676

77-
**Import order (enforced by Prettier):**
77+
**Import order (enforced by Biome):**
7878

7979
1. Third-party modules
8080
2. Non-Compass internal modules
@@ -107,4 +107,4 @@ Always use module aliased paths for imports when importing Compass modules.
107107
- Use semantic color tokens (e.g., `bg-bg-primary`)
108108
- Never use raw Tailwind colors (e.g., `bg-blue-300`)
109109
- Use module aliased imports (`@web/*`, `@core/*`)
110-
- Follow import order enforced by Prettier
110+
- Follow import order enforced by Biome

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ test(web): add unit tests for login component
253253
4. **Format Code**
254254

255255
```bash
256-
bunx prettier . --write
256+
bun run format
257257
```
258258

259259
5. **Generate Documentation** (if you added/modified APIs)

bun.lock

Lines changed: 1 addition & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/web/package.json

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,8 @@
77
"typings": "declaration.d.ts",
88
"dependencies": {
99
"@compass/core": "1.0.0",
10-
"@dnd-kit/core": "^6.3.1",
11-
"@dnd-kit/modifiers": "^9.0.0",
12-
"@dnd-kit/utilities": "^3.2.2",
1310
"@floating-ui/react": "^0.27.3",
1411
"@hello-pangea/dnd": "^16.2.0",
15-
"@ngneat/elf": "^2.5.1",
16-
"@ngneat/elf-entities": "^5.0.2",
17-
"@ngneat/use-observable": "^1.0.0",
1812
"@phosphor-icons/react": "^2.1.7",
1913
"@react-oauth/google": "^0.7.0",
2014
"@reduxjs/toolkit": "^1.6.1",
@@ -25,7 +19,6 @@
2519
"fast-deep-equal": "^3.1.3",
2620
"normalizr": "^3.6.1",
2721
"posthog-js": "^1.259.0",
28-
"re-resizable": "^6.11.2",
2922
"react": "^18.1.0",
3023
"react-cmdk": "^1.3.9",
3124
"react-datepicker": "^4.2.1",

packages/web/src/__tests__/utils/agenda/agenda.test.util.tsx

Lines changed: 0 additions & 23 deletions
This file was deleted.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
export const CALENDAR_DRAFT_DURATION_MIN = 15;
2+
export const CALENDAR_DRAFT_PADDING_BOTTOM = 3;
3+
export const CALENDAR_EVENT_ALLDAY_HEIGHT = 20;
4+
export const CALENDAR_EVENT_ALLDAY_GAP = 3;
5+
export const CALENDAR_EVENT_ALLDAY_ROW_HEIGHT =
6+
CALENDAR_EVENT_ALLDAY_HEIGHT + CALENDAR_EVENT_ALLDAY_GAP;
7+
export const CALENDAR_EVENT_PADDING_RIGHT = 10;
8+
export const CALENDAR_TIMED_EVENT_COLUMN_INSET = 5;
9+
export const CALENDAR_GRID_EVENT_TIME_LABEL_FONT_SIZE = "11px";
10+
export const CALENDAR_GRID_EVENT_TIME_LABEL_OPACITY = "0.78";
11+
export const CALENDAR_GRID_EVENT_TITLE_LINE_HEIGHT = "16px";
12+
export const CALENDAR_MIN_EVENT_HEIGHT_FOR_TIME_LABEL = 36;
13+
export const CALENDAR_MIN_EVENT_WIDTH_FOR_TIME_LABEL = 90;
14+
export const CALENDAR_EVENT_WIDTH_MINIMUM = 80;
15+
export const CALENDAR_DECK_INDENT = 16;
16+
export const CALENDAR_DECK_RIGHT_RESERVE = 24;
17+
export const CALENDAR_DECK_MIN_WIDTH = 72;
18+
export const CALENDAR_TIMED_EVENT_WIDTH_RATIO = 0.6;
19+
export const CALENDAR_TIMED_EVENT_MIN_WIDTH = 280;
20+
export const CALENDAR_TIMED_EVENT_MAX_WIDTH = 600;
21+
export const CALENDAR_TIMED_EVENT_FAN_INDENT = 44;
22+
export const CALENDAR_TIMED_EVENT_FAN_GUTTER = 120;
23+
export const CALENDAR_GRID_PADDING_BOTTOM = 20;
24+
export const CALENDAR_GRID_MARGIN_LEFT = 50;
25+
export const CALENDAR_GRID_TIME_STEP = 15;
26+
export const CALENDAR_TIMED_VISIBLE_HOURS = 13;

0 commit comments

Comments
 (0)