Skip to content

Conversation

@JeanMeijer
Copy link
Collaborator

@JeanMeijer JeanMeijer commented Jan 6, 2026

Description

Briefly describe what you did and why.

Screenshots / Recordings

Add screenshots or recordings here to help reviewers understand your changes.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • UI/UX update
  • Docs update
  • Refactor / Cleanup

Related Areas

  • Authentication
  • Calendar UI
  • Data/API
  • Docs

Testing

  • Manual testing performed
  • Cross-browser testing (if UI changes)
  • Mobile responsiveness verified (if UI changes)

Checklist

  • I’ve read the CONTRIBUTING guide
  • My code works and is understandable and follows the project's style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in complex areas
  • I have updated the documentation
  • Any dependent changes are merged and published

Notes

(Optional) Add anything else you'd like to share.

By submitting, I confirm I understand and stand behind this code. If AI was used, I’ve reviewed and verified everything myself.


Summary by cubic

Implemented a new week-view event placement algorithm for clearer, more predictable layouts. Also refactored event collection hooks and positioning utilities to simplify month/week/day views and reduce duplication.

  • New Features

    • Grouped timed events by start-time proximity (40px) and calculated overlap depth to determine width, left offset, and z-index.
    • Added useWeekEventCollection, useMonthEventCollection, and useWeekRowEvents for consistent data across views.
    • Improved all-day/multi-day handling with getAllDayEventCollectionsForDays and per-day clamping.
    • Month week rows now exclude weekend-only events when weekends are hidden.
  • Refactors

    • Extracted positioning logic to utils/positioning.ts (eventOverlapsDay, getEventCollectionsForDay, calculateWeekViewEventPositions, PositionedEvent).
    • Simplified filterPastEvents and renamed getEventsStartingOnPlainDate to eventsStartingOn.
    • Replaced generic useEventCollection with specific hooks in day/week/month views.
    • Updated isWithinInterval to use precise Temporal comparisons; added toPlainDate overloads.
    • Minor cleanup: removed console logs, added "use client" to button/copy components.

Written for commit f170f6d. Summary will update on new commits.

@vercel
Copy link

vercel bot commented Jan 6, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
analog Ready Ready Preview, Comment Jan 6, 2026 9:12pm

@JeanMeijer JeanMeijer changed the title feat(web): implement placement algorithm for week view #443 feat(web): implement placement algorithm for week view Jan 6, 2026
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 18 files

@JeanMeijer JeanMeijer changed the title feat(web): implement placement algorithm for week view feat(web): implement new placement algorithm for week view Jan 7, 2026
@JeanMeijer JeanMeijer merged commit 7c328e6 into main Jan 7, 2026
7 checks passed
@JeanMeijer JeanMeijer deleted the feat/improve-weekview-placement-algorithm branch January 7, 2026 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants