MetaMask / MetaMask/metamask-extension

[Typescript Conversion: Level 19]: Convert ui/components/ui/button/index.js to typescript

Open
#31,789 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

INVALID-ISSUE-TEMPLATE team-extension-platform
Dominant language
TypeScript
Stars
13.2k
Forks
5.6k
Avg merge
2d 5h
Merged PRs (30d)
451

Description

Description

Convert ui/components/ui/button/index.js from JavaScript to TypeScript as part of the TS migration initiative.

Scenario (for user stories only)

(Not applicable)

Design (for user stories only)

(Not applicable)

Technical Details (for technical tasks only)

  • Convert this file to TypeScript.
  • Migration Level: 19
  • Dependencies:
    • ui/components/ui/button/button.component.js
  • Dependents:
    • ui/components/app/alerts/invalid-custom-network-alert/invalid-custom-network-alert.js
    • ui/components/app/alerts/unconnected-account-alert/unconnected-account-alert.js
    • ui/components/app/cancel-button/cancel-button.js
    • ui/components/app/contact-list/contact-list.component.js
    • ui/components/app/detected-token/detected-token-selection-popover/detected-token-selection-popover.js
    • ui/components/app/flask/experimental-area/experimental-area.js
    • ui/components/app/home-notification/home-notification.component.js
    • ui/components/app/metamask-template-renderer/safe-component-list.js
    • ui/components/app/modal/modal.component.js
    • ui/components/app/modals/hide-token-confirmation-modal/hide-token-confirmation-modal.js
    • ui/components/app/recovery-phrase-reminder/recovery-phrase-reminder.js
    • ui/components/app/transaction-list-item-details/transaction-list-item-details.component.js
    • ui/components/app/transaction-list-item/transaction-list-item.component.js
    • ui/components/ui/button/button.stories.js
    • ui/components/ui/nickname-popover/nickname-popover.component.js
    • ui/components/ui/page-container/page-container-footer/page-container-footer.component.js
    • ui/components/ui/page-container/page-container-header/page-container-header.component.js
    • ui/components/ui/truncated-definition-list/truncated-definition-list.js
    • ui/components/ui/update-nickname-popover/update-nickname-popover.js
    • ui/pages/connected-sites/connected-sites.component.js
    • ui/pages/create-account/connect-hardware/account-list.js
    • ui/pages/home/home.component.js
    • ui/pages/keychains/restore-vault.js
    • ui/pages/onboarding-flow/create-password/create-password.js
    • ui/pages/onboarding-flow/import-srp/import-srp.js
    • ui/pages/onboarding-flow/onboarding-flow.js
    • ui/pages/onboarding-flow/pin-extension/pin-extension.js
    • ui/pages/onboarding-flow/privacy-settings/privacy-settings.js
    • ui/pages/onboarding-flow/recovery-phrase/confirm-recovery-phrase.js
    • ui/pages/onboarding-flow/recovery-phrase/review-recovery-phrase.js
    • ui/pages/onboarding-flow/secure-your-wallet/skip-srp-backup-popover.js
    • ui/pages/onboarding-flow/welcome/welcome.js
    • ui/pages/settings/advanced-tab/advanced-tab.component.js
    • ui/pages/settings/info-tab/info-tab.component.js
    • ui/pages/swaps/searchable-item-list/item-list/item-list.component.js
    • ui/pages/swaps/select-quote-popover/select-quote-popover.js
    • ui/pages/unlock-page/unlock-page.component.js

Threat Modeling Framework (for technical tasks only)

  • What are we working on? Convert file to TypeScript.
  • What can go wrong? Type errors, integration mismatches, missing types.
  • What are we going to do about it? Write types carefully and test thoroughly.
  • Did we do a good job? (To be evaluated)

Acceptance Criteria

  • File is fully converted to TypeScript.
  • Tests pass.
  • File adheres to linting rules.
  • Functionality remains unchanged.

Stakeholder Review (for MetaMask employees only)

  • Engineering
  • Design
  • Product
  • QA
  • Security
  • Legal
  • Marketing
  • Management
  • Other

References

  • Parent issue: #31460

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading ui/components/ui/button/index.js and its dependency ui/components/ui/button/button.component.js, then review the listed dependents for import or type expectations. Convert the file while preserving behavior, and run the relevant project tests and lint checks. Done means the file is TypeScript, all tests and linting pass, and functionality is unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
frontend
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.