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: reduce network requests on explore/items #7481

Merged
merged 14 commits into from
Oct 4, 2023
Merged

Conversation

preschian
Copy link
Member

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

  • Closes Simplify queries on view pages #7464
  • switch prefetch network to distance
  • fix unused request from useNftMimeType()
  • fix getNftMetadata() for ahk/ahp
  • fix several console warnings on explore/items

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

Screenshot 📸

  • My fix has changed UI
before after
image image
Fetch/XHR: 644 Fetch/XHR: 16
Img: 302 Img: 56
  • Fetch/XHR is without sw (-is:service-worker-initiated -is:service-worker-intercepted)
  • Img is without 302 (-status-code:302)
before (nuxt) after
Screenshot 2023-10-03 173119 Screenshot 2023-10-03 173209

Copilot Summary

🤖 Generated by Copilot at f0f251e

This pull request improves the NFT gallery UI and functionality by using new components from the @kodadot1/brick UI library, adding support for animation files in NFT metadata, and refactoring some composables and components. It also applies some code style preferences and fixes to various files.

🤖 Generated by Copilot at f0f251e

NeoNftCard shines
With new props and animation
Skeleton in winter

@kodabot
Copy link
Collaborator

kodabot commented Oct 3, 2023

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

@netlify
Copy link

netlify bot commented Oct 3, 2023

Deploy Preview for nuxt-kodadot ready!

Name Link
🔨 Latest commit 75bbf48
🔍 Latest deploy log https://app.netlify.com/sites/nuxt-kodadot/deploys/651d36f18cd3c00008c050de
😎 Deploy Preview https://deploy-preview-7481--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 3, 2023

AI-Generated Summary: This pull request involves updates across various files, mainly focusing on refactoring bits of Vue components and TypeScript type definitions.

Significant updates include:

ItemsGrid.vue:

  • Changes to various conditions in the dynamic grid sections, modifying when certain elements are displayed.
  • Import of NeoNftCardSkeleton was added and NeoNftCard was removed.
  • updatePotentialNftsForListingCart function is now called asynchronously.

ItemsGridImage.vue:

  • Changes to ensure alt text is included for image accessibility.
  • The useNftCardIcon function now waits for promise resolution.

scheme.ts:

  • Added new properties animationUrl and mimeType to the NFTMetadata interface.
  • Slightly modified the argument lists of several functions.

useListInfiniteScroll.ts:

  • Changes provide additional parameters to the useInfiniteScroll function.

useNft.ts:

  • Modifications made to the useNftMimeType function.
  • Removed the immediately invoked watch function on nft.value.
  • Extensive changes to getNftMetadata function.

NeoButton.vue & NeoDropdown.vue:

  • Updates were made to allow these components to accept a wider range of types for certain props.

NeoNftCard.vue:

  • Minor syntax adjustments within the component's script setup and replaces use of ref for keeping track of variants with direct boolean checks in two computed properties.

In addition to these, there have been several minor syntax adjustments in various files for improved readability and the NeoNftCardSkeleton component has been created.

Overall, this pull request improves the readability and performance of the application.

@reviewpad reviewpad bot added the medium Pull request is medium label Oct 3, 2023
@preschian preschian marked this pull request as ready for review October 3, 2023 07:06
@preschian preschian requested a review from a team as a code owner October 3, 2023 07:06
@preschian preschian requested review from daiagi and prury and removed request for a team October 3, 2023 07:06
@daiagi
Copy link
Contributor

daiagi commented Oct 3, 2023

why all the commas?,

@preschian
Copy link
Member Author

why all the commas?,

my node modules still in this state #7477 when creating new branch

…kodadot/nft-gallery into fix/reduce-network-request
@prury prury requested a review from Jarsen136 October 3, 2023 12:08
@prury prury added the S-works-for-me-✅ qa-guild has tested PR from end user perspective and functionality worked label Oct 3, 2023
@roiLeo roiLeo merged commit f8f1453 into nuxt Oct 4, 2023
1 of 2 checks passed
@roiLeo roiLeo deleted the fix/reduce-network-request branch October 4, 2023 09:57
@sonarcloud
Copy link

sonarcloud bot commented Oct 4, 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

@yangwao, no payout for this PR? 🙈

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
medium Pull request is medium S-works-for-me-✅ qa-guild has tested PR from end user perspective and functionality worked waiting-for-review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Simplify queries on view pages
7 participants