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

feat: redesign update price and transfer item on gallery #4652

Merged
merged 16 commits into from
Jan 11, 2023

Conversation

preschian
Copy link
Member

@preschian preschian commented Jan 10, 2023

Thank you for your contribution to the KodaDot NFT gallery.

👇 _ Let's make a quick check before the contribution.

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
  • I've posted a screenshot of demonstrated change in this PR

Optional

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

Had issue bounty label?

  • Fill up your KSM address: Payout

Community participation

Screenshot 📸

  • My fix has changed something on UI; a screenshot is best to understand changes for others.

@netlify
Copy link

netlify bot commented Jan 10, 2023

Deploy Preview for koda-nuxt ready!

Name Link
🔨 Latest commit 34d5e48
🔍 Latest deploy log https://app.netlify.com/sites/koda-nuxt/deploys/63bee8fea5180b00081c2a8d
😎 Deploy Preview https://deploy-preview-4652--koda-nuxt.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 settings.

@preschian preschian marked this pull request as ready for review January 10, 2023 10:53
@preschian preschian requested a review from a team as a code owner January 10, 2023 10:53
@preschian preschian requested review from Jarsen136 and removed request for a team January 10, 2023 10:53
@roiLeo
Copy link
Contributor

roiLeo commented Jan 10, 2023

Hey!
I see you're writting some actions logic and I was wondering if it was really a good idea to have a switch case instead of a if statement?
Shouldn't it be moved to a file outside this component?

@preschian
Copy link
Member Author

if it was really a good idea to have a switch case instead of a if statement?

hhmm, I don't see any difference between switch-case or if statement for this case

Shouldn't it be moved to a file outside this component?

will consider it 👍

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.

Hello, please resolve code climate issues

I find useGalleryItemAction really hard to read

@vikiival
Copy link
Member

Last things:

  • how would you handle new chain ?

@preschian
Copy link
Member Author

I find useGalleryItemAction really hard to read

need your feedback about this, how about now? is it still not readable?

how would you handle new chain ?

first, I separate based on the key of Interaction
and then, build params based on chain
in case we want to add another chain for Interaction.List, put it inside here https://github.com/kodadot/nft-gallery/blob/feat/redesign-update-price/components/gallery/GalleryItemAction/GalleryItemActionType/useGalleryItemAction.ts#L43-L64
for example:

  if (item.urlPrefix === 'chain-name') {
    executeTransaction({
      cb: api.tx.something.any,
      arg: [chainResolver(any, name)],
      successMessage: item.successMessage,
      errorMessage: item.errorMessage,
    })
  }

@vikiival
Copy link
Member

kodadot/packages#89

@vikiival
Copy link
Member

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.

Code LGTM.

I would like to invite other pair of eyes for this

Copy link
Contributor

@Jarsen136 Jarsen136 left a comment

Choose a reason for hiding this comment

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

except for some new translations words, otherwise lgtm

@vikiival
Copy link
Member

@preschian please add translations and we can move it

@codeclimate
Copy link

codeclimate bot commented Jan 11, 2023

Code Climate has analyzed commit 34d5e48 and detected 0 issues on this pull request.

View more on Code Climate.

@vikiival vikiival merged commit 6223a9d into main Jan 11, 2023
@vikiival vikiival deleted the feat/redesign-update-price branch January 11, 2023 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Gallery Item Desktop - integrate list, transfer, and change price
4 participants