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

Programatic drops #7570

Merged
merged 25 commits into from
Oct 12, 2023
Merged

Programatic drops #7570

merged 25 commits into from
Oct 12, 2023

Conversation

Jarsen136
Copy link
Contributor

@Jarsen136 Jarsen136 commented Oct 10, 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 📸

  • My fix has changed UI
image

Copilot Summary

🤖 Generated by Copilot at f56cf48

No summary available (Limit exceeded: required to process 97572 tokens, but only 50000 are allowed per call)

🤖 Generated by Copilot at c5c0c36

Oh we're the crew of Kodadot, and we're sailing on the web
We're fetching drops and collections, from the useDrops hook
We're refactoring our components, to use the drop prop
And we're changing all the prefixes, from ahk to ahp

@kodabot
Copy link
Collaborator

kodabot commented Oct 10, 2023

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

@netlify
Copy link

netlify bot commented Oct 10, 2023

Deploy Preview for nuxt-kodadot ready!

Name Link
🔨 Latest commit aae485c
🔍 Latest deploy log https://app.netlify.com/sites/nuxt-kodadot/deploys/65257bb72f3a700008a8b387
😎 Deploy Preview https://deploy-preview-7570--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 10, 2023

AI-Generated Summary: This pull request came with a lot of modifications spread out on various sectors of the codebase. The primary focus of these changes seems to be the simplification and standardization of how drops are handled and displayed across the platform.

To summarize:

  1. Various .vue files saw significant refactoring, mainly concentrating on transitions from hard-coded variables to dynamic values coming from newly created prop drop which is an object of type DropItem. This change improves scalability, readability, and maintainability of the code.
  2. Code related to drop links as well as some layout features were updated or removed as part of the refactoring process.
  3. The way the Referendum Vote is checked was modified to be more flexible.
  4. The getDrops and getDropById functions were added to the 'waifu.ts' file, enhancing the functionality of fetching drops.
  5. There's been the introduction of two new type aliases, DropType and DropItem, in 'params/types', establishing a standardized way to refer and manage drop data across different components.
  6. Several files and constants for specific drop types were removed as part of this streamlining process, including certain pages and global redirect rules.
  7. A new Vue component was created to display different types of collection drops based on the dropType.
  8. The English locale file, en.json, received a new term 'Free', hinting at the introduction of a new feature.
  9. A make-shift amendment was made to the routing in way to redirect users to a new 'berlin-drop' page.
  10. The 'UnlockableCollectionBanner' component is no longer used and has been removed from several sections of the codebase.
  11. Improvements were made to the 'useDrops' function where it was entirely reworked so that it could load all drops on component mounting by running the getDrops function.
  12. Updates were made to the GraphQL query named referendumVoteByAccount's to include a new variable $proposal of type Number. This makes the query dynamic, more reusable and able to handle different proposal values instead of the hardcoded 93.

In all, this appears to be a substantial refactoring effort that shifts the platform towards a cleaner, more scalable code along with potentially some new features.

@reviewpad reviewpad bot added the large Pull request is large label Oct 10, 2023
@Jarsen136
Copy link
Contributor Author

image

Could you please add the preview env to the cors header? @vikiival

@Jarsen136 Jarsen136 marked this pull request as ready for review October 10, 2023 09:24
@Jarsen136 Jarsen136 requested a review from a team as a code owner October 10, 2023 09:24
@Jarsen136 Jarsen136 requested review from preschian, roiLeo and vikiival and removed request for a team October 10, 2023 09:24
@vikiival
Copy link
Member

Could you please add the preview env to the cors header? @vikiival

Updated ^-^

@yangwao
Copy link
Member

yangwao commented Oct 10, 2023

huge! looking forward to see this merged
pay 80 usd

@yangwao
Copy link
Member

yangwao commented Oct 10, 2023

😍 Perfect, I’ve sent the payout
💵 $80 @ 3.82 USD/DOT ~ 20.942 $DOT
🧗 16SjUbGKSdjCdWTy3NNT3JxbRVGGqD4mwkHpc6BD9U2Rp29Z
🔗 0x7d465f547af9806eedb3c32ed1c152c2f5e0537c650dd308788084c8d8b45100

🪅 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
@yangwao yangwao changed the base branch from nuxt to main October 10, 2023 16:37
@vikiival
Copy link
Member

Yup account is out of balance :) i will pass some tokens to it

@netlify
Copy link

netlify bot commented Oct 11, 2023

Deploy Preview for koda-canary ready!

Name Link
🔨 Latest commit dcbfbc1
🔍 Latest deploy log https://app.netlify.com/sites/koda-canary/deploys/6527a6c0150ae80008d5a24b
😎 Deploy Preview https://deploy-preview-7570--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.

Copy link
Contributor

@roiLeo roiLeo left a comment

Choose a reason for hiding this comment

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

otherwise code lgtm ✅

components/drops/DropCard.vue Outdated Show resolved Hide resolved
components/drops/DropCard.vue Outdated Show resolved Hide resolved
components/drops/useDrops.ts Show resolved Hide resolved
layouts/unlockable-mint-layout.vue Outdated Show resolved Hide resolved
pages/[prefix]/drops/[id].vue Show resolved Hide resolved
@roiLeo roiLeo added the S-code-lgtm-✅ code review guild has reviewed this PR and it's code is approved label Oct 12, 2023
Jarsen136 and others added 2 commits October 12, 2023 15:09
Co-authored-by: roiLeo <medina.leo42@gmail.com>
Co-authored-by: roiLeo <medina.leo42@gmail.com>
Jarsen136 and others added 3 commits October 12, 2023 15:18
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Copy link
Member

@preschian preschian left a comment

Choose a reason for hiding this comment

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

otherwise lgtm

pages/[prefix]/drops/[id].vue Outdated Show resolved Hide resolved
components/collection/drop/TokenImportButton.vue Outdated Show resolved Hide resolved
@codeclimate
Copy link

codeclimate bot commented Oct 12, 2023

Code Climate has analyzed commit dcbfbc1 and detected 1 issue on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 1

View more on Code Climate.

@sonarcloud
Copy link

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

@vikiival
Copy link
Member

It happens in canary env also. After some research, I found there are some errors on-chain. @vikiival Could you please take a look?

Updated with 60 DOT :)

@Jarsen136 Jarsen136 requested a review from prury October 12, 2023 11:32
@prury
Copy link
Member

prury commented Oct 12, 2023

Free drop fails when minting, but it was failing already on canary, lmk if new issue is needed
Dot drop working ✔️

@vikiival
Copy link
Member

Free drop fails when minting, but it was failing already on canary, lmk if new issue is needed

Maybe because 1 per addr rule?

@prury
Copy link
Member

prury commented Oct 12, 2023

Free drop fails when minting, but it was failing already on canary, lmk if new issue is needed

Maybe because 1 per addr rule?

tried with fresh account
edit: it was not so fresh, created another and it worked

@prury prury added S-works-for-me-✅ qa-guild has tested PR from end user perspective and functionality worked and removed S-changes-requested-🤞 PR is almost good to go, just some fine tunning labels Oct 12, 2023
@vikiival
Copy link
Member

Free drop fails when minting, but it was failing already on canary, lmk if new issue is needed

We should open issue for more friendly errors ^-^

@prury
Copy link
Member

prury commented Oct 12, 2023

Free drop fails when minting, but it was failing already on canary, lmk if new issue is needed

We should open issue for more friendly errors ^-^

uh, sorry, i did not understood what you mean

@vikiival vikiival merged commit 3a855eb into main Oct 12, 2023
13 of 14 checks passed
@vikiival vikiival deleted the issue-7194 branch October 12, 2023 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
large Pull request is large paid pull-request has been paid S-code-lgtm-✅ code review guild has reviewed this PR and it's code is approved 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.

Programatic drops
7 participants