Skip to content

🐛 Fix: Get m and m shortcuts working by using correct grid assembly method#244

Merged
tyler-dane merged 4 commits intomainfrom
fix/someday-shortcuts
Feb 3, 2025
Merged

🐛 Fix: Get m and m shortcuts working by using correct grid assembly method#244
tyler-dane merged 4 commits intomainfrom
fix/someday-shortcuts

Conversation

@tyler-dane
Copy link
Contributor

@tyler-dane tyler-dane commented Feb 1, 2025

This PR closes #245 by using the correct grid assembly process, which ensures the id is either undefined or an actual string value. We were previously falling back to an empty string


This pull request includes several updates and refactoring to the event utilities in the calendar application. The changes aim to improve the handling of event assembly and overlapping event adjustments, as well as update related tests and components.

Event Utility Refactoring:

  • Removed SCHEMA_GRID_EVENT_DEFAULT_POSITION from web.constants.ts and updated related imports accordingly.
  • Refactored assembleGridEvent, assembleDefaultEvent, and adjustOverlappingEvents functions in event.util.ts to improve event assembly and overlap adjustments. [1] [2] [3] [4]

Test Updates:

  • Adjusted import order in event.util.test.ts and added a mock for getUserId function.

Component Updates:

  • Updated AllDayRow and MainGrid components to use assembleDefaultEvent instead of getDefaultEvent for creating default events. [1] [2] [3] [4] [5] [6]

Hook Updates:

  • Updated various hooks to use assembleDefaultEvent instead of getDefaultEvent for creating default events. [1] [2] [3] [4] [5] [6]

These changes enhance the maintainability and functionality of the calendar's event handling system.

@tyler-dane tyler-dane marked this pull request as ready for review February 3, 2025 13:24
@tyler-dane tyler-dane force-pushed the fix/someday-shortcuts branch from 0b1ba86 to d992505 Compare February 3, 2025 14:12
@tyler-dane tyler-dane linked an issue Feb 3, 2025 that may be closed by this pull request
@tyler-dane tyler-dane changed the title ♻️ Refactor: Update event creation functions to use async/await and i… 🐛 Fix: Get m and m shortcuts working by using correct grid assembly method Feb 3, 2025
Rename assembleBaseEvent to _assembleBaseEvent and update event selector imports

This makes sure the id value is either populated or undefined, which is needed as part of the new event trigger
@tyler-dane tyler-dane force-pushed the fix/someday-shortcuts branch from d992505 to 754a3ba Compare February 3, 2025 14:20
@tyler-dane tyler-dane merged commit 9294b3b into main Feb 3, 2025
3 checks passed
@tyler-dane tyler-dane deleted the fix/someday-shortcuts branch February 3, 2025 14:23
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.

Nothing happens when typing m or w when the sidebar is closed

1 participant