-
-
Notifications
You must be signed in to change notification settings - Fork 665
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
RN v0.60 upgrade immediate-term followup #4147
Conversation
Second commit message has a |
Thanks for catching that! I'll add that in—along with a note about how the "default screen orientation" bit, in those instructions, is misleading (see #4118 (comment)). |
Mentioning the issue one of these fixes, so it gets a backlink to the PR: this fixes #4118. [edit: OK, and that didn't fill in the "Linked issues" in the sidebar -- so I edited the PR description, and that did.] |
I was just about to do that, when I saw you posted. Thanks! |
src/boot/AppEventHandlers.js
Outdated
|
||
const { | ||
orientationInfo: { orientation }, | ||
} = event; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The multi-line formatting is kind of a sign here of the fact that this syntax takes a bit of effort for the reader to unpack 😉
The usual way we'd write this is:
const { orientation } = event.orientationInfo;
5e34bea
to
734d9c2
Compare
Thanks for the comments! I've pushed a new revision. |
This responds to a new warning raised when using React Native 0.60.0, which we upgraded to recently: """ warn The following packages use deprecated "rnpm" config that will stop working from next release: - react-native-orientation: https://github.com/yamill/react-native-orientation#readme - rn-fetch-blob: https://npmjs.com/package/rn-fetch-blob """ We will handle `react-native-orientation` in an upcoming commit.
This is a best approximation of the functionality previously provided by `react-native-orientation`, which is unmaintained and is giving us errors that hint it will be unusable in the future. We followed the installation instructions [1] for bare React Native apps, which meant changing a line in ios/ZulipMobile/AppDelegate.m. This note in those instructions appears misleading: """ or if you want to change the default screen orientation, with: """ Looking at the relevant Apple doc [2], though, it's not to set the default orientation, but to set supported orientations. That's also what we find empirically: if we use the simple version of the code suggested in those instructions, the effect is actually to lock the app's orientation to a single value. Instead we choose to support all orientations, with `UIInterfaceOrientationMaskAll`. That setup step is done in the same commit as the JavaScript package is used; we assume the `AppDelegate.m` changes will break something if they coincide with the use of `react-native-orientation`. [1]: https://github.com/expo/expo/tree/ce446ed8b/packages/expo-screen-orientation [2]: https://developer.apple.com/documentation/uikit/uiinterfaceorientationmask?language=objc
Looks good, thanks! I've added a few words to the commit message with your findings from #4118 (comment) ; merging. |
In 0d5a19a, for zulip#4147, we forgot to remove some Android configuration specific to `react-native-orientation` [1], added in 3149c9d. So, remove it. It appears that the iOS configuration at the `react-native-orientation` doc was never done, so there's nothing to do for that. [1]: https://github.com/yamill/react-native-orientation#configuration
In 0d5a19a, for zulip#4147, we forgot to remove some Android configuration specific to `react-native-orientation` [1], added in 3149c9d. So, remove it. It appears that the iOS configuration at the `react-native-orientation` doc was never done, so there's nothing to do for that. [1]: https://github.com/yamill/react-native-orientation#configuration
In 0d5a19a, for zulip#4147, we forgot to remove some Android configuration specific to `react-native-orientation` in MainActivity.java [1], added in 3149c9d. So, remove it. It appears that the iOS configuration at the `react-native-orientation` doc was never done, so there's nothing to do for that. Greg pointed out that this override was replicated in ReceiveShareActivity.kt when that file was created (in 0b84717) and that he was puzzled by it while reviewing zulip#4124 and supposed it might be generic RN boilerplate. Now that we've identified it, remove it. [1]: https://github.com/yamill/react-native-orientation#configuration
In 0d5a19a, for zulip#4147, we forgot to remove some Android configuration specific to `react-native-orientation` in MainActivity.java [1], added in 3149c9d. So, remove it. It appears that the iOS configuration at the `react-native-orientation` doc was never done, so there's nothing to do for that. Greg pointed out that this override was replicated in ReceiveShareActivity.kt when that file was created (in 0b84717) and that he was puzzled by it while reviewing zulip#4124 and supposed it might be generic RN boilerplate. Now that we've identified it, remove it. [1]: https://github.com/yamill/react-native-orientation#configuration
In 0d5a19a, for zulip#4147, we forgot to remove some Android configuration specific to `react-native-orientation` in MainActivity.java [1], added in 3149c9d. So, remove it. It appears that the iOS configuration at the `react-native-orientation` doc was never done, so there's nothing to do for that. Greg pointed out that this override was replicated in ReceiveShareActivity.kt when that file was created (in 0b84717) and that he was puzzled by it while reviewing zulip#4124 and supposed it might be generic RN boilerplate. Now that we've identified it, remove it. [1]: https://github.com/yamill/react-native-orientation#configuration
This doesn't include as much as I was hoping to include; see details at #3548 (comment).
In particular (these are the major things), it doesn't include using Hermes (#4131) or upgrading Unimodules (#4091). But Hermes, IIUC, can be done any time; the Unimodules upgrade should Just Work, but only following the RN v0.61 upgrade.
Fixes: #4118