drive
drive copied to clipboard
Feature Request: More Responsive UI
Is your feature request related to a problem? Please describe.
- The app currently queries all files/folders for a directory at once and only updates the UI after fetching everything, which leads to perception of the app "hanging" when a folder contains many items.
- Fetching and rendering hundreds of items in a single response is expensive for both backend and frontend.
- The UI does not update until the full fetch is complete.
Describe the solution you'd like
- infinite scroll or paged buttons: pagination like Frappe listview 25/50/100 per page or infinite scroll with fetch and render files/folders in batches like each 50?.
- Incrementally update the UI as batches arrive, making the app feel fast and responsive.
Copilot answer to solve this:
-
Implement Pagination/Infinite Scrolling
-
Backend: Update the
drive.api.list.filesendpoint to supportlimit,offsetparameters.- Return, for example, only the first 50 files/folders, with the ability to request the next batch via the same endpoint.
-
Frontend:
- When opening a big folder, fetch and render the first batch immediately.
- As the user scrolls, fetch the next batches (infinite scroll) and append to the UI incrementally.
- This will make the folder appear nearly instantly and keep updating as more files arrive.
-
Backend: Update the
-
Placeholder Rendering
- Show a loading indicator or placeholder skeletons for the folder contents as soon as the folder is opened.
- As each batch arrives, replace placeholders with actual data.
-
Asynchronous Data Handling
- Use asynchronous rendering (with Vue's reactivity) to update the UI as soon as new items are fetched.
- You can leverage
async/awaitor Promises in your frontend logic.
Describe alternatives you've considered
Additional context