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: Sometimes Audio resources are shown as images #7517

Merged
merged 2 commits into from
Oct 10, 2023

Conversation

hassnian
Copy link
Contributor

@hassnian hassnian commented Oct 5, 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

use nft resource's animation url if animation url is not present for the first resource

test : https://deploy-preview-7517--nuxt-kodadot.netlify.app/ksm/gallery/14968743-3629a3ff458d113e25-MUSIC-MOOD-00000068

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

  • Fill up your DOT address: Payout

Community participation

Screenshot 📸

  • My fix has changed something on UI;

CleanShot 2023-10-05 at 16 27 32@2x

Copilot Summary

🤖 Generated by Copilot at ca87612

Enhanced the gallery item component to display animations for NFTs. Used the useGalleryItem hook to get the animation URL from the NFT metadata.

🤖 Generated by Copilot at ca87612

Sing, O Muse, of the skillful coder who improved the gallery
Of NFTs, those wondrous works of art that shine like stars
He used the index parameter, a clever tool, to find the first
And from the nftEntity.meta.animation_url he drew the motion of the image

@hassnian hassnian requested a review from a team as a code owner October 5, 2023 11:26
@hassnian hassnian requested review from preschian and Jarsen136 and removed request for a team October 5, 2023 11:26
@kodabot
Copy link
Collaborator

kodabot commented Oct 5, 2023

WARNING @hassnian PR for issue #7499 which isn't assigned to you. Please be warned that this PR may get rejected if there's another assignee for issue #7499

@netlify
Copy link

netlify bot commented Oct 5, 2023

Deploy Preview for nuxt-kodadot ready!

Name Link
🔨 Latest commit cbb5eb5
🔍 Latest deploy log https://app.netlify.com/sites/nuxt-kodadot/deploys/6523dbc316cddd000875e258
😎 Deploy Preview https://deploy-preview-7517--nuxt-kodadot.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 Oct 5, 2023

AI-Generated Summary: This pull request contains modifications to the useGalleryItem function in components/gallery/useGalleryItem.ts file. The changes are mainly adjustments on how resources are handled. Now, each resource's animation URL is fetched from the resource's metadata. If the animation URL is not found and it is the first resource, it falls back to using the animation URL from the parent NFT entity metadata. This equates to an enhancement in resource management, minimizing possible null or undefined issues related to the animationUrl field. Minor changes in object destructuring have also been implemented, and the animationUrl is now sanitized before being used.

@reviewpad reviewpad bot added small Pull request is small waiting-for-review labels Oct 5, 2023
@prury
Copy link
Member

prury commented Oct 5, 2023

nice find @hassnian , does it load there for you? the song

@hassnian
Copy link
Contributor Author

hassnian commented Oct 6, 2023

yep , icons are fixed here #7436

CleanShot.2023-10-06.at.09.53.55.mp4

@prury
Copy link
Member

prury commented Oct 6, 2023

yep , icons are fixed here #7436
CleanShot.2023-10-06.at.09.53.55.mp4

hmm, on chrome it loads and plays the song
but on firefox (loading icon never disappears):
image

ok, let's see if 7436 fixes it

@prury prury added the S-works-for-me-✅ qa-guild has tested PR from end user perspective and functionality worked label Oct 6, 2023
@prury prury self-requested a review October 6, 2023 12:42
@vikiival
Copy link
Member

vikiival commented Oct 9, 2023

Is the build failing?

Screenshot 2023-10-09 at 12 51 11

@sonarcloud
Copy link

sonarcloud bot commented Oct 9, 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
No Duplication information No Duplication information

@yangwao
Copy link
Member

yangwao commented Oct 10, 2023

builds

image

@yangwao
Copy link
Member

yangwao commented Oct 10, 2023

pay 20 usd

@yangwao yangwao merged commit 834cec1 into kodadot:nuxt Oct 10, 2023
11 checks passed
@yangwao
Copy link
Member

yangwao commented Oct 10, 2023

😍 Perfect, I’ve sent the payout
💵 $20 @ 3.82 USD/DOT ~ 5.236 $DOT
🧗 13QUj3pZyFNfYj4AM336hRdyLQbevj5H3sR4PKmLEXLdwZhh
🔗 0x57ea967f480f3bc71592cf31e85977d66149f3c4f5304f8866649262f06408d3

🪅 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 Oct 10, 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 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.

Sometimes Audio resources are shown as images
8 participants