feat: add hide_weekend parameter for compact contribution calendar view#8186
Open
sudeekshaballanda-hub wants to merge 5 commits into
Open
feat: add hide_weekend parameter for compact contribution calendar view#8186sudeekshaballanda-hub wants to merge 5 commits into
sudeekshaballanda-hub wants to merge 5 commits into
Conversation
- Add hideWeekend parameter to chunkDaysIntoWeeks function - Filter out Saturday and Sunday when hideWeekend is true - Adjust week grouping logic for compact view - Pass hide_weekend from API route to calendar logic - Works alongside start_day parameter - Closes JhaSourav07#8073
Contributor
|
@sudeekshaballanda-hub is attempting to deploy a commit to the jhasourav07's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
This PR adds a valuable feature that enhances user experience by allowing customization of the contribution calendar view. It is similar to a previously validated decision to add a |
- Wrap currentWeek in contributionDays property to match ContributionWeek type - Resolves TypeScript error in production build
- Validate YYYY-MM-DD format - Filter out empty or invalid date strings - Ensure only valid dates are included in calendar - Fixes empty-fallback test failure
Contributor
📦 Next.js Bundle Size Report (Gzipped Sizes)
📊 Summary of Totals
|
Author
|
This PR is ready for review. I'm a GSSoC contributor working on this feature. All CI checks have passed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds a
?hide_weekend=trueURL parameter that collapses Saturday and Sunday columns from the contribution calendar, providing a compact work-week view.hide_weekendparameter filters out weekend days and adjusts the calendar layout to display only Monday-Friday (5 columns).start_dayparameter.Fixes #8073
Pillar
Visual Preview
The
hide_weekendparameter removes Saturday and Sunday columns, reducing the calendar from 7 columns to 5 columns for a compact work-week view.Example Usage:
Checklist before requesting a review:
CONTRIBUTING.mdfile.localhost:3000/api/streak?user=jhasourav07&hide_weekend=true).npm run formatandnpm run lintlocally and resolved all errors (CI will fail otherwise).feat(themes): ...,fix(calculate): ...).README.mdif I added a new theme or URL parameter.How to Test
/api/streak?user=jhasourav07→ 7 columns (Sun-Sat)/api/streak?user=jhasourav07&hide_weekend=true→ 5 columns (Mon-Fri)/api/streak?user=jhasourav07&start_day=1&hide_weekend=true→ 5 columns starting MondayTechnical Implementation
hideWeekendparameter tochunkDaysIntoWeeksfunction inlib/calculate.tshideWeekendis truehide_weekendfrom API route to calendar logicparamsobject for SVG generatorsCloses #8073