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: Congratulations popup after buying an NFT is not availiable anymore? #7512

Merged
merged 8 commits into from
Oct 10, 2023

Conversation

hassnian
Copy link
Contributor

@hassnian hassnian commented Oct 5, 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

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;

CleanShot 2023-10-06 at 11 33 26@2x

Copilot Summary

🤖 Generated by Copilot at e4327e1

This pull request enhances the user feedback when buying an item from the gallery. It adds a MessageNotify component that shows a custom success message with the item names, and updates the Buy component and the useTransaction composable to support this feature. It also adjusts some styles and types to improve the UI and code quality.

🤖 Generated by Copilot at e4327e1

Buy component moved
Shows MessageNotify now
Autumn leaves of code

@netlify
Copy link

netlify bot commented Oct 5, 2023

Deploy Preview for nuxt-kodadot ready!

Name Link
🔨 Latest commit d2b75a7
🔍 Latest deploy log https://app.netlify.com/sites/nuxt-kodadot/deploys/651fa90715db340008a84fa7
😎 Deploy Preview https://deploy-preview-7512--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.

@kodabot
Copy link
Collaborator

kodabot commented Oct 5, 2023

SUCCESS @hassnian PR for issue #7336 which is assigned to you. Please wait for review and don't hesitate to grab another issue in the meantime!

@reviewpad
Copy link
Contributor

reviewpad bot commented Oct 5, 2023

AI-Generated Summary: This pull request mainly revolves around improving the buying notification feature within the application. It introduced changes in the Buy.vue component, MessageNotify.vue component and in the ExploreLayout.vue views, among others.

The MessageNotify.vue witnessed changes in the CSS for better position and visibility of the notification box. The Buy.vue component now emits a 'success' event when the transaction is finalized and a new null value for the 'successMessage' is introduced.

In types.ts, the 'successMessage' type was modified to allow 'null' values. Also, in useTransaction.ts, extra logic was added to take care of instances when 'successMessage' is null.

In ExploreLayout.vue, the 'Buy' component has been updated to handle a 'success' event by displaying a notification message summarizing the purchased items. Extra locales were also added in en.json to support this new functionality.

@hassnian hassnian changed the title add: explore layout buy notification fix: Congratulations popup after buying an NFT is not availiable anymore? Oct 5, 2023
@reviewpad reviewpad bot added the small Pull request is small label Oct 5, 2023
@hassnian hassnian marked this pull request as ready for review October 5, 2023 05:32
@hassnian hassnian requested a review from a team as a code owner October 5, 2023 05:32
@hassnian hassnian requested review from preschian and roiLeo and removed request for a team October 5, 2023 05:32
@hassnian
Copy link
Contributor Author

hassnian commented Oct 5, 2023

@roiLeo I'm substituting this popup and not showing the other notification , I think it does not make any sense to have both with the same info , what do you think ?

@@ -76,7 +80,7 @@ const handleBuy = async (nfts: TokenToBuy | TokenToBuy[]) => {
interaction: ShoppingActions.BUY,
nfts,
urlPrefix: urlPrefix.value,
successMessage: $i18n.t('mint.successNewNfts'),
successMessage: null,
Copy link
Member

Choose a reason for hiding this comment

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

What if we pass another parameter to trigger a bigger notification component instead of null?

Copy link
Contributor Author

@hassnian hassnian Oct 5, 2023

Choose a reason for hiding this comment

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

sure , good idea

layouts/explore-layout.vue Outdated Show resolved Hide resolved
@reviewpad reviewpad bot added medium Pull request is medium and removed small Pull request is small labels Oct 5, 2023
@prury prury requested a review from exezbcz October 5, 2023 18:13
@prury
Copy link
Member

prury commented Oct 5, 2023

it works now! tested on snek
QR button border a bit odd, can it be a square instead of rectangle?
image

@hassnian
Copy link
Contributor Author

hassnian commented Oct 6, 2023

@prury now it's squared :D

CleanShot 2023-10-06 at 11 18 41@2x

it was not missing there , but i spotted the old messages that are still there , will remove that (done)
CleanShot 2023-10-06 at 11 20 54@2x

feel free try again anywhere else where you can open the buy modal , cart , explore pages, collection , profile , etc , it's the same code so there should be no issue

@sonarcloud
Copy link

sonarcloud bot commented Oct 6, 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
No Duplication information No Duplication information

@prury
Copy link
Member

prury commented Oct 6, 2023

@prury now it's squared :D

CleanShot 2023-10-06 at 11 18 41@2x

it was not missing there , but i spotted the old messages that are still there , will remove that (done) CleanShot 2023-10-06 at 11 20 54@2x

feel free try again anywhere else where you can open the buy modal , cart , explore pages, collection , profile , etc , it's the same code so there should be no issue

oh, nice catch!

@prury
Copy link
Member

prury commented Oct 6, 2023

Perfect, ty @hassnian
image

@prury prury added the S-works-for-me-✅ qa-guild has tested PR from end user perspective and functionality worked label Oct 6, 2023
@prury prury self-requested a review October 6, 2023 12:33
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

Comment on lines +68 to +71
.is-squared {
width: 36px;
height: 36px;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe icon is the problem, can't we do withtout fixed size?

@yangwao
Copy link
Member

yangwao commented Oct 10, 2023

pay 30 usd

@yangwao yangwao merged commit 85ff19c into kodadot:nuxt Oct 10, 2023
9 of 12 checks passed
@yangwao
Copy link
Member

yangwao commented Oct 10, 2023

😍 Perfect, I’ve sent the payout
💵 $30 @ 3.82 USD/DOT ~ 7.853 $DOT
🧗 13QUj3pZyFNfYj4AM336hRdyLQbevj5H3sR4PKmLEXLdwZhh
🔗 0x6385575d192e71250d9ecbc2e3ce47f9f22626b917bbc8985d112c4b90cacc1b

🪅 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
@hassnian hassnian deleted the issue-7336 branch October 10, 2023 11:04
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.

Congratulations popup after buying an NFT is not availiable anymore?
7 participants