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

🔧 bsx/snek offers composition api #6633

Merged
merged 6 commits into from
Aug 10, 2023

Conversation

roiLeo
Copy link
Contributor

@roiLeo roiLeo commented Aug 9, 2023

Screenshot 2023-08-09 at 13-50-12 KodaDot - NFT Market Explorer

note: I didn't test all features (looks like doesn't work on beta)

@roiLeo roiLeo requested a review from a team as a code owner August 9, 2023 11:51
@roiLeo roiLeo requested review from preschian and vikiival and removed request for a team August 9, 2023 11:51
@netlify
Copy link

netlify bot commented Aug 9, 2023

Deploy Preview for koda-canary ready!

Name Link
🔨 Latest commit 470fa10
🔍 Latest deploy log https://app.netlify.com/sites/koda-canary/deploys/64d49ece744db700088c4d44
😎 Deploy Preview https://deploy-preview-6633--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 9, 2023

AI-Generated Summary: This pull request involves a modification in 'Offer' functionality of an application and makes substantial changes in the 'MyOffer.vue' and 'OffersUserTable.vue' files. It primarily focuses on migrating from employing mixins for shared functionality towards using the composable approach in Vue.js codebase.

In 'MyOffer.vue', it replaces the older mixins with Vue Composition API logic, using functions including 'useMetaTransaction', 'useNuxtApp', 'usePrefix', and 'useAuth'. It also appears to modify the 'fetchMyOffers' function to make use of the Apollo client for querying data.

Regarding 'OffersUserTable.vue', this patch manages to replace the mixins with 'useMetaTransaction', 'usePrefix', 'useAuth' and 'useNuxtApp'. It also restructures the 'withdrawOffer' function to use Vue Composition API.

Additionally, it deletes the redundant 'offerMixin.ts' file that earlier defined shared mixin functionality across components.

These changes offer improved code readability and maintainability by using the composable pattern rather than mixins.

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

reviewpad bot commented Aug 9, 2023

Reviewpad Report

⚠️ Warnings

  • Please link an issue to the pull request

@prury
Copy link
Member

prury commented Aug 9, 2023

luckily i have some offers for testing purposes:

image

image

image

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.

Otherwise LGTM

Comment on lines 153 to 161
if (targetAddress.value) {
// $apollo.addSmartQuery<OfferResponse>('offers', {
// client: client.value,
// query: acceptableOfferByCurrentOwner,
// variables: { id: targetAddress.value },
// manual: true,
// result: ({ data }) => setResponse(data),
// pollInterval: 10000,
// })
Copy link
Member

Choose a reason for hiding this comment

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

how do you manage refreshing?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

shhh-shush

I don't.

Didn't we made something like this to refresh data on GalleryItem?

Copy link
Member

Choose a reason for hiding this comment

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

GalleryItem should be a separate data island

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Introducing manual refresh button

Screenshot 2023-08-10 at 10-24-08 KodaDot - NFT Market Explorer

@roiLeo roiLeo marked this pull request as draft August 9, 2023 13:51
@roiLeo
Copy link
Contributor Author

roiLeo commented Aug 9, 2023

luckily i have some offers for testing purposes:

Should be fixed now (I guess??)

Screenshot 2023-08-09 at 16-04-37 KodaDot - NFT Market Explorer

@roiLeo roiLeo marked this pull request as ready for review August 9, 2023 14:06
@prury
Copy link
Member

prury commented Aug 9, 2023

luckily i have some offers for testing purposes:

Should be fixed now (I guess??)

Screenshot 2023-08-09 at 16-04-37 KodaDot - NFT Market Explorer

yeee

image

@prury prury added the S-works-for-me-✅ qa-guild has tested PR from end user perspective and functionality worked label Aug 9, 2023
@codeclimate
Copy link

codeclimate bot commented Aug 10, 2023

Code Climate has analyzed commit 470fa10 and detected 0 issues on this pull request.

View more on Code Climate.

@sonarqubecloud
Copy link

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 1 Code Smell

No Coverage information No Coverage information
2.4% 2.4% Duplication

@yangwao yangwao merged commit 5f550e4 into kodadot:main Aug 10, 2023
@roiLeo roiLeo deleted the chore/remove/offermixin branch August 10, 2023 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
large Pull request is large 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.

4 participants