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 components refactoring #1062

Merged
merged 3 commits into from
Dec 14, 2024
Merged

Pagination components refactoring #1062

merged 3 commits into from
Dec 14, 2024

Conversation

jahow
Copy link
Collaborator

@jahow jahow commented Dec 12, 2024

Description

This PR is a refactoring aimed at simplifying and homogenizing pagination across the project:

  • a Paginable interface is introduced; any component that can handle pagination, be it async or sync, should implement this API
  • all pagination widgets were brought back into the ui/layout module, there's 4 of them (prev/next buttons, pagination dots, page numbers from the Editor and page selector from the organizations page in the Datahub)
  • all paginations widgets now use the Paginable API directly; this avoid redundant code in every component like it was before
  • all pagination widgets are grouped together in Storybook and use a mock paginable component
  • improved styling of the pagination buttons component to match the mockup:
    image

Architectural changes

Moved several components from ui/elements to ui/layout

Quality Assurance Checklist

  • Commit history is devoid of any merge commits and readable to facilitate reviews
  • If new logic ⚙️ is introduced: unit tests were added
  • If new user stories 🤏 are introduced: E2E tests were added
  • If new UI components 🕹️ are introduced: corresponding stories in Storybook were created
  • If breaking changes 🪚 are introduced: add the breaking change label
  • If bugs 🐞 are fixed: add the backport <release branch> label
  • The documentation website 📚 has received the love it deserves

Copy link
Contributor

github-actions bot commented Dec 12, 2024

Affected libs: feature-catalog, feature-record, feature-router, feature-search, feature-map, ui-elements, feature-notifications, feature-editor, ui-catalog, ui-search, ui-inputs, feature-dataviz, ui-layout,
Affected apps: datahub, metadata-editor, demo, webcomponents, map-viewer, search, datafeeder, metadata-converter,

  • 🚀 Build and deploy storybook and demo on GitHub Pages
  • 📦 Build and push affected docker images

Copy link
Contributor

github-actions bot commented Dec 12, 2024

📷 Screenshots are here!

@coveralls
Copy link

coveralls commented Dec 12, 2024

Coverage Status

coverage: 82.064% (+0.3%) from 81.783%
when pulling a42729d on simplify-pagination
into decc890 on main.

@jahow jahow force-pushed the simplify-pagination branch from eb23d36 to a42729d Compare December 12, 2024 13:43
Copy link
Contributor

github-actions bot commented Dec 13, 2024

GitHub Pages links:

  • (Documentation)[https://geonetwork.github.io/geonetwork-ui/simplify-pagination/docs/]
  • (Web components demo)[https://geonetwork.github.io/geonetwork-ui/simplify-pagination/demo/webcomponents/]
  • (UI components storybook)[https://geonetwork.github.io/geonetwork-ui/simplify-pagination/storybook/demo/]

@ronitjadhav
Copy link
Collaborator

Thanks @jahow , the pagination works as expected!!

@jahow jahow merged commit a6267b8 into main Dec 14, 2024
14 checks passed
@jahow jahow deleted the simplify-pagination branch December 14, 2024 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants