Skip to content
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

chore(js-ts): Convert app/components/UI/BlockingActionModal/index.js to TypeScript #11308

Merged
merged 5 commits into from
Sep 23, 2024

Conversation

devin-ai-integration[bot]
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot commented Sep 18, 2024

Convert app/components/UI/BlockingActionModal/index.js to TypeScript

Changes Made

  • Renamed index.js to index.tsx
  • Removed PropTypes import and prop type definitions
  • Defined BlockingActionModalProps interface for component props
  • Added type annotations for function parameters and variables
  • Imported Theme type from '../../../util/theme/models'
  • Added type for colors parameter in createStyles function
  • Made onAnimationCompleted prop optional to maintain compatibility
  • Reverted changes to ConnectQRHardware/index.tsx

Motivation

This change is part of our ongoing effort to migrate the codebase to TypeScript, improving type safety and developer experience.

Context

The BlockingActionModal component is used in various parts of the application to display a modal with a loading spinner. Converting it to TypeScript will help catch potential type-related errors and improve code maintainability.

Related Issues

N/A

Manual Testing Steps

  1. Verify that the BlockingActionModal component still functions correctly in all places it's used.
  2. Check that the loading spinner appears when isLoadingAction is true.
  3. Ensure that the modal shows and hides properly based on the modalVisible prop.

Notes

  • The onAnimationCompleted prop was made optional to avoid unnecessary modifications to other files using this component.
  • No changes were required in the component's logic or styling.
  • Changes to ConnectQRHardware/index.tsx have been reverted to ensure this PR only contains intended changes related to the BlockingActionModal component.
  • The scope of this PR is limited to the TypeScript conversion of BlockingActionModal.

This Devin run was requested by Sampriti

@devin-ai-integration devin-ai-integration bot requested a review from a team as a code owner September 18, 2024 21:59
Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@devin-ai-integration devin-ai-integration bot added needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) team-mobile-platform No QA Needed Apply this label when your PR does not need any QA effort. labels Sep 18, 2024
Copy link
Contributor

@Cal-L Cal-L left a comment

Choose a reason for hiding this comment

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

Left a comment

app/components/UI/BlockingActionModal/index.tsx Outdated Show resolved Hide resolved
Copy link

@sethkfman sethkfman added team-ai AI team (for the Devin AI bot) and removed team-mobile-platform labels Sep 19, 2024
Copy link
Contributor

@Cal-L Cal-L left a comment

Choose a reason for hiding this comment

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

LGTM

@Cal-L Cal-L added this pull request to the merge queue Sep 23, 2024
github-actions bot pushed a commit that referenced this pull request Sep 23, 2024
…to TypeScript (#11308)

# Convert app/components/UI/BlockingActionModal/index.js to TypeScript

## Changes Made
- Renamed `index.js` to `index.tsx`
- Removed `PropTypes` import and prop type definitions
- Defined `BlockingActionModalProps` interface for component props
- Added type annotations for function parameters and variables
- Imported `Theme` type from '../../../util/theme/models'
- Added type for `colors` parameter in `createStyles` function
- Made `onAnimationCompleted` prop optional to maintain compatibility
- Reverted changes to `ConnectQRHardware/index.tsx`

## Motivation
This change is part of our ongoing effort to migrate the codebase to
TypeScript, improving type safety and developer experience.

## Context
The BlockingActionModal component is used in various parts of the
application to display a modal with a loading spinner. Converting it to
TypeScript will help catch potential type-related errors and improve
code maintainability.

## Related Issues
N/A

## Manual Testing Steps
1. Verify that the BlockingActionModal component still functions
correctly in all places it's used.
2. Check that the loading spinner appears when `isLoadingAction` is
true.
3. Ensure that the modal shows and hides properly based on the
`modalVisible` prop.

## Notes
- The `onAnimationCompleted` prop was made optional to avoid unnecessary
modifications to other files using this component.
- No changes were required in the component's logic or styling.
- Changes to `ConnectQRHardware/index.tsx` have been reverted to ensure
this PR only contains intended changes related to the
BlockingActionModal component.
- The scope of this PR is limited to the TypeScript conversion of
BlockingActionModal.

[This Devin
run](https://preview.devin.ai/devin/37804c3c59094f18b33f6e10a3ab07e5)
was requested by Sampriti

---------

Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Merged via the queue into main with commit 1fcbf3c Sep 23, 2024
42 checks passed
@Cal-L Cal-L deleted the convert-ts-BlockingActionModal-562 branch September 23, 2024 20:25
@github-actions github-actions bot locked and limited conversation to collaborators Sep 23, 2024
@github-actions github-actions bot removed the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Sep 23, 2024
@metamaskbot metamaskbot added the release-7.33.0 Issue or pull request that will be included in release 7.33.0 label Sep 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
No QA Needed Apply this label when your PR does not need any QA effort. release-7.33.0 Issue or pull request that will be included in release 7.33.0 team-ai AI team (for the Devin AI bot)
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants