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: prevent the user from selecting more than 16 nfts #373

Merged
merged 16 commits into from
Nov 9, 2023

Conversation

patricio0312rev
Copy link
Contributor

[galleries] prevent users from selecting more than 16 NFTs

Summary

  • Now the user won't be able to select more than 16 NFTs to a gallery, even if they have been stored or they are being selected (since the limit is 16, we count the alreadyAddedNfts + recentlySelectedNfts to make sure this is <= than the limit).
  • NftImageContainer component has been refactored to support this change.
  • New unit test for this test case.
  • New translations for the tooltip message.

Steps to reproduce

  1. Run the app in local or testing_e2e mode.
  2. Make sure the wallet you are using for testing has more than 16 NFTs.
  3. Go to /galleries page and click on Create a gallery button.
  4. Select more than 16 NFTs (you can first add 3, then select other 13, the message considers both added and selected counts).
  5. Hover or try to click on the 17th NFT you wanted to add and see the magic ✨
Screen.Recording.2023-11-06.at.12.12.29.mov

Checklist

  • I checked my UI changes against the design and there are no notable differences
  • I checked my UI changes for any responsiveness issues
  • I checked my (code) changes for obvious issues, debug statements and commented code
  • I opened a corresponding card on Clickup for any remaining TODOs in my code
  • I added a short description on how to test this PR (if necessary)
  • I added a storybook entry for the component that was added (if necessary)
  • Documentation (if necessary)
  • Tests (if necessary)
  • Ready to be merged

@patricio0312rev patricio0312rev marked this pull request as ready for review November 6, 2023 17:16
@ItsANameToo ItsANameToo changed the title feat: prevent the user from selecting more than 16 nfts refactor: prevent the user from selecting more than 16 nfts Nov 7, 2023
@ItsANameToo ItsANameToo added this to the 0.11.0 milestone Nov 7, 2023
@shahin-hq shahin-hq self-assigned this Nov 7, 2023
@ItsANameToo ItsANameToo marked this pull request as draft November 7, 2023 12:44
@patricio0312rev patricio0312rev marked this pull request as ready for review November 7, 2023 17:47
@ItsANameToo ItsANameToo merged commit 5216783 into develop Nov 9, 2023
16 checks passed
@ItsANameToo ItsANameToo deleted the feat/prevent-selecting-more-than-16-nfts branch November 9, 2023 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants