nextcloud-libraries / nextcloud-libraries/nextcloud-upload

Optimize lots of previews rendering

Open
#920 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

performances
Dominant language
TypeScript
Stars
10
Forks
5
Avg merge
2d 10h
Merged PRs (30d)
14

Description

We could try to resize on demand, but that means we would have to generate the preview as we scroll.
https://github.com/nextcloud-libraries/nextcloud-upload/blob/260618850234c92c0327a747c561ec13eb2f016f/lib/components/NodesPicker.vue#L239-L263

Maybe using onload to fetchThePreview so that it gets replaced as we scroll with the lazy loading?
Or use an intersectObserver and trigger the preview Fetch 🤷

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in lib/components/NodesPicker.vue at lines 239-263 and inspect how previews are currently rendered and fetched. Compare the suggested onload and IntersectionObserver approaches for loading previews while scrolling. Done means large sets of previews render efficiently without fetching or generating every preview up front.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.