Skip to content

Conversation

@kien-ngo
Copy link
Contributor

@kien-ngo kien-ngo commented Oct 23, 2024

image.png


PR-Codex overview

This PR enhances the user interface of the InteractiveAbiFunction and ContractFunctionInner components by adding badges to display output types and function state mutability. It also improves layout and introduces a copy button for function selectors.

Detailed summary

  • Added a Badge to display the Solidity output type in InteractiveAbiFunction.
  • Wrapped the output heading and badge in a div for better layout.
  • Introduced a CopyTextButton for copying the function selector in ContractFunctionInner.
  • Simplified layout structure in ContractFunctionInner for better alignment and responsiveness.

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

@vercel
Copy link

vercel bot commented Oct 23, 2024

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

Name Status Preview Comments Updated (UTC)
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 23, 2024 7:01pm
3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs-v2 ⬜️ Skipped (Inspect) Oct 23, 2024 7:01pm
thirdweb_playground ⬜️ Skipped (Inspect) Oct 23, 2024 7:01pm
wallet-ui ⬜️ Skipped (Inspect) Oct 23, 2024 7:01pm

@vercel vercel bot temporarily deployed to Preview – thirdweb_playground October 23, 2024 09:07 Inactive
@changeset-bot
Copy link

changeset-bot bot commented Oct 23, 2024

⚠️ No Changeset found

Latest commit: 4841ff3

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

@vercel vercel bot temporarily deployed to Preview – docs-v2 October 23, 2024 09:07 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui October 23, 2024 09:07 Inactive
@graphite-app
Copy link
Contributor

graphite-app bot commented Oct 23, 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 the Dashboard Involves changes to the Dashboard. label Oct 23, 2024
Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @kien-ngo and the rest of your teammates on Graphite Graphite

@kien-ngo kien-ngo marked this pull request as ready for review October 23, 2024 09:07
@codecov
Copy link

codecov bot commented Oct 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 45.43%. Comparing base (d580fe0) to head (4841ff3).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5138   +/-   ##
=======================================
  Coverage   45.43%   45.43%           
=======================================
  Files        1066     1066           
  Lines       55150    55150           
  Branches     3974     3974           
=======================================
  Hits        25055    25055           
  Misses      29403    29403           
  Partials      692      692           
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from d580fe0
packages 40.45% <ø> (ø)

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

<div className="flex flex-row items-center gap-2">
<Heading size="label.sm">Output</Heading>
{/* Show the Solidity type of the function's output */}
{abiFunction.outputs.length > 0 && (
Copy link
Contributor Author

Choose a reason for hiding this comment

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

is this the right way to retrieve a function's output? Since it's an array I'm not sure about my code here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

cc. @jnsdls

Copy link
Member

Choose a reason for hiding this comment

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

yes, a function MAY have multiple outputs, but usually this should be fine

@github-actions
Copy link
Contributor

github-actions bot commented Oct 23, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 42.81 KB (0%) 857 ms (0%) 3.1 s (+14.66% 🔺) 3.9 s
thirdweb (cjs) 102.66 KB (0%) 2.1 s (0%) 6.8 s (-8.48% 🔽) 8.9 s
thirdweb (minimal + tree-shaking) 4.84 KB (0%) 97 ms (0%) 320 ms (+145.82% 🔺) 417 ms
thirdweb/chains (tree-shaking) 498 B (0%) 10 ms (0%) 45 ms (-17.79% 🔽) 55 ms
thirdweb/react (minimal + tree-shaking) 17.33 KB (0%) 347 ms (0%) 421 ms (-60.17% 🔽) 767 ms

{fn.stateMutability}
</Badge>
{isFunction && <Badge variant="success">{fn.stateMutability}</Badge>}
{functionSelector && (
Copy link
Member

Choose a reason for hiding this comment

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

Not sure how helpful the function selector is, Deferring this to @jnsdls to decide whether this should be added or not

Copy link
Member

Choose a reason for hiding this comment

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

feels somewhat not that useful but also doesn't hurt - let's try it for a bit

{fn.stateMutability}
</Badge>
{isFunction && <Badge variant="success">{fn.stateMutability}</Badge>}
{functionSelector && (
Copy link
Member

Choose a reason for hiding this comment

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

feels somewhat not that useful but also doesn't hurt - let's try it for a bit

<div className="flex flex-row items-center gap-2">
<Heading size="label.sm">Output</Heading>
{/* Show the Solidity type of the function's output */}
{abiFunction.outputs.length > 0 && (
Copy link
Member

Choose a reason for hiding this comment

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

yes, a function MAY have multiple outputs, but usually this should be fine

@graphite-app
Copy link
Contributor

graphite-app bot commented Oct 23, 2024

Merge activity

@kien-ngo kien-ngo force-pushed the kien/add-badge-explorer branch from 3b5df1f to 4841ff3 Compare October 23, 2024 18:51
@vercel vercel bot temporarily deployed to Preview – docs-v2 October 23, 2024 18:51 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui October 23, 2024 18:51 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground October 23, 2024 18:51 Inactive
@graphite-app graphite-app bot merged commit 4841ff3 into main Oct 23, 2024
31 checks passed
@graphite-app graphite-app bot deleted the kien/add-badge-explorer branch October 23, 2024 19:01
@vercel vercel bot temporarily deployed to Production – wallet-ui October 23, 2024 19:01 Inactive
@vercel vercel bot temporarily deployed to Production – docs-v2 October 23, 2024 19:01 Inactive
@vercel vercel bot temporarily deployed to Production – thirdweb_playground October 23, 2024 19:01 Inactive
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants