This repository has been archived by the owner on Jun 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 128
feat: add CodeSegment component with enhanced code snippets in ContractFunction #2673
Merged
+39
−9
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Your org requires the Graphite merge queue for merging into mainAdd 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. |
jnsdls
force-pushed
the
feat/add-abitype-integration
branch
from
June 15, 2024 04:15
de58cfe
to
32f600f
Compare
jnsdls
force-pushed
the
feat/expand-contract-function-capabilities
branch
from
June 15, 2024 04:16
d69ab15
to
614799b
Compare
joaquim-verges
approved these changes
Jun 15, 2024
Merge activity
|
…ctFunction (#2673) ### TL;DR Enhances the `ContractFunction` component by adding interactive code snippets for various environments, helping users utilize contract functions in their applications. ### What changed? - Added code snippets under `use this function in your app` section. - Introduced `CodeEnvironment` state to toggle between environments (e.g., JavaScript). - Added import for `CodeSegment`, `COMMANDS`, `formatSnippet`, and `CodeEnvironment`. - Removed console log statements and unused imports. ### How to test? - Verify that code snippets appear as expected for different contract functions. - Toggle between environments and ensure the correct code is displayed. ### Why make this change? Provides developers with ready-to-use code snippets, streamlining the integration process for contract functions into applications. --- <!-- start pr-codex --> --- ## PR-Codex overview The focus of this PR is to refactor code related to contract function execution and UI components in the contract overview tab. ### Detailed summary - Refactored code execution logic for contract functions - Added `CodeSegment` component for displaying code snippets - Updated function usage display in UI based on function type and state mutability > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
jnsdls
force-pushed
the
feat/add-abitype-integration
branch
from
June 15, 2024 04:28
32f600f
to
4faf636
Compare
jnsdls
force-pushed
the
feat/expand-contract-function-capabilities
branch
from
June 15, 2024 04:28
614799b
to
091ecf8
Compare
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
TL;DR
Enhances the
ContractFunction
component by adding interactive code snippets for various environments, helping users utilize contract functions in their applications.What changed?
use this function in your app
section.CodeEnvironment
state to toggle between environments (e.g., JavaScript).CodeSegment
,COMMANDS
,formatSnippet
, andCodeEnvironment
.How to test?
Why make this change?
Provides developers with ready-to-use code snippets, streamlining the integration process for contract functions into applications.
PR-Codex overview
The focus of this PR is to refactor code related to contract function execution and UI components.
Detailed summary
code-overview.tsx
onClick
function to handle contract function executionCodeSegment
component and related functions to display code snippets inContractFunction
component