Skip to content

Conversation

@GWSzeto
Copy link
Contributor

@GWSzeto GWSzeto commented Nov 12, 2024

https://linear.app/thirdweb/project/[modular-contracts]-modules-ui-c7a2be28299d/overview


PR-Codex overview

This PR focuses on improving the handling of mintable modules in the dashboard and thirdweb packages, specifically refining the conditions for checking roles and optimizing the URI handling for NFTs.

Detailed summary

  • Changed the condition in module-instance.tsx to check for "Mintable" instead of "Mintable-ignore".
  • Updated URI handling in mintWithRole.ts for both MintableERC721 and MintableERC1155 to check if NFTs are not empty before processing.
  • Refactored the use of hasAllRoles and grantRoles in Mintable.tsx for better role management.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@vercel
Copy link

vercel bot commented Nov 12, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 19, 2024 6:34pm
thirdweb_playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 19, 2024 6:34pm
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 19, 2024 6:34pm
wallet-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 19, 2024 6:34pm

@changeset-bot
Copy link

changeset-bot bot commented Nov 12, 2024

⚠️ No Changeset found

Latest commit: 55edd4c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@graphite-app
Copy link
Contributor

graphite-app bot commented Nov 12, 2024

Your org has enabled the Graphite merge queue for merging into main

Add the label “merge-queue” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix.

You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

@github-actions github-actions bot added Dashboard Involves changes to the Dashboard. packages labels Nov 12, 2024
@github-actions
Copy link
Contributor

github-actions bot commented Nov 12, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 44.9 KB (0%) 899 ms (0%) 3.7 s (+44.1% 🔺) 4.6 s
thirdweb (cjs) 105.02 KB (0%) 2.2 s (0%) 6.7 s (+7.19% 🔺) 8.8 s
thirdweb (minimal + tree-shaking) 5.61 KB (0%) 113 ms (0%) 419 ms (-8.19% 🔽) 531 ms
thirdweb/chains (tree-shaking) 506 B (0%) 10 ms (0%) 50 ms (-0.38% 🔽) 60 ms
thirdweb/react (minimal + tree-shaking) 18.41 KB (0%) 369 ms (0%) 455 ms (+24.13% 🔺) 823 ms

@codecov
Copy link

codecov bot commented Nov 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 45.52%. Comparing base (e0eea33) to head (55edd4c).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5404      +/-   ##
==========================================
- Coverage   45.53%   45.52%   -0.01%     
==========================================
  Files        1070     1070              
  Lines       55709    55715       +6     
  Branches     4031     4031              
==========================================
+ Hits        25365    25367       +2     
- Misses      29657    29661       +4     
  Partials      687      687              
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from e0eea33
packages 40.63% <100.00%> (-0.01%) ⬇️

*This pull request uses carry forward flags. Click here to find out more.

Files with missing lines Coverage Δ
...extensions/modules/MintableERC1155/mintWithRole.ts 100.00% <100.00%> (ø)
.../extensions/modules/MintableERC721/mintWithRole.ts 100.00% <100.00%> (ø)

... and 3 files with indirect coverage changes

---- 🚨 Try these New Features:

@gregfromstl gregfromstl changed the title Updated Mintable Modules [Dashboard] Feature: Updated Mintable Modules Nov 13, 2024
@gregfromstl
Copy link
Contributor

@GWSzeto is there an eng linear ticket for this? The one linked is under design and marked as completed. Sorry for being strict about this it just helps give context so we can review

Copy link
Member

@MananTank MananTank left a comment

Choose a reason for hiding this comment

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

please address comments

@GWSzeto GWSzeto enabled auto-merge (squash) November 19, 2024 18:17
@GWSzeto GWSzeto disabled auto-merge November 19, 2024 18:30
@GWSzeto GWSzeto added the merge-queue Adds the pull request to Graphite's merge queue. label Nov 19, 2024
Copy link
Contributor Author

GWSzeto commented Nov 19, 2024

Merge activity

  • Nov 19, 1:30 PM EST: The merge label 'merge-queue' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Nov 19, 1:30 PM EST: A user added this pull request to the Graphite merge queue.
  • Nov 19, 1:35 PM EST: A user merged this pull request with the Graphite merge queue.

https://linear.app/thirdweb/project/[modular-contracts]-modules-ui-c7a2be28299d/overview
<!-- start pr-codex -->

## PR-Codex overview
This PR focuses on enhancing the `Mintable` functionality in the dashboard and improving the handling of URIs in the `MintableERC721` and `MintableERC1155` modules. It also refines role management for minting processes.

### Detailed summary
- Changed the condition in `module-instance.tsx` to check for "Mintable" instead of "Mintable-ignore".
- Updated `mintWithRole.ts` in both `MintableERC721` and `MintableERC1155` to conditionally process `nfts` and set `baseURI`.
- Simplified import statements in `Mintable.tsx`.
- Modified `hasMinterRole` and `grantRoleTx` to use a more concise syntax for role checking and granting in `Mintable.tsx`.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Dashboard Involves changes to the Dashboard. merge-queue Adds the pull request to Graphite's merge queue. packages SDK Involves changes to the thirdweb SDK

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants