-
Notifications
You must be signed in to change notification settings - Fork 14
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
docs(PPDSC-2855) pagination documentation #694
docs(PPDSC-2855) pagination documentation #694
Conversation
You can preview these changes on: |
site/pages/components/pagination.tsx
Outdated
{ | ||
name: 'children', | ||
type: ['Exclude', '<React.ReactNode>', 'undefined'], | ||
description: 'Label and icon of the pagination item', | ||
required: true, | ||
}, |
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.
From what I can see in the code, this prop is not required
site/pages/components/pagination.tsx
Outdated
element: 'pagination', | ||
attribute: 'role', | ||
value: 'navigation', |
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.
It does not have a "role", by default it uses the nav
HTML tag which has an internal role of navigation.
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.
Let me check @mutebg
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.
You can just remove this item from the array
site/pages/components/pagination.tsx
Outdated
{ | ||
element: 'link', | ||
attribute: 'aria-current', | ||
value: 'current', |
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.
the value here is page
but is set only on the currently page.
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.
Let me check @mutebg
site/pages/components/pagination.tsx
Outdated
{ | ||
element: 'link', | ||
attribute: 'aria-disabled', | ||
value: 'false', |
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.
the value here is true
but is set only when the button is disabled
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.
Let me check @mutebg
site/pages/components/pagination.tsx
Outdated
}, | ||
{ | ||
name: 'buildHref', | ||
type: '(number) ⇒ string', |
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.
Small thing but below you are using =>
instead of ⇒
.
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.
Changed @mstuartf
site/pages/components/pagination.tsx
Outdated
required: false, | ||
}, | ||
{ | ||
name: 'eventContext = {}', |
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.
I don't think we need the = {}
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.
removed @mstuartf
site/pages/components/pagination.tsx
Outdated
componentDefaultsKey="pagination" | ||
meta={{ | ||
status: MetaStatus.Supported, | ||
introduced: 'v5.6.0', |
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.
this is from v7.1.0
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.
Done @mutebg
site/pages/components/pagination.tsx
Outdated
{ | ||
element: 'pagination', | ||
attribute: 'nav', | ||
value: 'navigation', | ||
description: ( | ||
<> | ||
Identifies major groups of links used for navigating through a | ||
website or page content{' '} | ||
<Link | ||
href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/Navigation_Role" | ||
target="_blank" | ||
> | ||
Learn more about the navigation role at MDN Web Docs | ||
</Link> | ||
</> | ||
), | ||
}, |
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.
What I meant is that you don't need this, can be deleted
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.
Completed @mutebg
PPDSC-2855
What
I have done:
I have tested manually:
Before:
After:
Who should review this PR:
How to test: