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] Introduce new component #19049

Merged
merged 66 commits into from
Feb 7, 2020
Merged

[Pagination] Introduce new component #19049

merged 66 commits into from
Feb 7, 2020

Conversation

mbrookes
Copy link
Member

@mbrookes mbrookes commented Dec 31, 2019

Preview: https://deploy-preview-19049--material-ui.netlify.com/components/pagination/.

Closes #18449

  • No tests (to follow once the API is stable) Some tests
  • No types (it's lab...)

@mbrookes mbrookes added the component: pagination This is the name of the generic UI component, not the React module! label Dec 31, 2019
@oliviertassinari oliviertassinari added the new feature New feature or request label Dec 31, 2019
@oliviertassinari oliviertassinari changed the title [Pagination] Add new component [Pagination] Introduce new component Dec 31, 2019
Copy link
Member

@oliviertassinari oliviertassinari left a comment

Choose a reason for hiding this comment

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

It's awesome to see the pagination component taking shape :)!

I have tried to focus the review on what's already implemented and not what's missing as it's a draft. I have updated #18449 (comment) with more items I think are important to complete the first batch, e.g. responsive handling.

  • Once we document the integration with react-router, I think that we should share somewhere that - /route should be preferred over /route?page=1 from an SEO perspective, it avoids one-page craw.
  • Something is not right with the style of the outlined disabled items. They are more "visible" than the outlined active items. I believe disabled items should fade behind the active ones.
  • For the prop types, if we can get the autogeneration from the TypeScript definitions, it will be perfect.

@szmslab, @iRyanBell given your past interest in the component, we would love to get your feedback on it, before it gets into the lab, and hopefully, in the core.

docs/src/pages/components/pagination/Pagination.js Outdated Show resolved Hide resolved
docs/src/pages/components/pagination/Pagination.js Outdated Show resolved Hide resolved
packages/material-ui-lab/src/Pagination/Pagination.js Outdated Show resolved Hide resolved
packages/material-ui-lab/src/Pagination/Pagination.js Outdated Show resolved Hide resolved
packages/material-ui-lab/src/Pagination/PaginationItem.js Outdated Show resolved Hide resolved
packages/material-ui-lab/src/Pagination/usePagination.js Outdated Show resolved Hide resolved
packages/material-ui-lab/src/Pagination/Pagination.js Outdated Show resolved Hide resolved
@mbrookes mbrookes force-pushed the pagination branch 4 times, most recently from 366caf2 to 3a882dc Compare January 14, 2020 18:40
Copy link
Member

@oliviertassinari oliviertassinari left a comment

Choose a reason for hiding this comment

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

It seems that we aren't too far away from the completion of the component 💃! I haven't commented on the design. I have some notes, but I think that it can come later. So, If I understand correctly. the main missing pieces are: l10n, TypeScript, tests.

docs/src/pages/components/pagination/Pagination.tsx Outdated Show resolved Hide resolved
docs/src/pages/components/pagination/PaginationLink.tsx Outdated Show resolved Hide resolved
docs/src/pages/components/pagination/PaginationLink2.js Outdated Show resolved Hide resolved
docs/src/pages/components/pagination/PaginationLink2.js Outdated Show resolved Hide resolved
docs/src/pages/components/pagination/PaginationLink2.js Outdated Show resolved Hide resolved
packages/material-ui-lab/src/Pagination/Pagination.js Outdated Show resolved Hide resolved
@mbrookes

This comment has been minimized.

@mbrookes mbrookes force-pushed the pagination branch 2 times, most recently from 46081cd to 8cbc072 Compare January 16, 2020 23:35
@mbrookes

This comment has been minimized.

Copy link
Member

@oliviertassinari oliviertassinari left a comment

Choose a reason for hiding this comment

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

A great step forward :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: pagination This is the name of the generic UI component, not the React module! new feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Pagination] Add new component
6 participants