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

Add showAllWeekdayLabels option to show all weekdays. #87

Closed

Conversation

panuhorsmalahti
Copy link

Copy link
Contributor

@evan-007 evan-007 left a comment

Choose a reason for hiding this comment

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

@panuhorsmalahti thanks for the PR and sorry it sat for so long. I like this implementation more than the one in #84 because it wouldn't be a breaking change. Can you look at the review comments and rebase master please and then we'll get this merged + released?

@@ -54,5 +54,8 @@
"rimraf": "^2.0.0",
"webpack": "^3.0.0",
"webpack-dev-server": "^2.0.0"
},
"jest": {
"testURL": "http://localhost"
Copy link
Contributor

Choose a reason for hiding this comment

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

can this be in jest.config.js instead?

const calendar = shallow(<CalendarHeatmap
startDate={dateNDaysAgo(7)}
values={[]}
showWeekdayLabels={true}
Copy link
Contributor

Choose a reason for hiding this comment

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

do you think folks should have to pass both showWeekdayLabels and showAllWeekdayLabels or should just showAllWeekdayLabels be enough? I like the idea of just passing showAllWeekdayLabels by itself rather than 2 props, I think you have to update this line https://github.com/patientslikeme/react-calendar-heatmap/pull/87/files#diff-73642d587163f2eb4d72f0fa6ebfba02L293 to make a single prop enough

@@ -333,6 +333,7 @@ CalendarHeatmap.propTypes = {
horizontal: PropTypes.bool, // whether to orient horizontally or vertically
showMonthLabels: PropTypes.bool, // whether to show month labels
showWeekdayLabels: PropTypes.bool, // whether to show weekday labels
showAllWeekdayLabels: PropTypes.bool, // whether to show all weekday labels
Copy link
Contributor

Choose a reason for hiding this comment

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

can you also document this prop in the readme?

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.

JSDom 11.12 causes SecurityError: localStorage is not available for opaque origins
2 participants