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

Refactor/decorator2 #6693

Merged
merged 11 commits into from
Aug 16, 2023
Merged

Refactor/decorator2 #6693

merged 11 commits into from
Aug 16, 2023

Conversation

stephenjason89
Copy link
Contributor

@stephenjason89 stephenjason89 commented Aug 13, 2023

PR Type

  • Bugfix
  • Feature
  • Refactoring

Context

Before submitting pull request, please make sure:

  • My contribution builds clean without any errors or warnings
  • I've merged recent default branch -- main and I've no conflicts
  • I've tried to respect high code quality standards
  • I've didn't break any original functionality

Optional

  • I've tested it at </ksm/collection>
  • I've tested PR on mobile
  • I've written unit tests 🧪
  • I've found edge cases

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; a screenshot is best to understand changes for others.

Copilot Summary

🤖 Generated by Copilot at 769abca

Refactored the code for opening the shopping cart modal from the navbar. Moved the logic and configuration from ShoppingCartModalConfig.ts and ShoppingCartButton.vue to Navbar.vue to improve code organization and performance.

🤖 Generated by Copilot at 769abca

ShoppingCartButton
Simpler, no more emit -
Autumn leaves falling

@stephenjason89 stephenjason89 requested a review from a team as a code owner August 13, 2023 12:32
@stephenjason89 stephenjason89 requested review from vikiival and Jarsen136 and removed request for a team August 13, 2023 12:32
@netlify
Copy link

netlify bot commented Aug 13, 2023

Deploy Preview for koda-canary ready!

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

AI-Generated Summary: This pull request consists of two patches both refactoring Vue.js components to use the Composition API. The first patch refactors the 'TokenBalanceInput' component, getting rid of the previous usage of mixins, modifying the structure of the script block, and creating a new composable 'useAsset' for shared logic. This new composable includes a 'getAssetById' method, which fetches the asset by its ID from the assets store.

The second patch refactors the 'MultiPaymentFeeButton' component, once again replacing mixins with the Vue.js Composition API. The component's various properties, including 'tokenId', 'asset', 'unit' and 'url', have been rewritten using 'computed' and 'ref' functions. The method 'fetchCurrency' has also been modified and now it is an async function. Observability on 'accountId' is established using the 'watch' function. The 'fetchCurrency' method is called when the 'accountId' changes. Overall, these changes improve readability, maintainability and promote code reusability across the Vue.js application.

@reviewpad reviewpad bot added medium Pull request is medium waiting-for-review labels Aug 13, 2023
@reviewpad
Copy link
Contributor

reviewpad bot commented Aug 13, 2023

Reviewpad Report

⚠️ Warnings

  • Please link an issue to the pull request

@roiLeo roiLeo self-requested a review August 13, 2023 17:11
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.

Small stuff. otherwise lgtm, tested on /snek

components/bsx/input/TokenBalanceInput.vue Outdated Show resolved Hide resolved
components/bsx/input/TokenBalanceInput.vue Show resolved Hide resolved
composables/useAsset.ts Outdated Show resolved Hide resolved
components/bsx/specific/MultiPaymentFeeButton.vue Outdated Show resolved Hide resolved
Copy link
Member

@vikiival vikiival left a comment

Choose a reason for hiding this comment

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

Nice Job!

@stephenjason89
Copy link
Contributor Author

Thank you @vikiival & @roiLeo for reviewing my PR.

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.

✅ code lgtm

@roiLeo roiLeo added the S-code-lgtm-✅ code review guild has reviewed this PR and it's code is approved label Aug 14, 2023
@prury prury added the S-works-for-me-✅ qa-guild has tested PR from end user perspective and functionality worked label Aug 14, 2023
@Jarsen136 Jarsen136 added the S-changes-requested-🤞 PR is almost good to go, just some fine tunning label Aug 14, 2023
@codeclimate
Copy link

codeclimate bot commented Aug 14, 2023

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

View more on Code Climate.

@sonarcloud
Copy link

sonarcloud bot commented Aug 14, 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

@Jarsen136 Jarsen136 removed the S-changes-requested-🤞 PR is almost good to go, just some fine tunning label Aug 15, 2023
@vikiival
Copy link
Member

@prury can I ask for a recheck one more time if validation works?

@yangwao
Copy link
Member

yangwao commented Aug 15, 2023

@stephenjason89 let's check deepscan

@prury
Copy link
Member

prury commented Aug 15, 2023

@prury can I ask for a recheck one more time if validation works?

on it!

@stephenjason89
Copy link
Contributor Author

stephenjason89 commented Aug 15, 2023

@stephenjason89 let's check deepscan

Sorry I am not familiar with deepscan very well. Can anyone please explain? I checked components/rmrk/Profile/Sales.vue but i don't know how it is connected with the files in this PR.

Or are these issues completely unrelated and you want me to see and fix? @yangwao
If that's the case, I'll hunt issues with deepscan really nice tool.

image

@prury
Copy link
Member

prury commented Aug 15, 2023

if it does what i think it does (refactor the part related to bsx assets and its balances and also the button to change asset fee on bsx) then it works 😄

https://basilisk.subscan.io/tx/0xd3a89e8a289a56677972b5c8fe600cead5e68df63c9fe7ad3f2cfdbc11821bdc

@stephenjason89
Copy link
Contributor Author

if it does what i think it does (refactor the part related to bsx assets and its balances and also the button to change asset fee on bsx) then it works 😄

https://basilisk.subscan.io/tx/0xd3a89e8a289a56677972b5c8fe600cead5e68df63c9fe7ad3f2cfdbc11821bdc

I don't understand the basilik scan btw. I just see a couple of transactions being made. I just recently started on this project so need more help @prury, would greatly appreciate if you can explain in more detail

Thank you

@yangwao
Copy link
Member

yangwao commented Aug 16, 2023

pay 50 usd

@yangwao yangwao merged commit eb10431 into kodadot:main Aug 16, 2023
11 checks passed
@yangwao
Copy link
Member

yangwao commented Aug 16, 2023

😍 Perfect, I’ve sent the payout
💵 $50 @ 4.78 USD/DOT ~ 10.46 $DOT
🧗 16UcV9V6nVvPYdHz98ymUKmNLkzjCEU5sbKJMi7hxYyTHjzR
🔗 0xe4c12d2e443dc979709e19365f6182ee89fa40501745a12d76d3b815b612c182

🪅 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 16, 2023
This was referenced Aug 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
medium Pull request is medium 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.

6 participants