-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Conversation
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. |
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.
Left a comment
Quality Gate passedIssues Measures |
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.
LGTM
…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>
Convert app/components/UI/BlockingActionModal/index.js to TypeScript
Changes Made
index.js
toindex.tsx
PropTypes
import and prop type definitionsBlockingActionModalProps
interface for component propsTheme
type from '../../../util/theme/models'colors
parameter increateStyles
functiononAnimationCompleted
prop optional to maintain compatibilityConnectQRHardware/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
isLoadingAction
is true.modalVisible
prop.Notes
onAnimationCompleted
prop was made optional to avoid unnecessary modifications to other files using this component.ConnectQRHardware/index.tsx
have been reverted to ensure this PR only contains intended changes related to the BlockingActionModal component.This Devin run was requested by Sampriti