Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: adjust start of week and end of week by timezone #1217

Merged
merged 3 commits into from
Jul 21, 2022

Conversation

adhrinae
Copy link
Contributor

@adhrinae adhrinae commented Jul 20, 2022

Please check if the PR fulfills these requirements

  • It's the right issue type on the title
  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix #xxx[,#xxx], where "xxx" is the issue number)
  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes/features)
  • Docs have been added/updated (for bug fixes/features)
  • It does not introduce a breaking change or has a description of the breaking change

Description

  • Renamed getDayGridEvents to getWeekViewEvents
  • getWeekViewEvents calculates the start of the week and end of the week from the given array. But this implementation filters some events when the timezone option is enabled.
    • because the original start & end time of the filtered event might be in the previous or next week before applying the timezone offset.
  • So when calling getWeekViewEvents, adjust the start and the end of the filter range by the timezone.

Thank you for your contribution to TOAST UI product. 🎉 😘 ✨

* rename `getDayGridEvents` to `getWeekViewEvents`
Copy link
Contributor

@lja1018 lja1018 left a comment

Choose a reason for hiding this comment

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

리뷰 완료합니다. 고생하셨습니다!

apps/calendar/src/components/view/week.tsx Outdated Show resolved Hide resolved
apps/calendar/src/components/view/week.tsx Outdated Show resolved Hide resolved
apps/calendar/src/factory/week.spec.tsx Show resolved Hide resolved
apps/calendar/stories/gridRow.stories.tsx Outdated Show resolved Hide resolved
Copy link
Member

@dotaitch dotaitch left a comment

Choose a reason for hiding this comment

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

리뷰 완료합니다.

apps/calendar/src/components/view/day.tsx Outdated Show resolved Hide resolved
* it improves the readability of the logic
@adhrinae adhrinae force-pushed the fix/week-events-filter-range-with-timezone branch from 7bd41e4 to ae9da42 Compare July 21, 2022 06:37
@adhrinae adhrinae merged commit 8b960eb into main Jul 21, 2022
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.

None yet

3 participants