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: react-native 0.76 #656

Merged
merged 15 commits into from
Nov 15, 2024
Merged

chore: react-native 0.76 #656

merged 15 commits into from
Nov 15, 2024

Conversation

kirillzyusko
Copy link
Owner

@kirillzyusko kirillzyusko commented Oct 24, 2024

📜 Description

Update react-native to 0.76.2.

💡 Motivation and Context

To stay up-do-date with ecosystem.

Key points:

📢 Changelog

JS

  • update all deps to its latest versions;

Android

  • enabled Hermes, since we get a crash on startup.

🤔 How Has This Been Tested?

tested on:

  • CI;
  • Pixel 7 Pro (Android 15);
  • iPhone 6s (iOS 15.8);

📝 Checklist

  • CI successfully passed
  • I added new mocks and corresponding unit-tests if library API was changed

@kirillzyusko kirillzyusko added the deps update Upgrade dependencies of the project label Oct 24, 2024
@kirillzyusko kirillzyusko self-assigned this Oct 24, 2024
Copy link
Contributor

github-actions bot commented Oct 24, 2024

📊 Package size report

Current size Target Size Difference
159471 bytes 159566 bytes -95 bytes 📉

"@gorhom/bottom-sheet": "^4.6.4",
"@react-native-community/blur": "^4.4.0",
"@gorhom/bottom-sheet": "4.6.4",
"@react-native-community/blur": "^4.4.1",
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure, but somewhere you removed the ^ from the library version, would it be better to follow this approach for the whole file in the future?

Copy link
Owner Author

Choose a reason for hiding this comment

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

v5 broke e2e tests 🙂

@@ -75,7 +75,7 @@ export default function AwareScrollView({ navigation }: Props) {
{new Array(10).fill(0).map((_, i) => (
<TextInput
key={i}
contextMenuHidden={i === 4}
contextMenuHidden={i === 4 && Platform.OS === "ios"}
Copy link
Contributor

Choose a reason for hiding this comment

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

previously it was applied for both platforms, why did you change it?

Copy link
Owner Author

Choose a reason for hiding this comment

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

I had to use the hack with hidden context menu on iOS, because for some reasons on CI I'm getting different items comparing to my local simulator (I'm also getting Share and other items on CI)
On Android there is no such problem, so I decided to be a little bit more specific

Starting from 0.76 they disabled text selection if context menu is hidden, so you literally select text and after 16ms cursor gets moved to the end of text - and I don't handle the scenario where cursor is located a the end and i do not scroll

Because of that e2e test is broken - for now I just disabled context menu on iOS (because this was the original platform with the issue)

I hope in future versions of keyboard-controller I can re-work KeyboardAwareScrollView so that it will handle all cases (even when cursor is in the end).

@@ -34,4 +34,4 @@ newArchEnabled=false

# Use this property to enable or disable the Hermes JS engine.
# If set to false, you will be using JSC instead.
hermesEnabled=false
hermesEnabled=true
Copy link
Contributor

Choose a reason for hiding this comment

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

hm, do you want to enable new arch in paper example?

Copy link
Owner Author

Choose a reason for hiding this comment

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

I think I had to enable Hermes to prevent crash on start (the stack trace was coming from reanimated)

@@ -75,7 +75,7 @@ export default function AwareScrollView({ navigation }: Props) {
{new Array(10).fill(0).map((_, i) => (
<TextInput
key={i}
contextMenuHidden={i === 4}
contextMenuHidden={i === 4 && Platform.OS === "ios"}
Copy link
Contributor

Choose a reason for hiding this comment

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

previously it was applied for both platforms, why did you change it?

Copy link
Owner Author

Choose a reason for hiding this comment

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

I had to use the hack with hidden context menu on iOS, because for some reasons on CI I'm getting different items comparing to my local simulator (I'm also getting Share and other items on CI)
On Android there is no such problem, so I decided to be a little bit more specific

Starting from 0.76 they disabled text selection if context menu is hidden, so you literally select text and after 16ms cursor gets moved to the end of text - and I don't handle the scenario where cursor is located a the end and i do not scroll

Because of that e2e test is broken - for now I just disabled context menu on iOS (because this was the original platform with the issue)

I hope in future versions of keyboard-controller I can re-work KeyboardAwareScrollView so that it will handle all cases (even when cursor is in the end).

@kirillzyusko kirillzyusko force-pushed the chore/react-native-0.76.0 branch from 191e69b to 245aae6 Compare October 28, 2024 18:29
@kirillzyusko
Copy link
Owner Author

Opened an issue in RN: facebook/react-native#47307

Currently merge is blocked by this issue

@kirillzyusko kirillzyusko force-pushed the chore/react-native-0.76.0 branch from 245aae6 to 21a9a8f Compare November 15, 2024 14:08
@kirillzyusko kirillzyusko marked this pull request as ready for review November 15, 2024 17:34
@kirillzyusko kirillzyusko merged commit 1ed61ee into main Nov 15, 2024
23 checks passed
@kirillzyusko kirillzyusko deleted the chore/react-native-0.76.0 branch November 15, 2024 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deps update Upgrade dependencies of the project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants