drive icon indicating copy to clipboard operation
drive copied to clipboard

Feature Request: More Responsive UI

Open Delte opened this issue 7 months ago • 1 comments

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:

  1. Implement Pagination/Infinite Scrolling
    • Backend: Update the drive.api.list.files endpoint to support limit , offset parameters.
      • 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.
  2. 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.
  3. 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/await or Promises in your frontend logic.

Describe alternatives you've considered

Additional context

Delte avatar May 30 '25 16:05 Delte