-
Notifications
You must be signed in to change notification settings - Fork 61
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
feat(layout-footer): use current year as default in copyright #639
Conversation
const defaultProps: Partial<FooterCoreComponentProps> = { | ||
children: '@ 2018 AXA Tous droits réservés', | ||
children: `© ${new Date().getFullYear()} AXA Tous droits réservés`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You will need to inject children on stories in order to make storyshot working the next year, i think
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stories already inject children ;)
There's no snapshot change in with this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like your PR, but I think every projects every year will have tests broken on the next year.
I do not find a solution.
Do you have an idea ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a default prop, and update broken tests because we change year is not really a big issue for me.
And also, put 2018 by default is worse for me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or you just remove the year if you prefer, but in this case you will remove the year for many projects.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or we just put 2020 instead of 2018 by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you change the year manually every year, you might as well keep the script...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@samuel-gomez any idea or opinion ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But it's default props, I think we should use the script version and explain it in the changelog.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By default, it's better to use the script version. If the user wants to override it, he can
Use the current year as default value in the copyright of the footer instead of a fixed value (2018).
There is no need to override it by default.
Fixes #601