-
Notifications
You must be signed in to change notification settings - Fork 32
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
Hide paged items in Pagination component on narrow viewports #714
Conversation
…nt horizontal scrolling
🦋 Changeset detectedLatest commit: a28be6c The changes in this PR will be included in the next version bump. This PR includes changesets to release 6 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
🟢 No design token changes found |
@@ -76,6 +76,7 @@ describe('BreakoutBanner', () => { | |||
it('renders primary link with arrow by default', () => { | |||
const {getAllByRole} = render( | |||
<BreakoutBanner> | |||
<BreakoutBanner.Heading>Required heading</BreakoutBanner.Heading> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI: Unrelated to the pagination change. This fixes some noisy test logs.
🟢 No visual differences foundOur visual comparison tests did not find any differences in the UI. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! 👍
Summary
Resolves https://github.com/github/primer/issues/3744
Numbered pagination items are now hidden on narrow viewports by default. This prevents horizontal overflow / scrolling issues when a large number of items are present.
While the API already supports
showPages
, this enforces that behavior by default while retaining the option to customize it.🔗 Storybook preview
List of notable changes:
showPages
now undefined by default (prevtrue
)showPages
istrue
if viewport is >isMedium
showPages
continues to be customizable and forwarded by end-users (backwards compatible)What should reviewers focus on?
Steps to test:
Supporting resources (related issues, external links, etc):
Contributor checklist:
Reviewer checklist:
Screenshots: