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

V3 calendar #629

Merged
merged 7 commits into from
Dec 11, 2024
Merged

V3 calendar #629

merged 7 commits into from
Dec 11, 2024

Conversation

qroll
Copy link
Contributor

@qroll qroll commented Dec 10, 2024

Changes

  • update internal calendar styles and day cell styles to match Figma
  • used by Calendar, DateInput, DateRangeInput, TimeSlotBarWeek and TimeSlotBarWeekView
  • switch TimeSlotBarWeekView to use DayCell and finally remove the legacy components from previous implementation
  • [delete] branch

known issue: the day view peeks out behind the month/year view on mobile date input. will be fixing separately as it may involve shifting some styles from parent to children

Screenshot 2024-12-10 at 6 34 36 PM

Comment on lines +30 to 57
case "hover-subtle":
color = Colour["bg-hover"];
borderColor = Colour["bg-hover"];
break;
case "hover-current":
color = V2_Color.Neutral[8];
border = `1px solid ${V2_Color.Primary(props)}`;
case "hover":
color = Colour["bg-hover-strong"];
borderColor = Colour["bg-hover-strong"];
break;
case "selected":
color = V2_Color.Accent.Light[5];
border = `1px solid ${V2_Color.Accent.Light[4](props)}`;
case "hover-outline":
color = Colour["bg-hover-subtle"];
borderColor = Colour["border-hover"];
break;
case "selected-outline":
color = V2_Color.Accent.Light[5];
border = `1px solid ${V2_Color.Primary(props)}`;
color = Colour["bg-selected"];
borderColor = Colour["border-selected"];
break;
case "overlap":
color = V2_Color.Accent.Light[4];
border = `1px solid ${V2_Color.Accent.Light[4](props)}`;
case "selected-outline-subtle":
color = Colour["bg-selected"];
borderColor = Colour["border-selected-subtle"];
break;
case "overlap-outline":
color = V2_Color.Accent.Light[4];
border = `1px solid ${V2_Color.Primary(props)}`;
case "selected-hover":
color = Colour["bg-selected-hover"];
// no border to give it an overlay effect
break;
case "selected-hover-outline":
color = Colour["bg-selected-hover"];
borderColor = Colour["border-selected-hover"];
break;
Copy link
Contributor

Choose a reason for hiding this comment

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

just wondering if it is possible to align with UX on the naming of various states?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

due to the different possible combinations of elements across components, and the modular implementation of the day cell, the naming of CellType can't be 1:1 with the elements. but UX has suggested to include a mapping in Figma to bridge this difference

src/shared/internal-calendar/week/week-day-cell.tsx Outdated Show resolved Hide resolved
@qroll qroll requested a review from weili-govtech December 11, 2024 07:00
@weili-govtech weili-govtech merged commit df4b326 into v3 Dec 11, 2024
1 check failed
@weili-govtech weili-govtech deleted the v3-calendar branch December 11, 2024 07:15
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.

2 participants