-
Notifications
You must be signed in to change notification settings - Fork 20
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
Fix(components): EVM contract interaction filter #1241
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
6 Skipped Deployments
|
WalkthroughThis pull request updates the project documentation and refines the UI behavior for EVM contract interaction. A new changelog entry is added for bug fix issue #1241. In the ABI read and write components, the Accordion rendering logic now employs memoized filtering (via Changes
Sequence Diagram(s)sequenceDiagram
participant U as User
participant C as ABI Component
participant F as Filtering (useMemo)
participant A as Accordion Renderer
U->>C: Enter search keyword
C->>F: Filter ABI data (read/write)
F-->>C: Return filtered results
C->>A: Render Accordion with filtered entries
A-->>U: Display updated component
Possibly related PRs
Suggested reviewers
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure. 🔧 ESLint
src/lib/pages/evm-contract-details/components/interact-evm-contract/abi-read/index.tsxOops! Something went wrong! :( ESLint: 8.57.1 ESLint couldn't find the plugin "eslint-plugin-react". (The package "eslint-plugin-react" was not found when loaded as a Node module from the directory "".) It's likely that the plugin isn't installed correctly. Try reinstalling by running the following:
The plugin "eslint-plugin-react" was referenced from the config file in ".eslintrc.json". If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team. src/lib/pages/evm-contract-details/components/interact-evm-contract/abi-write/index.tsxOops! Something went wrong! :( ESLint: 8.57.1 ESLint couldn't find the plugin "eslint-plugin-react". (The package "eslint-plugin-react" was not found when loaded as a Node module from the directory "".) It's likely that the plugin isn't installed correctly. Try reinstalling by running the following:
The plugin "eslint-plugin-react" was referenced from the config file in ".eslintrc.json". If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team. Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
src/lib/pages/evm-contract-details/components/interact-evm-contract/abi-read/index.tsx (1)
59-61
: Consider refactoring the scrollIntoView workaround.The current implementation uses a timeout as a workaround. This could be improved by:
- Using a ResizeObserver to detect when the accordion item is fully rendered
- Using refs instead of querySelector
Would you like me to provide a refactored implementation that addresses these points?
src/lib/pages/evm-contract-details/components/interact-evm-contract/abi-write/index.tsx (1)
1-126
: Consider extracting common functionality into a base component.The
AbiWrite
andAbiRead
components share significant code duplication. Consider creating a base component to handle the common functionality:
- Search and filtering logic
- Expand/collapse functionality
- Accordion rendering
Would you like me to provide a refactored implementation that extracts the common functionality into a base component?
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
CHANGELOG.md
(1 hunks)src/lib/pages/evm-contract-details/components/interact-evm-contract/abi-read/index.tsx
(1 hunks)src/lib/pages/evm-contract-details/components/interact-evm-contract/abi-write/index.tsx
(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- CHANGELOG.md
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Analyze (javascript)
🔇 Additional comments (2)
src/lib/pages/evm-contract-details/components/interact-evm-contract/abi-read/index.tsx (1)
36-42
: LGTM! Performance optimization with useMemo.The implementation correctly memoizes the filtered results and handles case-insensitive search efficiently. The filtered results are properly used in the Accordion rendering.
Also applies to: 111-111
src/lib/pages/evm-contract-details/components/interact-evm-contract/abi-write/index.tsx (1)
36-42
: LGTM! Performance optimization with useMemo.The implementation correctly memoizes the filtered results and handles case-insensitive search efficiently. The filtered results are properly used in the Accordion rendering.
Also applies to: 111-111
Summary by CodeRabbit