eui icon indicating copy to clipboard operation
eui copied to clipboard

[Pagination] components page number is not formated according to i18n

Open johannes-darms opened this issue 10 months ago β€’ 4 comments

Describe the bug The pagination component does not use i18n formatting for page numbers.

Impact and severity This is not a really big issue for users, but also a small change to improve pagination with large number of pages.

Environment and versions

  • EUI version: v99.9

To Reproduce cf. screenshot and snippet below (also active on the documentation page: https://eui.elastic.co/#/navigation/pagination )

Expected behavior Use i18n formatted values for pages. https://github.com/elastic/eui/blob/main/packages/eui/src/components/pagination/pagination_button.tsx#L35

Minimum reproducible sandbox

<EuiPagination
  pageCount={27000000000000}
  activePage={480000000000}
  />

Screenshots

Image

johannes-darms avatar Jan 17 '25 14:01 johannes-darms

Sorry @johannes-darms, we missed this one, just seeing it now. Thanks reporting it! We'll take a look and see if we can figure out what's going on.

JasonStoltz avatar May 09 '25 13:05 JasonStoltz

Hey @johannes-darms πŸ‘‹πŸ» I don't understand the expected behavior, could you elaborate? Do you image this component truncating the text?

weronikaolejniczak avatar Jun 06 '25 19:06 weronikaolejniczak

@weronikaolejniczak Normally, we try to use a thousand separator in larger numbers to improve readability. The symbol varies by locale β€” in English, we use a comma (,) as the separator, while in German it's a period (.).

However, this component currently doesn’t use the i18n module to format the number and simply renders the number unformatted. I’d like to suggest updating the component to format numbers according to the current locale using the appropriate internationalization settings.

johannes-darms avatar Jun 11 '25 09:06 johannes-darms

πŸ‘‹ Thank you for your suggestion or request! While the EUI team agrees that it's valid, it's unlikely that we will prioritize this issue on our roadmap. We'll leave the issue open if you or anyone else in the community wants to implement it by contributing to EUI. If not, this issue will auto close in one year.

github-actions[bot] avatar Jun 12 '25 13:06 github-actions[bot]