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

feat(files): refactor thumbnails to lazy load #4004

Merged
merged 3 commits into from
Jul 18, 2022
Merged

Conversation

josephmcg
Copy link
Contributor

@josephmcg josephmcg commented Jul 15, 2022

What this PR does 📖

  • if thumbnail can be created, upload to ipfs as a separate file. previously, we were storing base64 thumbnail inside the index. They would typically max out at a few kb, but this makes the index much more lightweight. It wasn't scalable before
  • on delete, unpin both file and thumbnail (need to confirm this actually works, left todo)
  • on mount, pull thumbnail blob and create object url for display
    • revoke object url beforeDestroy to avoid memory leaks
  • add background color for blurred nsfw images, they were slightly translucent before
  • removed jsdoc from self explanatory computed
  • minor refactoring around upload logic to make it reusable for thumbnails

Which issue(s) this PR fixes 🔨
AP-1877

Special notes for reviewers 🗒️

Additional comments 🎤

@github-actions github-actions bot added the Missing Dev Review A Dev and a Dev Approver need to review the PR, then mark as Ready for QA label Jul 15, 2022
@WanderingHogan WanderingHogan merged commit 3c24842 into iridium-dev Jul 18, 2022
@WanderingHogan WanderingHogan deleted the AP1877 branch July 18, 2022 15:18
@github-actions github-actions bot removed the Missing Dev Review A Dev and a Dev Approver need to review the PR, then mark as Ready for QA label Jul 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants