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: edit collection permission #11217

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open

Conversation

Jarsen136
Copy link
Contributor

@Jarsen136 Jarsen136 commented Dec 5, 2024

Thank you for your contribution to the Koda - Generative Art Marketplace.

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

PR Type

  • Feature

Needs QA check

  • @kodadot/qa-guild please review

Context

Screenshot 📸

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

ref: https://wiki.polkadot.network/docs/learn-nft-pallets

@Jarsen136 Jarsen136 requested a review from a team as a code owner December 5, 2024 13:34
@Jarsen136 Jarsen136 requested review from preschian and hassnian and removed request for a team December 5, 2024 13:34
Copy link

netlify bot commented Dec 5, 2024

Deploy Preview for koda-canary ready!

Name Link
🔨 Latest commit 3b0a555
🔍 Latest deploy log https://app.netlify.com/sites/koda-canary/deploys/6780fcbe404ab40008d1bc5f
😎 Deploy Preview https://deploy-preview-11217--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.

@Jarsen136 Jarsen136 requested a review from vikiival December 5, 2024 13:34
@vikiival
Copy link
Member

vikiival commented Dec 5, 2024

Please use normal price input

Screenshot 2024-12-05 at 16 00 05
Screenshot 2024-12-05 at 15 59 49

@Jarsen136
Copy link
Contributor Author

Please use normal price input

✅ Updated

Copy link
Member

@preschian preschian left a comment

Choose a reason for hiding this comment

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

nice, lgtm

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.

~ incorrect impl

  1. It does not make sense to have issuer & price :) (will you pay for yourself?)

  2. Setting public & set price > 0 means that you wont be able to mint on koda
    2.1 Warning that setting public will allow anyone to mint into your collection

  3. Holder of is missing search input where user can select which collection is eligible.
    3.1 Warning that by setting type to holder of user wont be able to mint on koda

Screenshot 2024-12-07 at 22 37 21

@Jarsen136
Copy link
Contributor Author

~ incorrect impl

  1. It does not make sense to have issuer & price :) (will you pay for yourself?)
  2. Setting public & set price > 0 means that you wont be able to mint on koda
    2.1 Warning that setting public will allow anyone to mint into your collection
  3. Holder of is missing search input where user can select which address is eligible.
    3.1 Warning that by setting type to holder of user wont be able to mint on koda

Thanks for providing more details.

A question about the holderOf type. You're talking about the address search input. Shouldn't it be an input of collection id? With this collection id, we could know if the user is the holder of collection A and is eligible to mint nft on collection B.
image

@vikiival
Copy link
Member

vikiival commented Dec 8, 2024

A question about the holderOf type. You're talking about the address search input. Shouldn't it be an input of collection id?

Yes, you are completely right, I apologize for my mistake. (I have edited the comment)

I meant

 search input where user can select which collection is eligible

Why search input?

Well if you take it from perspective of artist / @JustLuuuu they have no idea what collection Id is. (example https://koda.art/ahp/collection/258)
They do not know that this collection has id 258, but they do know that collection is called ANOMALY ^-^

@JustLuuuu
Copy link
Member

I know what a collection ID is! But its true that artists don't know it 😂

@Jarsen136
Copy link
Contributor Author

~ incorrect impl

  1. It does not make sense to have issuer & price :) (will you pay for yourself?)
  2. Setting public & set price > 0 means that you wont be able to mint on koda
    2.1 Warning that setting public will allow anyone to mint into your collection
  3. Holder of is missing search input where user can select which collection is eligible.
    3.1 Warning that by setting type to holder of user wont be able to mint on koda

Updated

image image image image

@hassnian
Copy link
Contributor

hassnian commented Dec 11, 2024

no price has been set but i can still submit, if the switch is not meant to be clickable we should hide it

CleanShot 2024-12-11 at 16 10 01@2x

after pressing save changes

CleanShot 2024-12-11 at 16 11 44@2x

@vikiival
Copy link
Member

#11217 (review)

  1. Setting public & set price > 0 means that you wont be able to mint on koda

I will try to rephrase as it is incorrectly implemented.

CleanShot 2024-12-11 at 16 10 01@2x

  • If you set price for public minting, you will not be able to mint in Koda.
  • Moreover anyone can mint into your collection

@Jarsen136
Copy link
Contributor Author

no price has been set but i can still submit, if the switch is not meant to be clickable we should hide it

It's meant to disable the switch when public is selected. I have hidden the switch now

after pressing save changes

In this case, I would disable the button.

@Jarsen136
Copy link
Contributor Author

#11217 (review)

  1. Setting public & set price > 0 means that you wont be able to mint on koda

I will try to rephrase as it is incorrectly implemented.

  • If you set price for public minting, you will not be able to mint in Koda.
  • Moreover anyone can mint into your collection

I'm not sure if I understand correctly. For the public type, should it allow the user to set zero price, or not?

Here is the current warning message implemented. Feel free to let me know how it is supposed to be. @vikiival
image
image

@Jarsen136 Jarsen136 requested a review from vikiival December 11, 2024 17:53
@Jarsen136
Copy link
Contributor Author

@vikiival Could you please take a look?

@vikiival
Copy link
Member

@vikiival Could you please take a look?

Yup
Can also @kodadot/internal-dev add review pls?

Copy link
Contributor

@hassnian hassnian left a comment

Choose a reason for hiding this comment

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

  1. holderOf - visual change

move the cross to the end of the container

  1. I can save changes even though no changes have been made with the selected mintType

I think changing mintType should clear the state of that mintType

CleanShot.2024-12-31.at.08.10.27.mp4
  1. holderOf , shouldn't the switch be reversed ?

active when price can be set
and off when not ?

CleanShot 2024-12-31 at 08 15 48

  1. public, error when saving changes
CleanShot.2024-12-31.at.08.20.05.mp4
  1. holderOf

Ideally a loading state when searching would be nice

CleanShot.2024-12-31.at.08.22.54.mp4

Copy link

netlify bot commented Dec 31, 2024

Deploy Preview for polkadot ready!

Name Link
🔨 Latest commit 9de8a8d
🔍 Latest deploy log https://app.netlify.com/sites/polkadot/deploys/6775534047b1ad0009c8945f
😎 Deploy Preview https://deploy-preview-11217--polkadot.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 16
Accessibility: 83
Best Practices: 83
SEO: 81
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@Jarsen136
Copy link
Contributor Author

  1. holderOf - visual change

move the cross to the end of the container

  1. I can save changes even though no changes have been made with the selected mintType

I think changing mintType should clear the state of that mintType

CleanShot.2024-12-31.at.08.10.27.mp4
3. holderOf , shouldn't the switch be reversed ?

active when price can be set and off when not ?

  1. public, error when saving changes

CleanShot.2024-12-31.at.08.20.05.mp4
5. holderOf

Ideally a loading state when searching would be nice

CleanShot.2024-12-31.at.08.22.54.mp4

Thanks for all the review comments! I have updated them and implemented them all. @hassnian

@Jarsen136 Jarsen136 requested a review from hassnian December 31, 2024 20:07
@exezbcz
Copy link
Member

exezbcz commented Jan 1, 2025

hey there, looking good, I would only change the logic of the input a bit

image image

default is toggle off

Or do we want people to fill out specific price? Then it would make more sense to toggle it on by default.

@Jarsen136
Copy link
Contributor Author

Jarsen136 commented Jan 1, 2025

hey there, looking good, I would only change the logic of the input a bit

image image
default is toggle off

Or do we want people to fill out specific price? Then it would make more sense to toggle it on by default.

It depends on which type the collection is.

There are three types of collection

  1. public -> It has to set the price
image
  1. issuer -> It can't set the price
image
  1. holderOf -> It could have a price or not. In this case, it defaults off unless a price is already set on chain.
image

@exezbcz
Copy link
Member

exezbcz commented Jan 1, 2025

@Jarsen136 this looks good, seems like i have seen older version or it was the holder of version that did not look right with the double negative, hassnians comment described it #11217 (review)

thank you for this overview

only change is the copy then:
specify the price of the items -> Set specific price

as its a bit cleaner

@Jarsen136
Copy link
Contributor Author

@Jarsen136 this looks good, seems like i have seen older version or it was the holder of version that did not look right with the double negative, hassnians comment described it #11217 (review)

thank you for this overview

only change is the copy then: specify the price of the items -> Set specific price

as its a bit cleaner

Thanks! The copy has been updated
image

Copy link
Contributor

@hassnian hassnian left a comment

Choose a reason for hiding this comment

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

Nice! , small stuff

components/collection/EditModal.vue Outdated Show resolved Hide resolved
components/collection/EditModal.vue Outdated Show resolved Hide resolved
components/collection/EditModal.vue Outdated Show resolved Hide resolved
components/collection/EditModal.vue Outdated Show resolved Hide resolved
components/collection/SearchInput.vue Outdated Show resolved Hide resolved
composables/transaction/types.ts Outdated Show resolved Hide resolved
@hassnian hassnian added the S-works-for-me-✅ qa-guild has tested PR from end user perspective and functionality worked label Jan 2, 2025
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-visual-ok-✅ S-works-for-me-✅ qa-guild has tested PR from end user perspective and functionality worked
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Collection Edit: Support Permissions Update
6 participants