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

[TS migration] Migrate 'SettingsAppDownloadLinks' page to TypeScript #25175 #35890

Merged
merged 7 commits into from
Feb 19, 2024

Commits on Feb 5, 2024

  1. TS Migration Expensify#25175: Update and rename AppDownloadLinks.js t…

    …o AppDownloadLinks.tsx
    
    Updates related to Typescript Migration Expensify#25175. 
    
    -Migrated component to Typescript
    -Extended MenuItemProps type as DownloadMenuItem type
    -Typed menu items as an array of DownloadMenuItems
    -Removed withWindowDimensions/withLocalize PropTypes and compose() from export per guidelines on migration
    -Used Hooks for localize instead for translation
    -Removed _ in JSX mapping of menu items. Saw other TSX files that removes and I was getting ESLint warnings. _ is noted as a best practice but given other TSX files have removed I followed suit. I also saw old ESlint ignores being used when removing _ but I didn't get flagged without this.
    -Removed onKeyDown attribute and blur() from MenuItem. I saw this nowhere else in the codebase and the removal had no impact on app use functionality (please advise if there's something I am missing but it appeared antiquated)
    -This component receives props from Navigation but I do not see elsewhere in the codebase that we are explicitly listing these as props via typescript (navigation props should inherintly apply to all pages)
    -TS warnings made me list translationKey as type TranslationPaths (warning only appears when not providing the translate from useLocalize() with a '' - others working on TS migrations may want to know this)
    -No ESlint warnings
    -No VSCode warnings or errors
    -No errors when testing
    -Only issue was on iOS simulator there's no App Store app so it doesn't know how to handle the download iOS click but the link is fine and it works everywhere else.
    -No other components or other files in codebase import this file so change from .js to .tsx should not require changes to imports anywhere. This component is routed to via its name as with other pages in codebase.
    hkopser99 authored Feb 5, 2024
    Configuration menu
    Copy the full SHA
    73b15d0 View commit details
    Browse the repository at this point in the history

Commits on Feb 6, 2024

  1. Configuration menu
    Copy the full SHA
    3297913 View commit details
    Browse the repository at this point in the history

Commits on Feb 12, 2024

  1. Update AppDownloadLinks.tsx

    Moved Type declaration out of component scope.
    hkopser99 authored Feb 12, 2024
    Configuration menu
    Copy the full SHA
    8b90adf View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    472f3d7 View commit details
    Browse the repository at this point in the history

Commits on Feb 14, 2024

  1. Update AppDownloadLinks.tsx

    Amended openAppDownloadLink and downloadLink in DownloadMenuItem back to action and link.
    
    Returned to original, simplified logic for Navigation.goBack()
    hkopser99 authored Feb 14, 2024
    Configuration menu
    Copy the full SHA
    a3fbb23 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4ace68a View commit details
    Browse the repository at this point in the history

Commits on Feb 19, 2024

  1. Configuration menu
    Copy the full SHA
    235add7 View commit details
    Browse the repository at this point in the history