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

Use automatic load-more-on-end-of-list instead of load-more button #286

Open
4 tasks
oyo opened this issue Aug 27, 2024 · 0 comments
Open
4 tasks

Use automatic load-more-on-end-of-list instead of load-more button #286

oyo opened this issue Aug 27, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@oyo
Copy link
Contributor

oyo commented Aug 27, 2024

Description

In the portal backend most API endpoints that return a list of items implement a paging concept loading only a fixed number of items at a time to avoid heavy server load and long loading times. On the frontend side we provide a PageLoadingTable which handles the loading. Currently at the end of the list there is a 'Load More' button to fetch the next page of items.
https://github.com/eclipse-tractusx/portal-shared-components/blob/main/src/components/basic/Table/PageLoadingTable.tsx#L142-L155

This concept of a manual trigger seems old-fashioned. We suggest a state of the art loading mechanism that automatically fetches the next page of items as the user is scrolling down, reaching the end of the list.

Acceptance Criteria

  • [load more button has been removed from the page loading table]
  • [next page fetch is triggered once the end of the table comes into view (ideally already a little bit before that)]
  • [a loading icon is shown while the fetch is in progress]
  • [if there are no more items no fetch must be triggered and no loading icon shown - instead a hint that all items have been loaded]

Additional Information

A loading mechanism like described has already been implemented as proof of concept in the Notification Center of the portal frontend
https://github.com/eclipse-tractusx/portal-frontend/blob/main/src/components/pages/NotificationCenter/NotificationPager.tsx
However that implementation is using the Redux application state which we have not in the shared components.

@oyo oyo added the enhancement New feature or request label Aug 27, 2024
@github-project-automation github-project-automation bot moved this to NEW USER REQUEST in Portal Aug 27, 2024
@MaximilianHauer MaximilianHauer moved this from NEW USER REQUEST to BACKLOG in Portal Aug 27, 2024
@MaximilianHauer MaximilianHauer self-assigned this Sep 13, 2024
@MaximilianHauer MaximilianHauer moved this from BACKLOG to IN PROGRESS in Portal Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: IN PROGRESS
Development

No branches or pull requests

2 participants