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(BalanceInput): to compositionApi #6836

Merged
merged 2 commits into from
Aug 21, 2023

Conversation

stephenjason89
Copy link
Contributor

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 20, 2023 12:18
@stephenjason89 stephenjason89 requested review from roiLeo and Jarsen136 and removed request for a team August 20, 2023 12:18
@netlify
Copy link

netlify bot commented Aug 20, 2023

Deploy Preview for koda-canary ready!

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

AI-Generated Summary: This pull request refactors the BalanceInput component in Vue from the Options API to the Composition API. It replaces traditional watchers, computed properties, and properties with the respective Vue 3 equivalents (defineProps, ref, computed, watch, etc). Likewise, the mixin's functionality has been replaced with features provided by the Composition API. Additionally, Debounce decorator has been replaced with useDebounceFn from @vueuse/core. Finally, the code has been refactored to enhance readability and maintainability. Changes are not expected to affect functionality. Overall, the changes modernize the component to use the more efficient and flexible Composition API.

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

reviewpad bot commented Aug 20, 2023

Reviewpad Report

⚠️ Warnings

  • Please link an issue to the pull request

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

components/shared/BalanceInput.vue Outdated Show resolved Hide resolved
return value ? String(value * 10 ** this.decimals * this.selectedUnit) : '0'
}
const balance = ref(null)
const inputValue = computed({
Copy link
Contributor

Choose a reason for hiding this comment

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

useVmodel

Copy link
Contributor Author

@stephenjason89 stephenjason89 Aug 21, 2023

Choose a reason for hiding this comment

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

Hello, but we're not just emitting here. We are handling the set with handleInput.

Please let me know how you'd want me to use useVModel here

Thank you

@codeclimate
Copy link

codeclimate bot commented Aug 21, 2023

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

View more on Code Climate.

@sonarcloud
Copy link

sonarcloud bot commented Aug 21, 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 requested a review from prury August 21, 2023 13:33
@prury prury added the S-works-for-me-✅ qa-guild has tested PR from end user perspective and functionality worked label Aug 21, 2023
@yangwao
Copy link
Member

yangwao commented Aug 21, 2023

pay 50 usd

@yangwao yangwao merged commit 0bf60c3 into kodadot:main Aug 21, 2023
10 of 11 checks passed
@yangwao
Copy link
Member

yangwao commented Aug 21, 2023

😍 Perfect, I’ve sent the payout
💵 $50 @ 4.46 USD/DOT ~ 11.211 $DOT
🧗 16UcV9V6nVvPYdHz98ymUKmNLkzjCEU5sbKJMi7hxYyTHjzR
🔗 0x45874f33d4d2456fa8f5b96fb91b4a39fa167cf4da78d9f69fb805b0a154a275

🪅 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 21, 2023
@stephenjason89
Copy link
Contributor Author

Thanks @yangwao , you're the best ❤️

This was referenced Aug 21, 2023
@roiLeo roiLeo mentioned this pull request Aug 22, 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-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.

5 participants