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: adjust imageSrc on carousel component #6599

Merged
merged 10 commits into from
Aug 10, 2023
Merged

Conversation

preschian
Copy link
Member

@preschian preschian commented Aug 7, 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

Needs QA check

  • @kodadot/qa-guild please review

Context

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

Screenshot 📸

  1. fetch the original mime type in the carousel component

Screenshot 2023-08-07 165437

  1. add mediaUri to fetch metadata

Screenshot 2023-08-07 171425

  1. add "Animated Media" to the item description section and link to the public gateway to see original content

image

@kodabot
Copy link
Collaborator

kodabot commented Aug 7, 2023

SUCCESS @preschian PR for issue #5498 which is assigned to you. Please wait for review and don't hesitate to grab another issue in the meantime!

@kodabot
Copy link
Collaborator

kodabot commented Aug 7, 2023

SUCCESS @preschian PR for issue #6597 which is assigned to you. Please wait for review and don't hesitate to grab another issue in the meantime!

@netlify
Copy link

netlify bot commented Aug 7, 2023

Deploy Preview for koda-canary ready!

Name Link
🔨 Latest commit 3437765
🔍 Latest deploy log https://app.netlify.com/sites/koda-canary/deploys/64d4928ba692b60008ed74f3
😎 Deploy Preview https://deploy-preview-6599--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 7, 2023

AI-Generated Summary: This pull request introduces a series of changes across several components as well as libraries in the project. The changes can be summarised as:

  • [PATCH 1/3] The 'mime-type' element was removed from several components, such as CarouselMedia.vue, WalletAssetNfts.vue, GalleryItem.vue, GalleryItemDescription.vue, GalleryItemPreviewer.vue, MediaItem.vue, and NeoNftCard.vue. Several components were replaced with the MediaItem component from the project's library.
  • [PATCH 2/3] makes an amendment to the 'getProcessMetadata' function in the 'useNft.ts' file. It changes the 'image' variable to use both 'metadata.image' or 'metadata.mediaUri'.
  • [PATCH 3/3] introduces the new animated media feature, it also adds the use of the Cloudflare IPFS gateway for the application. This patch updates the GalleryItemDescription component, adds new translations, and adds a function 'toCloudflareIpfsUrl' to the 'ipfs.ts' utility function. It also handles fetching and setting the mime type for animation media.

In summary, these changes focus on the removal of 'mime-type' props from components, adding new features related to media and the use of the Cloudflare IPFS gateway.

@reviewpad reviewpad bot added the small Pull request is small label Aug 7, 2023
@vikiival
Copy link
Member

vikiival commented Aug 7, 2023

Hope this would work

@preschian preschian marked this pull request as ready for review August 8, 2023 08:45
@preschian preschian requested a review from a team as a code owner August 8, 2023 08:45
@preschian preschian requested review from vikiival and Jarsen136 and removed request for a team August 8, 2023 08:45
components/carousel/module/CarouselMedia.vue Show resolved Hide resolved
components/gallery/GalleryItemDescription.vue Outdated Show resolved Hide resolved
components/gallery/GalleryItemDescription.vue Outdated Show resolved Hide resolved
libs/ui/src/components/MediaItem/MediaItem.vue Outdated Show resolved Hide resolved
@yangwao
Copy link
Member

yangwao commented Aug 8, 2023

pay 50 usd

@yangwao
Copy link
Member

yangwao commented Aug 8, 2023

😍 Perfect, I’ve sent the payout
💵 $50 @ 5.05 USD/DOT ~ 9.901 $DOT
🧗 1xjvRADwdJcnmUCLWerEHR4iGCT5EBTm4D4fzLLg4LcAC9p
🔗 0x25dc29064185aeb416a4d824e5161039f489cd182228ca184161166dbb1b8480

🪅 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 8, 2023
@Jarsen136 Jarsen136 requested a review from prury August 9, 2023 12:33
@prury
Copy link
Member

prury commented Aug 9, 2023

so many questions:
so, the animation is still not going to be played, correct? we will just show the static image of the animation like we were doing before
shouldn't the Invarch access pass also have the animated media in the details?
why we treat a PNG as animated media?

apart from my questions, both the graffiti kid and the invarch access pass are showing properly on the explorer, although i could not reproduce yangwao problem with the evrloot nfts (nft name: Old rope).

@preschian preschian mentioned this pull request Aug 9, 2023
@preschian
Copy link
Member Author

so many questions:
so, the animation is still not going to be played, correct? we will just show the static image of the animation like we were doing before
shouldn't the Invarch access pass also have the animated media in the details?
why we treat a PNG as animated media?

yes, this is for explanation #6638

@prury
Copy link
Member

prury commented Aug 9, 2023

so many questions:
so, the animation is still not going to be played, correct? we will just show the static image of the animation like we were doing before
shouldn't the Invarch access pass also have the animated media in the details?
why we treat a PNG as animated media?

yes, this is for explanation #6638

wonderful, ty @preschian

can you check? https://deploy-preview-6599--koda-canary.netlify.app/ksm/gallery/15635794-54bbd380dc3baaa27b-EVRLOOT-ADVANCED_FISHINGROD-2

@preschian
Copy link
Member Author

can you check? deploy-preview-6599--koda-canary.netlify.app/ksm/gallery/15635794-54bbd380dc3baaa27b-EVRLOOT-ADVANCED_FISHINGROD-2

oohh I will check

I though that one is related to #5530 and #6051

@codeclimate
Copy link

codeclimate bot commented Aug 10, 2023

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

View more on Code Climate.

@preschian preschian changed the title fix: remove mimeType props fix: adjust imageSrc on carousel component Aug 10, 2023
@sonarcloud
Copy link

sonarcloud bot commented Aug 10, 2023

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
Copy link
Member Author

can you check? deploy-preview-6599--koda-canary.netlify.app/ksm/gallery/15635794-54bbd380dc3baaa27b-EVRLOOT-ADVANCED_FISHINGROD-2

I can only fix the "More from this collection" section

for this specific nft seems like from the indexer side. on rmrk2 at least need some resources. this nft meta.image and resources was empty
image

@prury
Copy link
Member

prury commented Aug 10, 2023

can you check? deploy-preview-6599--koda-canary.netlify.app/ksm/gallery/15635794-54bbd380dc3baaa27b-EVRLOOT-ADVANCED_FISHINGROD-2

I can only fix the "More from this collection" section

for this specific nft seems like from the indexer side. on rmrk2 at least need some resources. this nft meta.image and resources was empty image

its a rabbit hole! well, thanks for going trough this journey @preschian

@prury prury added the S-works-for-me-✅ qa-guild has tested PR from end user perspective and functionality worked label Aug 10, 2023
@yangwao yangwao merged commit b8c7eb3 into main Aug 10, 2023
13 of 17 checks passed
@yangwao yangwao deleted the fix/invalid-mime-type branch August 10, 2023 13:31
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 S-works-for-me-✅ qa-guild has tested PR from end user perspective and functionality worked small Pull request is small waiting-for-review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

VIdeo doesn't work on Statemine Unknown media on landing
7 participants