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

Update App to React Native 0.72 version #18507

Merged
merged 55 commits into from
Aug 2, 2023

Conversation

fabioh8010
Copy link
Contributor

@fabioh8010 fabioh8010 commented May 5, 2023

Details

This PR aims to update Expensify's App to use our RN 0.72 fork. Some changes were made in order to follow upgrading from previous RN version to current one, following this steps.

SLACK DISCUSSION THREAD: https://expensify.slack.com/archives/C01GTK53T8Q/p1683321604215369

Patches created and corresponding upstream PRs

Fixed Issues

$ #18444
$ #21308
PROPOSAL: -

Tests

Full regression test

  • Verify that no errors appear in the JS console

Offline tests

Same as above.

QA Steps

Same as above.

  • Verify that no errors appear in the JS console

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android / native
    • Android / Chrome
    • iOS / native
    • iOS / Safari
    • MacOS / Chrome / Safari
    • MacOS / Desktop
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I followed proper code patterns (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
    • I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
      • If any non-english text was added/modified, I verified the translation was requested/reviewed in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
  • I verified that if a function's arguments changed that all usages have also been updated correctly
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately and each prop has a /** comment above it */
    • The file is named correctly
    • The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • The only data being stored in the state is data necessary for rendering and nothing else
    • For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
    • Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
    • All JSX used for rendering exists in the render method
    • The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
  • I have checked off every checkbox in the PR author checklist, including those that don't apply to this PR.

Screenshots/Videos

Web
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android

@fabioh8010 fabioh8010 requested a review from a team as a code owner May 5, 2023 20:17
@melvin-bot melvin-bot bot requested review from aimane-chnaif and MariaHCD and removed request for a team May 5, 2023 20:17
@melvin-bot
Copy link

melvin-bot bot commented May 5, 2023

@aimane-chnaif @MariaHCD One of you needs to copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

@fabioh8010
Copy link
Contributor Author

Update

✅ Web and Desktop builds are working at a first glance.

❌ Android and iOS builds are totally broken.

Trying to run npm run android or npm run ios will lead to error: unknown command 'run-android' and error: unknown command 'run-ios' errors respectively. Trying to run pod install will lead to errors too, complaining about missing files (Error: Cannot find module 'react-native/scripts/react_native_pods.rb').

After some investigation, it seems that v0.72.0-rc.1-alpha.0 release is broken. First evidence is that it is incredibly small (only 27 MBs) compared to previous one. Second evidence is that its source files are wrong, missing files and scripts necessary to build the project (hence the errors above).

It looks like the sources must be built from packages/react-native/ files, according to publish-npm.js file. It was a change introduced in this commit, so it's something new.

We have our own publish-npm-expensify.js file to build the sources for our fork, but this change isn't there and is likely the reason for the broken release.

So, I changed every path in the file to point to packages/react-native/, built a local release, used it on the project and the errors above stopped (other errors appeared but are build errors and needs further investigations). The release also had a more realistic size, 350 MBs.

@roryabraham I will raise a PR to Expensify's RN fork with these changes for you to review it, which branch do I have to target?

We are probably going to need another release to continue with the RN update.

@mountiny
Copy link
Contributor

mountiny commented May 5, 2023

Normally I would say you should target the latest release v0.71.2-rc.1-alpha.0 but if its borked, maybe we should wait for a new one. cc @roryabraham

@fabioh8010
Copy link
Contributor Author

@roryabraham I created a branch from the latest tag, here is the changes.

Which branch should I target for the PR?

package.json Outdated Show resolved Hide resolved
@fabioh8010
Copy link
Contributor Author

Update

  • Created a branch from Expensify RN fork latest tag with the necessary changes in our custom publish script here. Waiting for instructions in order to create a PR.
  • Meanwhile, I published my own release from my fork (based on Expensify) in order to proceed faster with Android & iOS builds. We must change package.json to use the correct release when it's available.
  • Got several build errors in Android because we are now using Gradle 8.x. I was able to solve two of them and created temporary patches, but the last one is still standing.
  • Got one build error in iOS, but didn't investigate yet.

Android build errors

lottie-react-native

  • Caused by this breaking change in Gradle 8.x.
  • Created a temporary patch with the correction and will raise a PR in their GH tomorrow.

@onfido/react-native-sdk

react-native-reanimated

FAILURE: Build failed with an exception.

* What went wrong:
A problem was found with the configuration of task ':react-native-reanimated:mergeDebugJniLibFolders' (type 'MergeSourceSetFolders').
  - Gradle detected a problem with the following location: '/Users/fabiohenriques/Documents/Work/Callstack/Projects/Expensify/expensify-app/node_modules/react-native-reanimated/android/src/main/jniLibs'.
    
    Reason: Task ':react-native-reanimated:mergeDebugJniLibFolders' uses this output of task ':react-native-reanimated:packageNdkLibs' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.
    
    Possible solutions:
      1. Declare task ':react-native-reanimated:packageNdkLibs' as an input of ':react-native-reanimated:mergeDebugJniLibFolders'.
      2. Declare an explicit dependency on ':react-native-reanimated:packageNdkLibs' from ':react-native-reanimated:mergeDebugJniLibFolders' using Task#dependsOn.
      3. Declare an explicit dependency on ':react-native-reanimated:packageNdkLibs' from ':react-native-reanimated:mergeDebugJniLibFolders' using Task#mustRunAfter.
    
    Please refer to https://docs.gradle.org/8.0.1/userguide/validation_problems.html#implicit_dependency for more details about this problem.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 8m 28s
  • Caused by this breaking change in Gradle 8.x.
  • Didn't find a solution yet, but from what I've seen updating to 3.1.0 will likely solve the problem, will test tomorrow.

iOS build errors

CompileC /Users/fabiohenriques/Library/Developer/Xcode/DerivedData/NewExpensify-ghqcewtwqrncwpadxywxtcecpjza/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-RCTText.build/Objects-normal/x86_64/RCTBaseTextInputView.o /Users/fabiohenriques/Documents/Work/Callstack/Projects/Expensify/expensify-app/node_modules/react-native/Libraries/Text/TextInput/RCTBaseTextInputView.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target 'React-RCTText' from project 'Pods')
    cd /Users/fabiohenriques/Documents/Work/Callstack/Projects/Expensify/expensify-app/ios/Pods
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -target x86_64-apple-ios12.4-simulator -fmessage-length\=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit\=0 -std\=gnu11 -fobjc-arc -fmodules -fmodules-cache-path\=/Users/fabiohenriques/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -fmodules-prune-interval\=86400 -fmodules-prune-after\=345600 -fbuild-session-file\=/Users/fabiohenriques/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror\=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -O0 -fno-common -Wno-missing-field-initializers -Wno-missing-prototypes -Werror\=return-type -Wdocumentation -Wunreachable-code -Wno-implicit-atomic-properties -Werror\=deprecated-objc-isa-usage -Wno-objc-interface-ivars -Werror\=objc-root-class -Wno-arc-repeated-use-of-weak -Wimplicit-retain-self -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wdeprecated-implementations -Wno-implicit-fallthrough -DPOD_CONFIGURATION_DEBUG\=1 -DDEBUG\=1 -DCOCOAPODS\=1 -DOBJC_OLD_DISPATCH_PROTOTYPES\=0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk -fasm-blocks -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -g -Wno-sign-conversion -Winfinite-recursion -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wno-semicolon-before-method-body -Wunguarded-availability -fobjc-abi-version\=2 -fobjc-legacy-dispatch -index-store-path /Users/fabiohenriques/Library/Developer/Xcode/DerivedData/NewExpensify-ghqcewtwqrncwpadxywxtcecpjza/Index.noindex/DataStore -iquote /Users/fabiohenriques/Library/Developer/Xcode/DerivedData/NewExpensify-ghqcewtwqrncwpadxywxtcecpjza/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-RCTText.build/React-RCTText-generated-files.hmap -I/Users/fabiohenriques/Library/Developer/Xcode/DerivedData/NewExpensify-ghqcewtwqrncwpadxywxtcecpjza/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-RCTText.build/React-RCTText-own-target-headers.hmap -I/Users/fabiohenriques/Library/Developer/Xcode/DerivedData/NewExpensify-ghqcewtwqrncwpadxywxtcecpjza/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-RCTText.build/React-RCTText-all-non-framework-target-headers.hmap -ivfsoverlay /Users/fabiohenriques/Library/Developer/Xcode/DerivedData/NewExpensify-ghqcewtwqrncwpadxywxtcecpjza/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-RCTText.build/all-product-headers.yaml -iquote /Users/fabiohenriques/Library/Developer/Xcode/DerivedData/NewExpensify-ghqcewtwqrncwpadxywxtcecpjza/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-RCTText.build/React-RCTText-project-headers.hmap -I/Users/fabiohenriques/Library/Developer/Xcode/DerivedData/NewExpensify-ghqcewtwqrncwpadxywxtcecpjza/Build/Products/Debug-iphonesimulator/React-RCTText/include -I/Users/fabiohenriques/Documents/Work/Callstack/Projects/Expensify/expensify-app/ios/Pods/Headers/Private -I/Users/fabiohenriques/Documents/Work/Callstack/Projects/Expensify/expensify-app/ios/Pods/Headers/Private/React-RCTText -I/Users/fabiohenriques/Documents/Work/Callstack/Projects/Expensify/expensify-app/ios/Pods/Headers/Public -I/Users/fabiohenriques/Documents/Work/Callstack/Projects/Expensify/expensify-app/ios/Pods/Headers/Public/DoubleConversion -I/Users/fabiohenriques/Documents/Work/Callstack/Projects/Expensify/expensify-app/ios/Pods/Headers/Public/RCT-Folly -I/Users/fabiohenriques/Documents/Work/Callstack/Projects/Expensify/expensify-app/ios/Pods/Headers/Public/React-Core -I/Users/fabiohenriques/Documents/Work/Callstack/Projects/Expensify/expensify-app/ios/Pods/Headers/Public/React-RCTText -I/Users/fabiohenriques/Documents/Work/Callstack/Projects/Expensify/expensify-app/ios/Pods/Headers/Public/React-callinvoker -I/Users/fabiohenriques/Documents/Work/Callstack/Projects/Expensify/expensify-app/ios/Pods/Headers/Public/React-cxxreact -I/Users/fabiohenriques/Documents/Work/Callstack/Projects/Expensify/expensify-app/ios/Pods/Headers/Public/React-hermes -I/Users/fabiohenriques/Documents/Work/Callstack/Projects/Expensify/expensify-app/ios/Pods/Headers/Public/React-jsi -I/Users/fabiohenriques/Documents/Work/Callstack/Projects/Expensify/expensify-app/ios/Pods/Headers/Public/React-jsiexecutor -I/Users/fabiohenriques/Documents/Work/Callstack/Projects/Expensify/expensify-app/ios/Pods/Headers/Public/React-jsinspector -I/Users/fabiohenriques/Documents/Work/Callstack/Projects/Expensify/expensify-app/ios/Pods/Headers/Public/React-logger -I/Users/fabiohenriques/Documents/Work/Callstack/Projects/Expensify/expensify-app/ios/Pods/Headers/Public/React-perflogger -I/Users/fabiohenriques/Documents/Work/Callstack/Projects/Expensify/expensify-app/ios/Pods/Headers/Public/React-runtimeexecutor -I/Users/fabiohenriques/Documents/Work/Callstack/Projects/Expensify/expensify-app/ios/Pods/Headers/Public/SocketRocket -I/Users/fabiohenriques/Documents/Work/Callstack/Projects/Expensify/expensify-app/ios/Pods/Headers/Public/Yoga -I/Users/fabiohenriques/Documents/Work/Callstack/Projects/Expensify/expensify-app/ios/Pods/Headers/Public/fmt -I/Users/fabiohenriques/Documents/Work/Callstack/Projects/Expensify/expensify-app/ios/Pods/Headers/Public/glog -I/Users/fabiohenriques/Documents/Work/Callstack/Projects/Expensify/expensify-app/ios/Pods/Headers/Public/hermes-engine -I/Users/fabiohenriques/Documents/Work/Callstack/Projects/Expensify/expensify-app/ios/Pods/Headers/Public/libevent -I/Users/fabiohenriques/Library/Developer/Xcode/DerivedData/NewExpensify-ghqcewtwqrncwpadxywxtcecpjza/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-RCTText.build/DerivedSources-normal/x86_64 -I/Users/fabiohenriques/Library/Developer/Xcode/DerivedData/NewExpensify-ghqcewtwqrncwpadxywxtcecpjza/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-RCTText.build/DerivedSources/x86_64 -I/Users/fabiohenriques/Library/Developer/Xcode/DerivedData/NewExpensify-ghqcewtwqrncwpadxywxtcecpjza/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-RCTText.build/DerivedSources -F/Users/fabiohenriques/Library/Developer/Xcode/DerivedData/NewExpensify-ghqcewtwqrncwpadxywxtcecpjza/Build/Products/Debug-iphonesimulator/React-RCTText -F/Users/fabiohenriques/Documents/Work/Callstack/Projects/Expensify/expensify-app/ios/Pods/hermes-engine/destroot/Library/Frameworks/universal -F/Users/fabiohenriques/Library/Developer/Xcode/DerivedData/NewExpensify-ghqcewtwqrncwpadxywxtcecpjza/Build/Products/Debug-iphonesimulator/XCFrameworkIntermediates/hermes-engine/Pre-built -fmodule-map-file\=/Users/fabiohenriques/Documents/Work/Callstack/Projects/Expensify/expensify-app/ios/Pods/Headers/Public/React/React-Core.modulemap -fmodule-map-file\=/Users/fabiohenriques/Documents/Work/Callstack/Projects/Expensify/expensify-app/ios/Pods/Headers/Public/folly/RCT-Folly.modulemap -fmodule-map-file\=/Users/fabiohenriques/Documents/Work/Callstack/Projects/Expensify/expensify-app/ios/Pods/Headers/Public/yoga/Yoga.modulemap -include /Users/fabiohenriques/Documents/Work/Callstack/Projects/Expensify/expensify-app/ios/Pods/Target\ Support\ Files/React-RCTText/React-RCTText-prefix.pch -MMD -MT dependencies -MF /Users/fabiohenriques/Library/Developer/Xcode/DerivedData/NewExpensify-ghqcewtwqrncwpadxywxtcecpjza/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-RCTText.build/Objects-normal/x86_64/RCTBaseTextInputView.d --serialize-diagnostics /Users/fabiohenriques/Library/Developer/Xcode/DerivedData/NewExpensify-ghqcewtwqrncwpadxywxtcecpjza/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-RCTText.build/Objects-normal/x86_64/RCTBaseTextInputView.dia -c /Users/fabiohenriques/Documents/Work/Callstack/Projects/Expensify/expensify-app/node_modules/react-native/Libraries/Text/TextInput/RCTBaseTextInputView.m -o /Users/fabiohenriques/Library/Developer/Xcode/DerivedData/NewExpensify-ghqcewtwqrncwpadxywxtcecpjza/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-RCTText.build/Objects-normal/x86_64/RCTBaseTextInputView.o -index-unit-output-path /Pods.build/Debug-iphonesimulator/React-RCTText.build/Objects-normal/x86_64/RCTBaseTextInputView.o
/Users/fabiohenriques/Documents/Work/Callstack/Projects/Expensify/expensify-app/node_modules/react-native/Libraries/Text/TextInput/RCTBaseTextInputView.m:523:23: error: use of undeclared identifier 'selectionOrigin'
      @"positionY": @(selectionOrigin.y),
                      ^
/Users/fabiohenriques/Documents/Work/Callstack/Projects/Expensify/expensify-app/node_modules/react-native/Libraries/Text/TextInput/RCTBaseTextInputView.m:524:23: error: use of undeclared identifier 'selectionOrigin'
      @"positionX": @(selectionOrigin.x),
                      ^
2 errors generated.

Didn't investigate yet.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Temporary patch to fix Android build. Must be removed when an upstream fix is available.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mountiny
Copy link
Contributor

mountiny commented May 8, 2023

@fabioh8010 with the reanmiated changes feel free to post in #open-source channel and tag Tomek Zawadski and we might get help from them. I will try to ask Rory for help in terms of the branch

@perunt
Copy link
Contributor

perunt commented May 9, 2023

I can help with resolving iOS build errors related to custom properties positionY/X since I was involved in implementing this functionality

@perunt
Copy link
Contributor

perunt commented May 9, 2023

@fabioh8010 I noticed that the selectionOrigin variable was not defined. This may have been an oversight on my part. To resolve this issue, you can define selectionOrigin in the textInputDidChangeSelection method in Libraries/Text/TextInput/RCTBaseTextInputView.m as follows:

- (void)textInputDidChangeSelection
{
  if (!_onSelectionChange) {
    return;
  }

  RCTTextSelection *selection = self.selection;
  UITextRange *selectedTextRange = self.backedTextInputView.selectedTextRange;
  CGPoint selectionOrigin = [self.backedTextInputView caretRectForPosition:selectedTextRange.start].origin;

  _onSelectionChange(@{
    @"selection" : @{
      @"start" : @(selection.start),
      @"end" : @(selection.end),
      @"positionY": @(selectionOrigin.y),
      @"positionX": @(selectionOrigin.x),
    },
  });
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Temporary patch to fix iOS build. Must be removed when a new Expensify RN release is available.

Copy link
Contributor

Choose a reason for hiding this comment

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

I prepared PR for it Expensify/react-native#54.

@roryabraham would you mind including this in the new RN release if it gets approved?

@fabioh8010
Copy link
Contributor Author

Update

✅ All platforms are building now.

  • Updated react-native-reanimated library to 3.1.0 in order to fix the remaining Android build error.
  • Created a temporary patch to fix iOS build following @perunt's suggestions.

@mountiny I guess that at this point now we can start involving QA to help test the application and find problems.

@perunt
Copy link
Contributor

perunt commented May 9, 2023

  • Created a temporary patch to fix iOS build following @perunt's suggestions.

I'll prepare PR for our fork to fix it as well

@parasharrajat
Copy link
Member

parasharrajat commented Aug 1, 2023

Screenshots

🔲 iOS / native

Screen.Recording.2023-08-02.at.1.27.01.AM-sm.mp4

🔲 iOS / Safari

Screen.Recording.2023-08-02.at.8.03.40.PM.mov

🔲 MacOS / Desktop

Screen.Recording.2023-08-02.at.1.01.49.AM.mov

🔲 MacOS / Chrome

Screen.Recording.2023-08-02.at.12.09.04.AM.mov
Screen.Recording.2023-08-02.at.12.06.14.AM2.mov

🔲 Android / Chrome

Screen.Recording.2023-08-02.at.8.16.29.PM.mov

🔲 Android / native

Screen.Recording.2023-08-02.at.6.36.25.AM.mp4
Screen.Recording.2023-08-02.at.6.40.47.AM.mp4

@aimane-chnaif
Copy link
Contributor

Tested new builds. Still looks good except this known bug.

@parasharrajat
Copy link
Member

Checking a few strange things and I will complete the checklist tomorrow. Almost everything works.

@fabioh8010
Copy link
Contributor Author

fabioh8010 commented Aug 2, 2023

Update: There are merge conflicts again, but let's wait until #24036 is merged because we are having a crash in the app on main.

Context -> #20179 (comment) and https://expensify.slack.com/archives/C049HHMV9SM/p1690954042805659

cc @mountiny @roryabraham

EDIT: #24036 was merged, working on solving merge conflicts and tests.

@parasharrajat
Copy link
Member

So, I found a few inconsistencies but those are also present on the main so all good. I agree there are some issues with text wrapping and clipping but that is something that can be done in follow-up issues.

The main thing is that app is working. SVG, Animations, Composer, Selection menu, Textinputs, rendering, etc...

@parasharrajat
Copy link
Member

Let me know main is merged, I will approve it.

@fabioh8010
Copy link
Contributor Author

@parasharrajat I've updated against main! cc @mountiny

@parasharrajat
Copy link
Member

Rebuilding and doing a quick checkup.

Copy link
Member

@parasharrajat parasharrajat left a comment

Choose a reason for hiding this comment

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

Reviewer Checklist

  • I have verified the author checklist is complete (all boxes are checked off).
  • I verified the correct issue is linked in the ### Fixed Issues section above
  • I verified testing steps are clear and they cover the changes made in this PR
    • I verified the steps for local testing are in the Tests section
    • I verified the steps for Staging and/or Production testing are in the QA steps section
    • I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
  • I checked that screenshots or videos are included for tests on all platforms
  • I included screenshots or videos for tests on all platforms
  • I verified tests pass on all platforms & I tested again on:
    • Android / native
    • Android / Chrome
    • iOS / native
    • iOS / Safari
    • MacOS / Chrome / Safari
    • MacOS / Desktop
  • If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
  • I verified proper code patterns were followed (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick).
    • I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I verified that this PR follows the guidelines as stated in the Review Guidelines
  • I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately and each prop has a /** comment above it */
    • The file is named correctly
    • The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • The only data being stored in the state is data necessary for rendering and nothing else
    • For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
    • Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
    • All JSX used for rendering exists in the render method
    • The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
  • I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

🎀 👀 🎀 C+ reviewed

@@ -61,7 +61,7 @@ function WorkspaceBillsFirstSection(props) {
containerStyles={[styles.cardSection]}
>
<View style={[styles.mv3]}>
<Text numberOfLines={100}>
Copy link
Member

Choose a reason for hiding this comment

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

Is there a reason for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

// TODO: remove this commend once upstream PR is merged
maximumNumberOfLines={maximumNumberOfLines}
// TODO: remove this comment once upstream PR is merged and available in a future release
maxNumberOfLines={maxNumberOfLines}
Copy link
Member

Choose a reason for hiding this comment

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

These seem like coming from upstream changes. Is this not applicable to web?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@parasharrajat This is done in a different way in Web, these upstream PR is only for native.

@parasharrajat
Copy link
Member

parasharrajat commented Aug 2, 2023

All yours @aimane-chnaif and the team. Let's get this before a new conflict pops up. cc: @mountiny @roryabraham

@aimane-chnaif
Copy link
Contributor

:shipit: from me.

Copy link
Contributor

@luacmartins luacmartins left a comment

Choose a reason for hiding this comment

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

Both @roryabraham and @mountiny are ooo, so I reviewed this PR to get it out sooner rather than later.

@luacmartins luacmartins merged commit cfe556a into Expensify:main Aug 2, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 2, 2023

Congrats, that’s your 5th PR merged! 🎉 Do you know about the ContributorPlus role? It’s an opportunity to earn more in the Expensify Open Source community. Keep up the great work - thanks!

@OSBotify
Copy link
Contributor

OSBotify commented Aug 2, 2023

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@aimane-chnaif
Copy link
Contributor

aimane-chnaif commented Aug 2, 2023

I am still not able to build android locally - #18507 (comment).
I believe many devs will face the same issue.
I first posted on slack.

@OSBotify
Copy link
Contributor

OSBotify commented Aug 3, 2023

🚀 Deployed to staging by https://github.com/luacmartins in version: 1.3.50-0 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

@OSBotify
Copy link
Contributor

OSBotify commented Aug 7, 2023

🚀 Deployed to production by https://github.com/puneetlath in version: 1.3.50-3 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

@OSBotify
Copy link
Contributor

OSBotify commented Aug 7, 2023

🚀 Deployed to staging by https://github.com/luacmartins in version: 1.3.51-0 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

@OSBotify
Copy link
Contributor

OSBotify commented Aug 9, 2023

🚀 Deployed to production by https://github.com/Julesssss in version: 1.3.51-2 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

- csv.enabled = true
+ xml.required = true
+ html.required = true
+ csv.required = true
Copy link
Contributor

Choose a reason for hiding this comment

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

@fabioh8010 can I have context of why this is changed?
Because I am going to undo this change while bumping onfido sdk version (to fix #35519) if it's safe to remove.

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh sorry, this was already replaced in 10.5.0. So no longer this patch is needed as I am bumping to 10.6.0

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's explained in this PR that I made to their repo, not sure if it's still necessary though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.