Skip to content

Conversation

@kien-ngo
Copy link
Contributor

@kien-ngo kien-ngo commented Nov 2, 2024

image.png


PR-Codex overview

This PR introduces a new component, ContractFunctionComment, that fetches and displays comments for contract functions in a Solidity file. It enhances the ContractFunctionInner component by integrating the new functionality, improving user experience by providing additional context for contract functions.

Detailed summary

  • Added ContractFunctionComment component to fetch and display comments for contract functions.
  • Integrated ContractFunctionComment into ContractFunctionInner.
  • Utilized useContractSources to retrieve contract source data.
  • Implemented extractFunctionComment function to parse comments from Solidity code.
  • Used lazy loading for ContractFunctionComment to optimize performance.

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

@vercel
Copy link

vercel bot commented Nov 2, 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 Nov 5, 2024 6:58am
3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs-v2 ⬜️ Skipped (Inspect) Nov 5, 2024 6:58am
thirdweb_playground ⬜️ Skipped (Inspect) Nov 5, 2024 6:58am
wallet-ui ⬜️ Skipped (Inspect) Nov 5, 2024 6:58am

@vercel vercel bot temporarily deployed to Preview – docs-v2 November 2, 2024 15:04 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui November 2, 2024 15:04 Inactive
@changeset-bot
Copy link

changeset-bot bot commented Nov 2, 2024

⚠️ No Changeset found

Latest commit: 93a382b

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 – thirdweb_playground November 2, 2024 15:04 Inactive
@graphite-app
Copy link
Contributor

graphite-app bot commented Nov 2, 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 Nov 2, 2024
Copy link
Contributor Author

kien-ngo commented Nov 2, 2024

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 November 2, 2024 15:05
@kien-ngo kien-ngo force-pushed the kien/add-function-comment-to-block-explorer branch from ec5ff0a to 475e558 Compare November 2, 2024 15:06
@vercel vercel bot temporarily deployed to Preview – docs-v2 November 2, 2024 15:06 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui November 2, 2024 15:06 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground November 2, 2024 15:06 Inactive
@codecov
Copy link

codecov bot commented Nov 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 45.56%. Comparing base (0d23638) to head (93a382b).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5273   +/-   ##
=======================================
  Coverage   45.56%   45.56%           
=======================================
  Files        1067     1067           
  Lines       55487    55487           
  Branches     4030     4030           
=======================================
  Hits        25282    25282           
  Misses      29515    29515           
  Partials      690      690           
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from 0d23638
packages 40.65% <ø> (ø)

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

@github-actions
Copy link
Contributor

github-actions bot commented Nov 2, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 43 KB (0%) 861 ms (0%) 2.8 s (-18.67% 🔽) 3.7 s
thirdweb (cjs) 103 KB (0%) 2.1 s (0%) 5.2 s (+2.34% 🔺) 7.3 s
thirdweb (minimal + tree-shaking) 4.85 KB (0%) 97 ms (0%) 267 ms (+114.53% 🔺) 364 ms
thirdweb/chains (tree-shaking) 506 B (0%) 10 ms (0%) 43 ms (+1.81% 🔺) 53 ms
thirdweb/react (minimal + tree-shaking) 17.51 KB (0%) 351 ms (0%) 367 ms (-14.02% 🔽) 717 ms

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.

Deferring review to @jnsdls for this PR

@graphite-app
Copy link
Contributor

graphite-app bot commented Nov 5, 2024

Merge activity

![image.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/VtULqGKSp33n0VHOzNJK/0d2b9601-7778-4773-83e0-39ae17820bbe.png)

<!-- start pr-codex -->

---

## PR-Codex overview
This PR introduces a new component, `ContractFunctionComment`, which fetches and displays comments for contract functions. It also refactors the `contract-function.tsx` file to utilize this new component, improving the organization and clarity of the code.

### Detailed summary
- Added `ContractFunctionComment` component to fetch and display function comments.
- Integrated `ContractFunctionComment` into `ContractFunctionInner` in `contract-function.tsx`.
- Imported `lazy` from `react` for lazy loading of `ContractFunctionComment`.
- Implemented logic to extract comments from Solidity source code using regex.

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

<!-- end pr-codex -->
@jnsdls jnsdls force-pushed the kien/add-function-comment-to-block-explorer branch from 475e558 to 93a382b Compare November 5, 2024 06:47
@vercel vercel bot temporarily deployed to Preview – wallet-ui November 5, 2024 06:47 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 November 5, 2024 06:47 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground November 5, 2024 06:47 Inactive
@graphite-app graphite-app bot merged commit 93a382b into main Nov 5, 2024
31 of 32 checks passed
@graphite-app graphite-app bot deleted the kien/add-function-comment-to-block-explorer branch November 5, 2024 06:58
@vercel vercel bot temporarily deployed to Production – docs-v2 November 5, 2024 06:58 Inactive
@vercel vercel bot temporarily deployed to Production – thirdweb_playground November 5, 2024 06:58 Inactive
@vercel vercel bot temporarily deployed to Production – wallet-ui November 5, 2024 06:58 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