Background
We need to include the pagination as a customizable property in the Table's footer. The user will be able to hide/show this pagination according to each project's needs.
The pagination will consist of the following elements:
- Items per page selector
- Number of items indicator
- Page arrows
User story
As a user, I want to be able to look through data in an efficient, readable way
As a developer, I want to improve performance by fetching and displaying small portions of data at once
Design spec
Once a component spec sheet has been created in Figma, remove the note stating that the spec is missing and link to the spec below.
Component spec sheet |
Open questions
- Can the number of rows in the Select to be customizable by whoever is implementing the table?
- Are there performance concerns at a certain level of rows? e.g. Should we enforce a max? - When fetching data from the MediaWiki API, a limit of 50 items is enforced, so 50 seems like a sensible limit. This also appears to be the limit in TablePager.
- Is it possible to only show the text "rows" once, for the selected amount so we don't repeat it for every option? - Yes, this is possible with our Select component.
- Can the usage of this pagination be optional? - Yes - users will be able to turn on the default pagination we build into the Table component, or add their own custom pagination using the Table component's #footer slot.
Acceptance criteria (or Done)
Design
- Design the Figma spec sheet and add it in this task
- Update the component in the Figma library. This step will be done by a DST member.
- Document the Guidelines for this Table's pagination and include them in the Table's guidelines in Codex
Code
- Implement the component in Codex