Closed fabioh8010 closed 10 months ago
@roryabraham Your steps solved the problem. Strangely, node_modules
was not present in that folder and I had to install it manually like you said. Is it something that we have to do manually or should it install together when running npm install
on the root folder? I'm asking this because I don't remember having to do it before.
@mountiny @roryabraham I think we are good to go with this PR now (we have one pending discussion here though). Please review the PR and let me know if you need more testing from my side, or a specific one.
Is it something that we have to do manually or should it install together when running npm install on the root folder? I'm asking this because I don't remember having to do it before.
It should happen in a postInstall
script
@fabioh8010 there's an unrelated test failure that was present on main. Can you merge main again to resolve that please?
Awesome timing @fabioh8010. Going to run a full App scan...
The web is looking pretty unchanged(Good).
Android Looks good.
Every time, I close the keyboard On iOS, I see a warning.
Hi @parasharrajat Yes, I saw this warning as well and I was able to reproduce it on main
on Friday. I will test it again.
Question: Do you see opening or closing animation for the FAB menu on iOS and Android?
Every time, I close the keyboard On iOS, I see a warning.
@parasharrajat, this issue is that enabled
is not defined, I guess we wanted to use this.props.enabled
here?
For this PR, it's react-native+0.72.1.patch
Makes sense @ntdiary, thanks for investigation! This is probably happening on main
as well because this patch is also there, @parasharrajat could you please confirm this?
Yes, it is present on the main as well. So let's not fix it here. Reported https://expensify.slack.com/archives/C049HHMV9SM/p1688406249179949.
Question: Do you see opening or closing animation for the FAB menu on iOS and Android?
Testing..
@parasharrajat I tested the FAB button on both main
and this branch and there is no difference in my machine.
Besides that, I've updated this branch against main
again, please feel free to continue testing.
Thanks. It might be just due to heavy dev builds. I am trying to find bugs because it is hard to believe that it worked without a hitch.
@parasharrajat Please let me know if you need more help from my side.
Yeah, sure. I will finish my testing today.
We should also check all other features and bug fixes done from our forked RN, which not existed in upstream RN. As this PR will revert those which are not applied to upstream RN.
Good call @aimane-chnaif
Good call, I thought we have already managed to get all our fork changes to the upstream @chrispader would you be able to have a look at this?
If this would require a patch while we will wait for the fix to hit upstream, I think that would be better than holding this update.
Good call, I thought we have already managed to get all our fork changes to the upstream @chrispader would you be able to have a look at this?
@mountiny @aimane-chnaif I recalled about a spreadsheet with the status of each PR merged in Expensify's fork that was shared in the channel -> https://docs.google.com/spreadsheets/d/1Fvc2x0ythHoqE1NnsP5JTOLC0eXbWV5IrA-37hbJDGc/edit#gid=1594942597
Tomorrow I can take a look in each PR and see if's actually available on the last release.
If this would require a patch while we will wait for the fix to hit upstream, I think that would be better than holding this update.
It's worth mentioning that it won't be possible to use patches to fix native issues in Android, as the Android sources are now shipped in pre-built artifacts. cc @chrispader
Looking through the spreadsheet and changelog:
š¢ Merged and available on Upstream RN. š” Merged but not available on latest RN release yet. š Not sure about status on Upstream RN. š“ No Upstream PR or not merged on Upstream RN yet. š£ Patched on this PR. ā Possible blocker. šØ Can be patched if necessary.
š” / šØ https://github.com/Expensify/react-native/pull/53: Merged on our Fork. Merged on Upstream but not available in the latest release yet. Related issue.
š“ https://github.com/Expensify/react-native/pull/49: Merged on our Fork. Still open on Upstream. Related issue.
š¢ https://github.com/Expensify/react-native/pull/46: Merged on our Fork. This one and this one available since 0.72.0.
š“ https://github.com/Expensify/react-native/pull/45: Merged on our Fork. Still open on Upstream. Related issue.
š” / šØ https://github.com/Expensify/react-native/pull/40: Merged on our Fork. Merged on Upstream but not available in the latest release yet. Related issue.
š£ https://github.com/Expensify/react-native/pull/37: Merged on our Fork. Still open on Upstream. Related issue. Patched with Upstream PR.
š¢ https://github.com/Expensify/react-native/pull/36: Merged on our Fork. Merged on Upstream and available since 0.72.0.
š£ / š¢ https://github.com/Expensify/react-native/pull/33: Merged on our Fork. Two PRs merged on Upstream, here and here, and available since 0.72.4. Related issue. Patched with Fork PR.
š¢ https://github.com/Expensify/react-native/pull/32: Merged on our Fork. Merged on Upstream and available since 0.72.0.
š¢ https://github.com/Expensify/react-native/pull/24: Merged on our Fork. Merged on Upstream and available since 0.70.1.
š¢ https://github.com/Expensify/react-native/pull/21: Merged on our Fork. It's just examples for RNTester.
š¢ https://github.com/Expensify/react-native/pull/18: Merged on our Fork. Merged on Upstream and available since 0.72.0.
š¢ https://github.com/Expensify/react-native/pull/17: Merged on our Fork. Merged on Upstream and available since 0.72.0.
š“ / šØ https://github.com/Expensify/react-native/pull/16: Merged on our Fork. Still open on Upstream.
š¢ https://github.com/Expensify/react-native/pull/11: Merged on our Fork. Merged on Upstream and available since 0.70.0.
š¢ https://github.com/Expensify/react-native/pull/8: Merged on our Fork. Merged on Upstream and available since 0.72.0.
š¢ https://github.com/Expensify/react-native/pull/55: Merged on our Fork. Merged on Upstream and available since 0.72.0.
cc @mountiny
Hmm, There are a lot with undefined status. I didn't know there was a sheet. Thanks.
https://github.com/Expensify/react-native/pull/11 : Looks merged https://github.com/facebook/react-native/pull/34014
https://github.com/facebook/react-native/pull/37424 - Missing from the list
Thanks @parasharrajat , updated the list.
https://github.com/Expensify/react-native/pull/33: Merged on our Fork. It seems that there is no Upstream PR. Could you confirm @hannojg?
This PR is for a fix on android to circumvent a ANR, we are working to get these changes into react native core. The tracking PRs can be found here:
Until they are merged I recommend making the verticalScrollbarPosition
part of a patch for react native (its a relatively small and none invasive change I'd say)
@fabioh8010 All fixes related to maintainVisibleContentPosition have been upstreamed and released in 0.72 except for https://github.com/Expensify/react-native/pull/16.
I will work on getting https://github.com/Expensify/react-native/pull/16 upstreamed but I don't think this is a blocker as we don't use this functionality currently.
Ah I swear I remember someone mentioning that most of our stuff should be merged and release already so probably they did not have this spreadsheet. Thanks!
Which one of these do we need to block on if any. Can we use the patch for what @hannojg mentioned?
@fabioh8010 All fixes related to maintainVisibleContentPosition have been upstreamed and released in 0.72 except for https://github.com/Expensify/react-native/pull/16.
I will work on getting https://github.com/Expensify/react-native/pull/16 upstreamed but I don't think this is a blocker as we don't use this functionality currently.
Thanks for the info @janicduplessis! Regarding to https://github.com/Expensify/react-native/pull/46, could you please confirm if this commit got merged on Upstream or is part of some fix? I was unable to find it in the source code and changelog.
Ah I swear I remember someone mentioning that most of our stuff should be merged and release already so probably they did not have this spreadsheet. Thanks!
@mountiny I got the spreadsheet from this message on Slack, I think we just didn't have enough visibility of the status of the PRs without doing a deeper investigation.
Which one of these do we need to block on if any. Can we use the patch for what @hannojg mentioned?
@hannojg From what I understood we would have to patch Android source files to apply the fix, right? If it's the case, it's not possible because the android sources are shipped pre-built during build process, so making a patch won't make difference.
@mountiny I updated the list with ā (possible blocker) and šØ (can be patched) labels. Currently, it seems to me that we have two possible blockers, https://github.com/Expensify/react-native/pull/37 and https://github.com/Expensify/react-native/pull/33. @aimane-chnaif @parasharrajat could you confirm if I'm missing something?
As we're using RN directly, android bugs from our previously forked RN are gone:
https://github.com/Expensify/App/issues/17368 (fixed already but was workaround, all numberOfLines={100} occurrences can be safely removed) [HOLD][$1000] Web- Preferences - The recent mode description is truncated in Spanish preference #17509 (to fix, revert alternateTextMaxLines back to 0 from undefined) https://github.com/Expensify/App/issues/17441 (fixed)
@aimane-chnaif Just to clarify, I have to apply those 2 changes you suggested in this branch, right? all numberOfLines={100} occurrences can be safely removed
and to fix, revert alternateTextMaxLines back to 0 from undefined
.
As we're using RN directly, android bugs from our previously forked RN are gone:
17368 (fixed already but was workaround, all numberOfLines={100} occurrences can be safely removed)
[HOLD][$1000] Web- Preferences - The recent mode description is truncated in Spanish preference #17509 (to fix, revert alternateTextMaxLines back to 0 from undefined)
17441 (fixed)
@aimane-chnaif Just to clarify, I have to apply those 2 changes you suggested in this branch, right?
all numberOfLines={100} occurrences can be safely removed
andto fix, revert alternateTextMaxLines back to 0 from undefined
.
yes, it would be good but not a blocker.
@fabioh8010 Yes, these are native changes, however its a change on the java files, not on the CPP files. The pre-shipped binaries are only for the native cpp libs afaik.
So that shouldn't be an issue š
Hmm I think it also applies to Java files š¤ , will test @hannojg and let you know, thanks.
It's worth mentioning that it won't be possible to use patches to fix native issues in Android, as the Android sources are now shipped in pre-built artifacts. cc @chrispader
Yes, @fabioh8010 is right, we won't be able to include the maxNumberOfLines
and numberOfLines
feature @Szymon20000 implemented in the fork with just a patch. cc @mountiny
I'll check with @Szymon20000 how the progress in the upstream PR is going...
Yes @chrispader @hannojg the prebuilts also include Java files, so any fixes to native Android side can't be patched.
It would be good if it was possible to come up with workarounds on JS side for now, until the pending PRs are merged and available in a future RN release, to avoid blocking this one.
@aimane-chnaif I removed the occurrences of numberOfLines={100}
and it's working as expected, but I wasn't able to reproduce the bug related to https://github.com/Expensify/App/issues/17509, could you please check?
I removed the occurrences of numberOfLines={100} and it's working as expected
š
I wasn't able to reproduce the bug related to https://github.com/Expensify/App/issues/17509, could you please check?
@fabioh8010 you mean on main or this branch?
@aimane-chnaif this branch.
@aimane-chnaif this branch.
Can you also test on main? https://github.com/Expensify/App/issues/17509 is web issue and this PR just upgraded RN version so web shouldn't be affected.
Regarding to https://github.com/Expensify/react-native/pull/46, could you please confirm if this commit got merged on Upstream or is part of some fix? I was unable to find it in the source code and changelog.
@fabioh8010 It was merged as part of https://github.com/facebook/react-native/pull/35993
@aimane-chnaif It turns out that PriorityModePage is using another component now, SelectionListRadio
. This component list items don't use this alternateTextMaxLines
prop, so we can safely remove alternateTextMaxLines
from PriorityModePage
.
@fabioh8010 yes, I see that PR was merged yesterday and PriorityModePage is no longer using OptionRow. Safe to remove
@fabioh8010 Kindly disagreeing here, the react-native core files are shipped as source with the npm react-native package (and it will stay this way).
You can verify yourself by checking e.g. node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/
FYI - Excited for this one so I kicked off another AdHoc build
š“ / šØ https://github.com/Expensify/react-native/pull/16: Merged on our Fork. There is no Upstream PR yet, @janicduplessis will open one but it seems that is a functionality that is not used yet in the project.
Upstream PR opened https://github.com/facebook/react-native/pull/38245
@fabioh8010 Kindly disagreeing here, the react-native core files are shipped as source with the npm react-native package (and it will stay this way).
You can verify yourself by checking e.g. node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/
@hannojg Yes, there are indeed Java files in that folder but modifying them won't make any difference when building the app (I just tested here as well), as stated in this guide we will be consuming precompiled artifacts when building for Android.
However, I also discovered that we can configure the project to build from source and by doing that it will be possible to apply changes to those files. I was able to apply your fix by configuring the project to build from source (the scroll indicator is on the correct side now):
https://github.com/Expensify/App/assets/20051562/b62cec7b-ba0c-43dc-b59b-1aad2db1a3a0
@roryabraham @mountiny WDYT about this? In this way we can patch the two fixes https://github.com/Expensify/react-native/pull/37 and https://github.com/Expensify/react-native/pull/33. The first disadvantage that I see is that the patch file will be gigantic, but it would allows us to move forward with this PR.
@fabioh8010 building from source sure is a bummer because of increased build times, but it's an acceptable cost since we seem to be using those upstream features.
The first disadvantage that I see is that the patch file will be gigantic
We're working w/ the maintainer of patch-package to alleviate this problem by allowing multiple patches. You can follow that progress here:
Actually, I just remembered that there is a canary release available for multiple patches published from this PR branch: https://github.com/ds300/patch-package/pull/474
So I'd suggest we start using it right away rather than creating a monolithic patch. Any feedback would be very helpful.
You can do npm install patch-package@canary
to try out the --append
flag. I think the workflow will be like so:
npx patch-package --append 'NumberOfLines'
npx patch-package --append 'VerticalScrollBarPosition'
Actually, just re-reviewing these PRs more carefully:
numberOfLines
and maximumNumberOfLines
support for TextInput
, TextArea
, EditText
components. However, I looked through all usages of numberOfLines
in our repo, and they are all on standard Text
components. So I think this may currently be unused.So it looks like neither of these are true blockers and we don't need to use the patches after all. Sorry, I just got excited about our new tool there... but I'm even more excited about not having to build Android from source.
@roryabraham Just to clarify better the issues:
maximumNumberOfLines
in the Composer
component for native platforms. Without this PR the composer will grow infinitely as reported by @aimane-chnaif.https://github.com/Expensify/App/assets/20051562/d431b075-f5b6-47c5-bc4b-5cac9d4bfca3
https://github.com/Expensify/App/assets/20051562/32f24266-2758-4b08-901e-fe27c362fa42
If we are OK with having this issues while they are not available in Upstream RN yet, we can safely merge this PR š
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
$ https://github.com/Expensify/App/issues/18444 $ https://github.com/Expensify/App/issues/21308 PROPOSAL: -
Tests
Full regression test
Offline tests
Same as above.
QA Steps
Same as above.
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Web
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android