Skip to content

Conversation

marcelltoth
Copy link
Contributor

@marcelltoth marcelltoth commented Jul 21, 2025

Description

Linked issue: #5744

Problem

See ticket.

Changes

I added a weekClassName prop to the Week component. I also added tests and a custom example.

Screenshots

image

To reviewers

I would personally make the function signature (date: Date) => string | undefined to allow the consumers to return undefined declaring that they do not want to add an extra class for this particular week.

To follow the convention here I decided to keep it as (date: Date) => string to be inline with what all the other classname functions are doing. Slightly less elegant but the callers can still opt out by returning an empty string I guess.

Contribution checklist

  • I have followed the contributing guidelines.
  • I have added sufficient test coverage for my changes.
  • I have formatted my code with Prettier and checked for linting issues with ESLint for code readability.

@martijnrusschen
Copy link
Member

Can you look into the failing test?

@martijnrusschen
Copy link
Member

Looks like a code formatting issue

@marcelltoth
Copy link
Contributor Author

Can you look into the failing test?

Hey @martijnrusschen, sure, I just pushed the fix.

Copy link

codecov bot commented Aug 9, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.13%. Comparing base (ec4ce2c) to head (0c82008).
⚠️ Report is 56 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5745   +/-   ##
=======================================
  Coverage   97.12%   97.13%           
=======================================
  Files          30       30           
  Lines        3374     3383    +9     
  Branches     1424     1429    +5     
=======================================
+ Hits         3277     3286    +9     
- Misses         95       97    +2     
+ Partials        2        0    -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@martijnrusschen martijnrusschen merged commit 9beb8c5 into Hacker0x01:main Aug 9, 2025
7 checks passed
@marcelltoth marcelltoth deleted the week-classname-support branch August 11, 2025 12:39
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