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/OnboardingScreenWithBg/index.js to TypeScript #11273

Merged
merged 8 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

Title: chore(js-ts): Convert app/components/UI/OnboardingScreenWithBg/index.js to TypeScript

Description:
This PR converts the OnboardingScreenWithBg component from JavaScript to TypeScript. The following changes have been made:

  1. Renamed index.js to index.tsx.
  2. Removed PropTypes and implemented TypeScript interfaces and types.
  3. Updated imports to include necessary types.
  4. Added type annotations to function parameters and variables.
  5. Created custom types for ImageKeys and ImagesType.
  6. Updated the component to use the new TypeScript types and interfaces.
  7. Removed the propTypes object and added JSDoc comments to the interface.
  8. Implemented null checks for the backgroundImage.

Key changes:

  • Converted colors parameter type in createStyles function to ThemeColors.
  • Created OnboardingScreenWithBgProps interface for component props.
  • Updated images object type to ImagesType.
  • Added type safety for the screen prop using ImageKeys type.

Checklist:

  • Converted JS file to TS
  • Updated types and added necessary imports
  • Ensured yarn tsc passes without errors
  • Ensured yarn lint passes without errors (warnings ignored as per criteria)
  • Added comments from old propTypes to the new interface

Link to Devin run: https://preview.devin.ai/devin/338aa8109dd94cdcac49824ec6878b80

This Devin run was requested by Sampriti.

Please review the changes and let me know if any further modifications are needed.

If you have any feedback, you can leave comments in the PR and I'll address them in the app!

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.

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 comments

Copy link

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 marked this pull request as ready for review September 23, 2024 20:07
@Cal-L Cal-L requested a review from a team as a code owner September 23, 2024 20:07
@Cal-L Cal-L added this pull request to the merge queue Sep 23, 2024
@Cal-L Cal-L removed this pull request from the merge queue due to a manual request Sep 23, 2024
@Cal-L Cal-L added the team-ai AI team (for the Devin AI bot) label Sep 23, 2024
github-actions bot pushed a commit that referenced this pull request Sep 23, 2024
…js to TypeScript (#11273)

Title: chore(js-ts): Convert
app/components/UI/OnboardingScreenWithBg/index.js to TypeScript

Description:
This PR converts the OnboardingScreenWithBg component from JavaScript to
TypeScript. The following changes have been made:

1. Renamed `index.js` to `index.tsx`.
2. Removed `PropTypes` and implemented TypeScript interfaces and types.
3. Updated imports to include necessary types.
4. Added type annotations to function parameters and variables.
5. Created custom types for `ImageKeys` and `ImagesType`.
6. Updated the component to use the new TypeScript types and interfaces.
7. Removed the `propTypes` object and added JSDoc comments to the
interface.
8. Implemented null checks for the `backgroundImage`.

Key changes:
- Converted `colors` parameter type in `createStyles` function to
`ThemeColors`.
- Created `OnboardingScreenWithBgProps` interface for component props.
- Updated `images` object type to `ImagesType`.
- Added type safety for the `screen` prop using `ImageKeys` type.

Checklist:
- [x] Converted JS file to TS
- [x] Updated types and added necessary imports
- [x] Ensured `yarn tsc` passes without errors
- [x] Ensured `yarn lint` passes without errors (warnings ignored as per
criteria)
- [x] Added comments from old `propTypes` to the new interface

Link to Devin run:
https://preview.devin.ai/devin/338aa8109dd94cdcac49824ec6878b80

This Devin run was requested by Sampriti.

Please review the changes and let me know if any further modifications
are needed.


If you have any feedback, you can leave comments in the PR and I'll
address them in the app!

---------

Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@Cal-L Cal-L added this pull request to the merge queue Sep 23, 2024
Merged via the queue into main with commit 6c2dddc Sep 23, 2024
37 of 39 checks passed
@Cal-L Cal-L deleted the convert-ts-OnboardingScreenWithBg-741 branch September 23, 2024 20:25
@github-actions github-actions bot locked and limited conversation to collaborators 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
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
None yet
Development

Successfully merging this pull request may close these issues.

3 participants