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

fix: rmrk2 fallback images #6903

Merged
merged 4 commits into from
Aug 23, 2023
Merged

fix: rmrk2 fallback images #6903

merged 4 commits into from
Aug 23, 2023

Conversation

preschian
Copy link
Member

@preschian preschian commented Aug 23, 2023

Thank you for your contribution to the KodaDot - One Stop Shop for Polkadot NFTs.

👇 __ Let's make a quick check before the contribution.

PR Type

  • Bugfix
  • Feature
  • Refactoring

Context

  • Fix rmrk2 images on gallery item
  • Fix popover images
  • Fix rmrk2 images on carousel

Did your issue had any of the "$" label on it?

Screenshot 📸

  • My fix has changed UI

Screenshot 2023-08-23 at 16-24-29 Andesaurus God #0004 KodaDot - NFT Market Explorer
Screenshot 2023-08-23 at 16-23-37 Andesaurus God #0004 KodaDot - NFT Market Explorer

Copilot Summary

🤖 Generated by Copilot at aae7f9b

This pull request improves the functionality and performance of the GalleryCard component and the useGalleryItem composable, by refactoring the code, fixing bugs, and adding a new meta property to the NftResources type. It also removes unused code and enhances the lazy loading of image data.

🤖 Generated by Copilot at aae7f9b

We'll fix the bugs and refactor the code, me hearties, yo ho!
We'll use the meta and the imageSrc, me hearties, yo ho!
We'll heave away on the count of three, and make the gallery shine
We'll use the sanitizeIpfsUrl and save some loading time

@netlify
Copy link

netlify bot commented Aug 23, 2023

Deploy Preview for koda-canary ready!

Name Link
🔨 Latest commit d5ed0b2
🔍 Latest deploy log https://app.netlify.com/sites/koda-canary/deploys/64e5d3c99bdd350008539707
😎 Deploy Preview https://deploy-preview-6903--koda-canary.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@reviewpad
Copy link
Contributor

reviewpad bot commented Aug 23, 2023

AI-Generated Summary: This pull request consists of three patches that concentrate on fixing issues related to the image handling and metadata processing in the gallery, carousel, and collections popover components.

The first patch focuses on the 'useGalleryItem.ts' component and the 'useNft.ts' file. Changes ensure images and animations from the NFT resources are correctly picked up and sanitized. Additionally, new metadata attributes were added for the NFT object in 'useNft.ts'.

The second patch modifies 'carousel.ts' and ensures the correct image source is used by adjusting the order of preference for which image to display in case of missing images.

The final patch revolves around the 'GalleryCard.vue' component. It adjusts the way metadata is processed and changes how images and titles are obtained and sanitized. It also introduced more flexibility by changing a number of properties to have default values and be optional.

@reviewpad reviewpad bot added the small Pull request is small label Aug 23, 2023
@reviewpad
Copy link
Contributor

reviewpad bot commented Aug 23, 2023

Reviewpad Report

⚠️ Warnings

  • Please link an issue to the pull request

@codeclimate
Copy link

codeclimate bot commented Aug 23, 2023

Code Climate has analyzed commit d5ed0b2 and detected 0 issues on this pull request.

View more on Code Climate.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@preschian preschian marked this pull request as ready for review August 23, 2023 09:47
@preschian preschian requested a review from a team as a code owner August 23, 2023 09:47
@preschian preschian requested review from vikiival and daiagi and removed request for a team August 23, 2023 09:47
Comment on lines +99 to +104
const imageSrc =
resource.meta?.animationUrl ||
resource.src ||
resource.meta?.image ||
resource.thumb

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not part of this PR for sure
but why do we have so many possible sources?

@vikiival

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because Bruno said so

counting days we will deprecate it

@yangwao
Copy link
Member

yangwao commented Aug 23, 2023

pay 50 usd

@yangwao yangwao merged commit 6b7b913 into main Aug 23, 2023
@yangwao yangwao deleted the fix/rmrk2-fallback-images branch August 23, 2023 10:58
@yangwao
Copy link
Member

yangwao commented Aug 23, 2023

😍 Perfect, I’ve sent the payout
💵 $50 @ 4.41 USD/DOT ~ 11.338 $DOT
🧗 1xjvRADwdJcnmUCLWerEHR4iGCT5EBTm4D4fzLLg4LcAC9p
🔗 0xbb07b41369dd7d305851c8147881c0d0fb8f9e50ad3dfdc139fd71ec530fbcac

🪅 Let’s grab another issue and get rewarded!
🪄 github.com/kodadot/nft-gallery/issues

@yangwao yangwao added the paid pull-request has been paid label Aug 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
paid pull-request has been paid small Pull request is small waiting-for-review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants