eclipse-tractusx / portal-shared-components

Portal Shared UI Components
https://eclipse-tractusx.github.io/portal-shared-components
Apache License 2.0
1 stars 11 forks source link

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

Open oyo opened 2 weeks ago

oyo commented 2 weeks ago

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

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.