Skip to content

refactor: move ContractMethodArrayButton to shared forms components#3297

Merged
isstuev merged 1 commit intomainfrom
fe-2462
Feb 27, 2026
Merged

refactor: move ContractMethodArrayButton to shared forms components#3297
isstuev merged 1 commit intomainfrom
fe-2462

Conversation

@isstuev
Copy link
Contributor

@isstuev isstuev commented Feb 25, 2026

Description and Related Issue(s)

Relocates ContractMethodArrayButton to ui/shared/forms/components/ArrayButton to allow reuse across the codebase, not just in contract method forms.
resolves #2462

@CodeRabbit review

Checklist for PR author

  • I have tested these changes locally.
  • I added tests to cover any new functionality, following this guide
  • Whenever I fix a bug, I include a regression test to ensure that the bug does not reappear silently.
  • If I have added a feature or functionality that is not privacy-compliant (e.g., tracking, analytics, third-party services), I have disabled it for private mode.
  • If I have added, changed, renamed, or removed an environment variable
    • I updated the list of environment variables in the documentation
    • I made the necessary changes to the validator script according to the guide
    • I added "ENVs" label to this pull request

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 25, 2026

Important

Review skipped

Auto reviews are disabled on this repository. To trigger a review, include @coderabbitai review in the PR description. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
ui/shared/forms/components/ArrayButton.tsx (1)

12-33: Clean refactor, component is now reusable.

The rename from ContractMethodArrayButton to ArrayButton makes this component appropriately generic for shared usage. The implementation logic remains unchanged and correct.

One optional consideration: the file name ArrayButton.tsx doesn't follow the kebab-case convention (array-button.tsx) specified in the coding guidelines. However, since this appears to be an existing naming pattern in the codebase, this can be addressed separately if desired.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@ui/shared/forms/components/ArrayButton.tsx` around lines 12 - 33, The
filename uses PascalCase (ArrayButton.tsx) but the repo prefers kebab-case;
rename the file to array-button.tsx and update all imports referencing
ArrayButton to the new filename, ensuring exports (default
React.memo(ArrayButton)) and component name ArrayButton remain unchanged so no
code changes inside the component are required.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@ui/shared/forms/components/ArrayButton.tsx`:
- Around line 12-33: The filename uses PascalCase (ArrayButton.tsx) but the repo
prefers kebab-case; rename the file to array-button.tsx and update all imports
referencing ArrayButton to the new filename, ensuring exports (default
React.memo(ArrayButton)) and component name ArrayButton remain unchanged so no
code changes inside the component are required.

ℹ️ Review info

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2202295 and eebff54.

📒 Files selected for processing (3)
  • ui/address/contract/methods/form/ContractMethodFieldAccordion.tsx
  • ui/address/contract/methods/form/ContractMethodFieldInputArray.tsx
  • ui/shared/forms/components/ArrayButton.tsx

@isstuev isstuev marked this pull request as ready for review February 27, 2026 13:14
@isstuev isstuev merged commit 4e102ca into main Feb 27, 2026
12 checks passed
@isstuev isstuev deleted the fe-2462 branch February 27, 2026 13:14
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
ui/address/contract/methods/form/ContractMethodFieldInputArray.tsx (1)

7-8: Minor: Extra blank line after import.

There appears to be an extra blank line after the ArrayButton import. Consider removing it for consistent import grouping.

🧹 Suggested cleanup
 import ArrayButton from 'ui/shared/forms/ArrayButton';
-
 import type { Props as AccordionProps } from './ContractMethodFieldAccordion';
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@ui/address/contract/methods/form/ContractMethodFieldInputArray.tsx` around
lines 7 - 8, Remove the stray blank line following the import of ArrayButton in
ContractMethodFieldInputArray.tsx so imports are consistently grouped; edit the
top of the file to have consecutive import statements (ensure the import
ArrayButton from 'ui/shared/forms/ArrayButton' sits directly with the other
imports).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@ui/address/contract/methods/form/ContractMethodFieldInputArray.tsx`:
- Around line 7-8: Remove the stray blank line following the import of
ArrayButton in ContractMethodFieldInputArray.tsx so imports are consistently
grouped; edit the top of the file to have consecutive import statements (ensure
the import ArrayButton from 'ui/shared/forms/ArrayButton' sits directly with the
other imports).

ℹ️ Review info

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c6a444d and 02e8991.

📒 Files selected for processing (3)
  • ui/address/contract/methods/form/ContractMethodFieldAccordion.tsx
  • ui/address/contract/methods/form/ContractMethodFieldInputArray.tsx
  • ui/shared/forms/ArrayButton.tsx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor ui/advancedFilter/filters/AddressFilter.tsx

1 participant