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

react-toolkit-table: customize paging labels #608

Merged
merged 5 commits into from
May 12, 2020
Merged

react-toolkit-table: customize paging labels #608

merged 5 commits into from
May 12, 2020

Conversation

xballoy
Copy link
Contributor

@xballoy xballoy commented May 11, 2020

Add customization of labels in Pager, Paging and Items

Pager

  • Add the following props: previousLabel, nextLabel and ofLabel
  • Use the current value as default to avoid breaking change
  • Update snapshots to have a version with and without this new props
  • Update storybook with this new props

Items

  • Add the following props: displayLabel and elementsLabel
  • Use the current value as default to avoid breaking change
  • Update snapshots to have a version with and without this new props
  • Update storybook with this new props

Paging

  • Refactor type PagingComponentProps to inherit of Pager and Items props. So it add the following props: previousLabel, nextLabel, ofLabel, displayLabel, elementsLabel and mode
  • Allow to use light mode with Paging
  • Update snapshots to have a version with and without this new props
  • Update storybook with this new props

Fixes #563

@guillaume-chervet @samuel-gomez

bernard-arnaud
bernard-arnaud previously approved these changes May 11, 2020
@bernard-arnaud
Copy link
Contributor

Maybe it's possible to add an i18n module in the future ? 🤔

Copy link
Contributor

@guillaumechervetaxa guillaumechervetaxa left a comment

Choose a reason for hiding this comment

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

very nice !

@xballoy
Copy link
Contributor Author

xballoy commented May 11, 2020

Should the default value be in French or English?

@samuel-gomez-axa
Copy link
Contributor

ça me parait bien l'anglais par défaut

@guillaumechervetaxa
Copy link
Contributor

guillaumechervetaxa commented May 11, 2020

Le français est mieu afin de ne pas avoir de breaking change. C'est aussi le français notre cible numéro 1.

Arnaud, le toolkit c'est mieu que le toolkit soit légé et ne gére pas le i18n. En tout cas pas dans les composants bas niveau :)

@xballoy xballoy changed the title react-toolkit-table: pager label in English react-toolkit-table: customize pager input May 11, 2020
@xballoy xballoy closed this May 11, 2020
@xballoy xballoy reopened this May 11, 2020
@xballoy xballoy marked this pull request as draft May 12, 2020 07:03
@xballoy xballoy changed the title react-toolkit-table: customize pager input react-toolkit-table: customize paging labels May 12, 2020
@xballoy xballoy marked this pull request as ready for review May 12, 2020 08:23
Copy link
Contributor

@guillaumechervetaxa guillaumechervetaxa left a comment

Choose a reason for hiding this comment

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

top

@youf-olivier youf-olivier merged commit 61a4642 into AxaFrance:master May 12, 2020
@xballoy xballoy deleted the feature/pagerLabelInEnglish branch May 12, 2020 15:49
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.

Paging labels should be customizable or translated with i18n automatically
6 participants