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

feat: ✨ create calendar/meeting setup page #10

Merged
merged 17 commits into from
Jan 15, 2024

Conversation

seancfong
Copy link
Member

@seancfong seancfong commented Dec 13, 2023

Summary

  • Calendar component added to home page
  • Users can highlight days by dragging on desktop and mobile
  • Calendar month preview:
    image
  • Date highlight preview (while dragging/mouse down):
    image
  • Date select confirmation preview (when touch end/mouse up):
    image

WIP

  • Calendar displays days of month correctly
  • User can navigate back and forth between months
  • User can select a single day and multiple days
  • User's selection is retained when navigating between months

Closes #8

@seancfong seancfong linked an issue Dec 13, 2023 that may be closed by this pull request
5 tasks
@seancfong seancfong temporarily deployed to staging-10 December 13, 2023 08:51 — with GitHub Actions Inactive
@seancfong seancfong marked this pull request as draft December 13, 2023 08:52
@seancfong seancfong assigned seancfong and unassigned seancfong Dec 13, 2023
@seancfong seancfong temporarily deployed to staging-10 December 13, 2023 11:11 — with GitHub Actions Inactive
@seancfong
Copy link
Member Author

seancfong commented Dec 13, 2023

Current progress:

  • Calendar seems to populate dates correctly, including February in leap years. May have to unit test this sometime?
  • Incrementing and decrementing month buttons working. Temporarily using HTML entities (e.g. ‹ ) - will update to icons once we decide on which icon set to use.

Future considerations:

  • To display grayed out days previous/next month?

December 2023
image

February 2024 (in leap year)
image

@seancfong seancfong temporarily deployed to staging-10 December 13, 2023 11:50 — with GitHub Actions Inactive
@seancfong seancfong temporarily deployed to staging-10 December 14, 2023 08:50 — with GitHub Actions Inactive
@seancfong seancfong temporarily deployed to staging-10 December 14, 2023 12:51 — with GitHub Actions Inactive
@seancfong seancfong temporarily deployed to staging-10 December 16, 2023 03:26 — with GitHub Actions Inactive
src/lib/components/Calendar/Calendar.svelte Outdated Show resolved Hide resolved
src/lib/utils/calendarUtils.ts Outdated Show resolved Hide resolved
src/lib/components/Calendar/CalendarDay.ts Outdated Show resolved Hide resolved
src/lib/components/Calendar/CalendarDay.ts Outdated Show resolved Hide resolved
src/lib/components/Calendar/CalendarDay.ts Outdated Show resolved Hide resolved
src/lib/utils/calendarUtils.ts Outdated Show resolved Hide resolved
src/lib/components/Calendar/CalendarBody.svelte Outdated Show resolved Hide resolved
src/lib/components/Calendar/CalendarBody.svelte Outdated Show resolved Hide resolved
src/lib/components/Calendar/Calendar.svelte Outdated Show resolved Hide resolved
src/lib/utils/calendarUtils.ts Outdated Show resolved Hide resolved
Copy link
Member

@MinhxNguyen7 MinhxNguyen7 left a comment

Choose a reason for hiding this comment

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

I know that this is still a draft, but looks like it's mostly done, so I'll just leave some comments. What do you have left to do anyway?

This is great. Works well, looks decent, and fulfills the requirements.

One little thing though, if you have a sequence of days selected, and you want to drag to unselect them, if you over-drag by one day, it selects that day.

Otherwise, I only have code-quality suggestions. I'm being thorough for now so that eveyrone can have a good idea of the standard.

@seancfong seancfong temporarily deployed to staging-10 December 19, 2023 08:00 — with GitHub Actions Inactive
@seancfong
Copy link
Member Author

I know that this is still a draft, but looks like it's mostly done, so I'll just leave some comments. What do you have left to do anyway?

This is great. Works well, looks decent, and fulfills the requirements.

One little thing though, if you have a sequence of days selected, and you want to drag to unselect them, if you over-drag by one day, it selects that day.

Otherwise, I only have code-quality suggestions. I'm being thorough for now so that eveyrone can have a good idea of the standard.

Thanks for the feedback! I pushed changes to most of them but will @ when all ready for re-review.

@MinhxNguyen7
Copy link
Member

Oops. I just realized that the review was premature. Looking at the PR and seeing all the boxes checked made me think that you were pretty much done, and I hadn't looked at the issue.

In any case, good progress, and sorry for breathing down the back of your neck.

@seancfong seancfong temporarily deployed to staging-10 December 20, 2023 08:05 — with GitHub Actions Inactive
@seancfong seancfong temporarily deployed to staging-10 December 20, 2023 08:55 — with GitHub Actions Inactive
@seancfong seancfong marked this pull request as ready for review December 20, 2023 09:19
@seancfong
Copy link
Member Author

@MinhxNguyen7 Requesting re-review with feedback changes - also got in a fix for the following bug:

One little thing though, if you have a sequence of days selected, and you want to drag to unselect them, if you over-drag by one day, it selects that day.

@seancfong seancfong changed the title feat: ✨ create calendar/meeting setup page (WIP) feat: ✨ create calendar/meeting setup page Dec 21, 2023
src/lib/utils/calendarUtils.ts Outdated Show resolved Hide resolved
src/lib/stores/calendarStores.ts Outdated Show resolved Hide resolved
src/lib/components/Calendar/CalendarDay.ts Show resolved Hide resolved
@MinhxNguyen7 MinhxNguyen7 temporarily deployed to staging-10 December 22, 2023 05:17 — with GitHub Actions Inactive
@MinhxNguyen7
Copy link
Member

I meant to add a review comment as well: The dragging doesn't work on desktop or mobile. The first time I hold down on one date and try to drag, it just half-highlights the first date and doesn't do anything else. I can make a recording if you can't reproduce it.

Also, for next time, please mark the comments on GitHub that you've addressed as resolved. If you don't agree, reply to the comment. Thanks!

@seancfong seancfong temporarily deployed to staging-10 January 2, 2024 01:48 — with GitHub Actions Inactive
@seancfong seancfong temporarily deployed to staging-10 January 2, 2024 02:04 — with GitHub Actions Inactive
@seancfong seancfong temporarily deployed to staging-10 January 2, 2024 02:48 — with GitHub Actions Inactive
@seancfong
Copy link
Member Author

I meant to add a review comment as well: The dragging doesn't work on desktop or mobile. The first time I hold down on one date and try to drag, it just half-highlights the first date and doesn't do anything else. I can make a recording if you can't reproduce it.

Just looked into it earlier today and pushed a fix alongside changes from prior feedback. Let me know your thoughts on the one outstanding conversation. Thanks!

@MinhxNguyen7 MinhxNguyen7 mentioned this pull request Jan 8, 2024
5 tasks
@MinhxNguyen7
Copy link
Member

MinhxNguyen7 commented Jan 9, 2024

@seancfong I'll take a look

@seancfong seancfong requested a review from MinhxNguyen7 January 9, 2024 23:02
@seancfong
Copy link
Member Author

@MinhxNguyen7 Re-requesting review, as all conversations have been resolved

@adi-lux
Copy link
Contributor

adi-lux commented Jan 10, 2024

Hey Sean! This pull request seems good, but I was wondering about the Date implementation.

In the future do you think we might have to switch to a time library or standardize the time code? I noticed that there already are two different types of Date implementations already. In the summary component, they use strings for meeting dates and times but the time picker makes Calendar Day its own class. It might get a little confusing later on if we don't standardize it.

Maybe using the default Date class, a date library, or a standardized Date implementation would be better for us? Because as we all know, JS' date implementation is finicky and it's probably important to have a solid representation of Date in an application such as ours. Let me know what your thoughts are on the subject.

@seancfong
Copy link
Member Author

Hey Sean! This pull request seems good, but I was wondering about the Date implementation.

In the future do you think we might have to switch to a time library or standardize the time code? I noticed that there already are two different types of Date implementations already. In the summary component, they use strings for meeting dates and times but the time picker makes Calendar Day its own class. It might get a little confusing later on if we don't standardize it.

Maybe using the default Date class, a date library, or a standardized Date implementation would be better for us? Because as we all know, JS' date implementation is finicky and it's probably important to have a solid representation of Date in an application such as ours. Let me know what your thoughts are on the subject.

Hey Adi! I agree that we should look into some common date library to use. Definitely something to bring up in the upcoming meeting.

@MinhxNguyen7
Copy link
Member

Why don't we use the built-in Date or make a sub-class of Date?

Copy link
Member

@MinhxNguyen7 MinhxNguyen7 left a comment

Choose a reason for hiding this comment

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

LGTM! Let's sort out the Date thing in the availability PR. Sorry for taking a while!

@MinhxNguyen7 MinhxNguyen7 merged commit df4d903 into main Jan 15, 2024
2 checks passed
@KevinWu098 KevinWu098 deleted the 8-calendarmeeting-setup-page branch October 17, 2024 17:57
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.

Calendar/Meeting Setup Page
3 participants