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

chore: apply styles to the correct month #4151

Merged
merged 1 commit into from
Nov 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions web/src/components/ActivityCalendar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,10 @@ const ActivityCalendar = (props: Props) => {
"w-6 h-6 text-xs rounded-xl flex justify-center items-center border cursor-default",
"text-gray-400",
item.isCurrentMonth ? getCellAdditionalStyles(count, maxCount) : "opacity-60",
isToday && "border-zinc-400",
isSelected && "font-bold border-zinc-400",
!isToday && !isSelected && "border-transparent",
item.isCurrentMonth && isToday && "border-zinc-400",
item.isCurrentMonth && isSelected && "bg-success font-bold",
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we remove the bg-success from here. This is causing the date to indicate a memo is present event when there isn't one. With no memo there should only be a border set

expected:
image

this PR:
image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You are correct. In my custom implementation, the logic for isSelected was modified, and the styles were also adjusted accordingly. Apologies for overlooking this and causing issues. Please review this new submission. #4153

By the way, would it be possible to modify the way selectedDate is obtained? Based on the name of this variable, my understanding is that it should be set by selecting a date via a mouse click. However, obtaining it through props instead of state seems to prevent this variable from being updated by mouse clicks.

item.isCurrentMonth && !isToday && !isSelected && "border-transparent",
!item.isCurrentMonth && "border-transparent",
)}
onClick={() => count && onClick && onClick(date)}
>
Expand Down