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

feat(layout-footer): use current year as default in copyright #639

Merged
merged 1 commit into from
Jun 19, 2020

Conversation

xballoy
Copy link
Contributor

@xballoy xballoy commented Jun 19, 2020

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

const defaultProps: Partial<FooterCoreComponentProps> = {
children: '@ 2018 AXA Tous droits réservés',
children: `© ${new Date().getFullYear()} AXA Tous droits réservés`,
Copy link
Contributor

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

Copy link
Contributor Author

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.

Copy link
Contributor

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 ?

Copy link
Contributor

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.

Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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...

Copy link
Contributor

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 ?

Copy link
Contributor Author

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.

Copy link
Contributor

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

@youf-olivier youf-olivier merged commit 5aec25b into master Jun 19, 2020
@delete-merged-branch delete-merged-branch bot deleted the feature/601-footer-default-current-year branch June 19, 2020 12:48
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.

Proposal - Footer must have actual year on footer bu default
4 participants