Skip to content

Conversation

@IsaacPhoon
Copy link
Contributor

@IsaacPhoon IsaacPhoon commented Jan 6, 2026

Summary

  • Created helper functions in chrono.ts that would assist with converting anchor dates to dates from current week
  • Changed code so that both google calendar data and client display would reflect and pull from current week instead of anchor dates

Video Demo

Screen.Recording.2026-01-05.at.9.05.53.PM.mov

Completes #221

Copy link
Member

@KevinWu098 KevinWu098 left a comment

Choose a reason for hiding this comment

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

Just a couple of comments. Other than that, fix the merge conflict and we should be good to go

Comment on lines 93 to 99
const dateToDisplay = availabilityDates[selectedZotDateIndex].day;

const displayDate = isAnchorDateMeeting(meetingDates)
? getCurrentWeekDateForAnchor(dateToDisplay)
: dateToDisplay;

const formattedDate = displayDate.toLocaleDateString("en-US", {
Copy link
Member

Choose a reason for hiding this comment

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

issue: I don't love that we pass in meetingData and duplicate a good deal of code in order to calculate just one date for display.

suggestion: Can we refactor this so that rather than duplicate code and pass around meetingData, we could calculate this in availability and pass that value down?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup, I have just removed the duplicate code and put it under convertedDates in avaliability.tsx to replace meetingDates/Data as necessary

Comment on lines 91 to 93
export function getDayOfWeekFromDateString(dateString: string): number {
return new Date(dateString).getDay();
}
Copy link
Member

Choose a reason for hiding this comment

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

issue: is this method used?

@KevinWu098
Copy link
Member

Is this ready to re-review? How's fixing the merge conflict coming along?

@IsaacPhoon IsaacPhoon temporarily deployed to staging-232 January 7, 2026 10:33 — with GitHub Actions Inactive
@github-actions github-actions bot temporarily deployed to staging-232 January 7, 2026 10:33 Inactive
@IsaacPhoon
Copy link
Contributor Author

Is this ready to re-review? How's fixing the merge conflict coming along?

Yes, I have hopefully fixed the merge conflict as well as the issues presented in your comments. Please let me know if there is anything else I could improve/fix, thank you!

Copy link
Member

@KevinWu098 KevinWu098 left a comment

Choose a reason for hiding this comment

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

LGTM! One minor nit and then we can merge

[fromTimeMinutes, toTimeMinutes]
);

const convertedDates = useMemo(() => {
Copy link
Member

Choose a reason for hiding this comment

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

nit: will be somewhat verbose, but how about anchorNormalizedDate? "converted" is ambiguous — converted from what? what was converted? etc

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup, I agree, I have changed all instances of convertedDates

const { currentPage, itemsPerPage } = useAvailabilityPaginationStore();

const { currentPage, itemsPerPage } = useAvailabilityPaginationStore(
useShallow((state) => ({
Copy link
Member

Choose a reason for hiding this comment

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

good!

@IsaacPhoon IsaacPhoon temporarily deployed to staging-232 January 8, 2026 01:52 — with GitHub Actions Inactive
@github-actions github-actions bot temporarily deployed to staging-232 January 8, 2026 01:52 Inactive
@IsaacPhoon IsaacPhoon merged commit d4133a7 into main Jan 8, 2026
1 check passed
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.

3 participants