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

Pagination component #64

Open
riccardoperra opened this issue Aug 27, 2022 · 2 comments
Open

Pagination component #64

riccardoperra opened this issue Aug 27, 2022 · 2 comments

Comments

@riccardoperra
Copy link

I'm using @solid-aria and I noticed that the pagination primitives are not already ported. Reading through the react-aria source code it seems that everything needed to the pagination is already done, since there are already the button and locale primitives.

If possible I can work on it too😄

But one thing I didn't understand though is how to implement localized strings. It seems that they have a json with static translations for each language, but currently in this port there is not already a primitive that handles that. Should these string be handled by the consumer user in order to pass the aria-label prop?

https://github.com/adobe/react-spectrum/blob/main/packages/%40react-aria/pagination/intl/index.js

https://github.com/adobe/react-spectrum/blob/26b95c60e84a36ae8366b91f451b1b11d4819c73/packages/%40react-aria/pagination/src/usePagination.ts#L24

@fabien-ml
Copy link
Member

Hi, for the i18n i've not ported all @react-aria/i18n at once but only thing that i've used step by step.

To start port the pagination package you need to port useLocalizedStringFormatter from @react-aria/i18n first.

Then in pagination you can replace useControlledState by createControllableSignal from soild-aria.

You can fork the develop branch to start working and create a package by copying the template folder.

@fabien-ml
Copy link
Member

I'm using @solid-aria and I noticed that the pagination primitives are not already ported.

For the context @thetarnav is busy with solid-devtools, me with hope-ui and some personal things and we can't give soild-aria the amount of focus necessary to "get it right" at the moment.

So contribution are more than welcome.

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

No branches or pull requests

2 participants