Merged
Conversation
cbe4f5e to
508cde1
Compare
4889f97 to
731c59b
Compare
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a follow-up PR to the recent PRs that added the ability to accommodate overlapping events (#234, #238, #240). It keeps the same functionality, but refactors the algorithm and updates the tests. This was done to help my understanding of how it works and make it easier to maintain in the future.
This pull request refactors the event overlap adjustment functionality and its associated tests. The main changes include moving the overlap adjustment logic to a new module, updating the relevant imports, and adding new test cases for the refactored functions.
Refactoring and code organization:
packages/web/src/common/utils/event.util.ts: RemovedadjustOverlappingEventsandadjustEventsfunctions, which were moved to a new module.packages/web/src/common/utils/overlap/overlap.ts: Added new module foradjustOverlappingEventsand its helper functions, improving code organization and readability.Test updates:
packages/web/src/common/utils/event.util.test.ts: Removed tests foradjustOverlappingEventsand moved them to a new test file.packages/web/src/common/utils/overlap/overlap.test.ts: Added new test cases foradjustOverlappingEvents, ensuring comprehensive coverage of the refactored functions.Import updates:
packages/web/src/views/Calendar/components/Grid/MainGrid/MainGridEvents.tsx: Updated imports to use the newadjustOverlappingEventsfunction from the new module. [1] [2]