feat(blocks): add calendar view scheduling modes#434
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR Review: design-system#434 — feat(blocks): add calendar view scheduling modesCI: All pass ✓ | Diff: +878/-268 | Verdict: Needs Changes Great architecture overall — the component decomposition, DnD integration, and controlled/uncontrolled view state pattern are well done. A few real bugs need fixing before merge. P1 — Fix before merge1. Events outside 8am–7pm are invisible in week/day views 2. No end-before-start validation in create dialog 3. Date-only ISO strings off-by-one in UTC− timezones return value instanceof Date ? value : new Date(
typeof value === 'string' && !value.includes('T') ? value + 'T00:00:00' : value
);4. P2 — Important but non-blocking5. Props race condition: 6. Midnight-spanning events invisible in week/day view 7. Keyboard DnD accessibility gap P3 — Informational (no block)
The P1s are quick fixes (30–60 min total). P2s can be follow-up issues. |
- Expand hourSlots from 8–19 to full 0–23 range so early/late events are visible; use CALENDAR_BUSINESS_HOUR constant for all-day placement - Add end-before-start guard in handleSubmit — shows inline error and blocks create when endDate <= startDate (was silently creating zero-duration event and permanently dropping endDate on reschedule) - Fix toDate() UTC off-by-one: append T00:00:00 to date-only ISO strings so they parse in local time, not UTC midnight (Jan 15 shown as Jan 14 in UTC- timezones) - Add isValid() guard for empty HTML date input in handleSubmit — was silently passing Invalid Date to onCreate - Bonus: scroll week/day views to business hours on mount; add KeyboardSensor to DnD for accessibility Verified: pnpm build pass (ESM + CJS + DTS)
Rework complete — all P1 bugs fixedAddressed all P1 issues from review in commit P1 fixes:
P2 fix (bonus):
Verification: |
Summary
Verification
Notes