Skip to content

feat: Custom pagination component based on design system

Paul Gascou-Vaillancourt requested to merge pagination into master

Related epic: &997

What does this MR do?

This is a rewrite of the pagination component.

Why is it needed?

Our design system describes a behaviour that seemingly can not be achieved with out current implementation which wraps BootstrapVue's pagination component.

What does it look like after these changes?

On large and medium viewports

Screen_Shot_2019-05-17_at_2.44.43_PM

Screen_Shot_2019-05-17_at_2.44.52_PM

Screen_Shot_2019-05-17_at_2.45.02_PM

On mobile and smaller viewports

Screen_Shot_2019-05-17_at_2.48.11_PM

Screen_Shot_2019-05-17_at_2.48.16_PM

Screen_Shot_2019-05-17_at_2.48.35_PM

Breaking changes

This MR brings some potentially breaking changes that should be considered when upgrading:

  • Dropped the underlying BootstrapVue's component
    • Dropped support for following props:
      • hide-goto-end-buttons
      • hide-ellipsis
      • limit, use responsive limits instead
      • first-text and last-text, use page-number slot instead
      • value, use page instead
      • total-rows, use total-items instead
      • aria-label and aria-controls are not exposed as props anymore but can still be set as normal attributes
  • The page and change props have been dropped in favor of v-model
    • The current page should be bound using v-model in the parent component
    • When the page changes, an input event is emitted
    • The page prop has been renamed to value and should not be bound directly in most cases

A follow up issue has been created to ensure nothing breaks in GitLab once gitlab-ui is updated there: https://gitlab.com/gitlab-org/gitlab-ce/issues/62097

Edited by Paul Gascou-Vaillancourt

Merge request reports