joplin
joplin copied to clipboard
Mobile: Upgrade to React Native 0.74.1
Summary
This pull request:
- Applies the diff provided by the React Native upgrade helper.
- Migrates from
@react-native-community/clipboard
to@react-native-clipboard/clipboard
.@react-native-community/clipboard
doesn't build with RN 0.73 and seems to have been renamed to@react-native-clipboard/clipboard
. - Upgrades our fork of
react-native-alarm-notification
for compatibility with newer React Native versions.
[!NOTE]
React Native 0.74 removes default support for Flipper.
To-do
- [x] Upgrade our patches written for
react-native
v0.71 to work with v0.74.- Check whether they're still necessary?
- [x] Write a testing plan and verify that features still work on iOS and Android. (See below)
Testing plan
[!NOTE]
Manual testing in-progress. New issues may include:
- iOS: Pictures taken with the camera are inserted multiple times.
- This will need to be verified with a build of Joplin from the
dev
branch.- Android: Can't connect to Hermes from
chrome://inspect
.
- iOS
- [x] Sync
- Create a new profile
- Set up sync with a local copy of Joplin Server
- Create a notebook
- Enable encryption if not already enabled
- Add a note, attach a drawing
- Sync
- Verify that the note and drawing are visible on another client after sync.
- Edit the drawing on the other client and sync
- Sync the original mobile client and verify that the changes to the drawing are visible.
- [x] Plugins
- Enable plugin support and install the "note tabs" and "quick links" plugins
- Create a new note
- Link to the note created while testing sync above with the "quick links" plugin
- Open the note viewer and click on the link
- Open the "note tabs" panel
- Close the "note tabs" panel
- [x] Camera
- Open the note editor.
- Click on the paperclip icon in the toolbar.
- Click "take photo".
- Take a picture.
- Possible issue: This attaches two copies of the photo to the note (with the same id). This doesn't happen if I instead click "attach photo" to attach an existing photo.
- Close the note editor.
- Verify that a picture was attached to the note.
- Open the note actions menu.
- Click "Attach"
- Click "Attach photo"
- Attach a photo.
- Repeat steps 7-10 for "Attach file"
- [x] Export and import (& the share sheet)
- Open "Configuration" > "Import and Export"
- Click "Export all notes as JEX"
- Save the exported JEX file to the filesystem.
- Import the JEX file using "Import from JEX"
- [ ] Joplin Server share (tests react-native-rsa). Only tested with RN 0.73.8, not re-tested with RN 0.74.1.
- From another Joplin Server account (with encryption enabled), share a notebook with the account the mobile device is using.
- Accept the share
-
Broken: Related upstream issue. The upstream issue mentions React Native 0.68 on iOS, so this might have been broken before? If we need to switch, an alternative library might be
node-forge
. - This issue existed before. See https://github.com/laurent22/joplin/issues/10409.
-
Broken: Related upstream issue. The upstream issue mentions React Native 0.68 on iOS, so this might have been broken before? If we need to switch, an alternative library might be
- Sync
- Add a note to the shared notebook
- Sync
- [x] Sync
- Android
- [x] Sync
- Create a new profile
- Set up sync with a local copy of Joplin Server
- Enable encryption if not already enabled
- Add a note, attach a drawing
- Sync
- Verify that the note and drawing are visible on another client after sync.
- [x] Plugins
- Enable plugin support and install the "note tabs" and "quick links" plugins
- Create a new note
- Link to the note created while testing sync above with the "quick links" plugin
- Open the "note tabs" panel
- Close the "note tabs" panel
- [x] Camera
- Open the note editor.
- Click on the paperclip icon in the toolbar.
- Click "take photo".
- Take a picture.
- Close the note editor.
- Verify that a picture was attached to the note.
- Open the note actions menu.
- Click "Attach"
- Click "Attach file"
- Attach a file
- [x] Export and import (& the share sheet)
- Open "Configuration" > "Import and Export"
- Click "Export all notes as JEX"
- Save the exported JEX file to the filesystem.
- On Android, only sharing is implemented. To test this, I shared to Termux, which saved the exported JEX to the filesystem.
- Import the JEX file using "Import from JEX"
- [ ] Joplin Server share (tests react-native-rsa) --- RN 0.73.8: Downloading works, but adding a new note fails with "master key not loaded". Not tested in RN 0.74.1.
- From another Joplin Server account (with encryption enabled), share a notebook with the account the mobile device is using.
- Sync and accept the share
- Sync
- Add a note to the shared notebook
- Sync
- [x] File system sync
- Change the sync target to "file system"
- Sync
- There were issues related to the share in the previous step. Before file sync could continue (without encryption errors), I 1) disabled then re-enabled encryption, 2) deleted the shared folder, 3) set the sync target to Joplin Server, 4) tried to leave the share, and 5) set the sync target back to file system. After this, filesystem sync was successful.
- Verify that sync completes successfully
- [x] Voice typing
- Open the note actions menu and click "Voice typing..."
- Wait for the language model to download.
- Grant permission and slowly say: "This is a test of voice typing".
- [x] Sync
There's an error on CI:
FAILURE: Build failed with an exception.
* Where:
Build file '/home/runner/work/joplin/joplin/packages/app-mobile/android/app/build.gradle' line: 1
* What went wrong:
A problem occurred evaluating project ':app'.
> Failed to apply plugin 'com.android.internal.application'.
> Android Gradle plugin requires Java 17 to run. You are currently using Java 11.
Your current JDK is located in /usr/lib/jvm/temurin-11-jdk-amd64
You can try some of the following options:
- changing the IDE settings.
- changing the JAVA_HOME environment variable.
- changing `org.gradle.java.home` in `gradle.properties`.
Maybe we can use this to setup Java on the action? https://github.com/actions/setup-java
By the way is this pull request related to the Dropbox issue?
By the way is this pull request related to the Dropbox issue?
This pull request should allow publishing new iOS releases. Aside from that, this is unrelated to the sync issue.
Note for future upgrades: Some React Native bugs exist only in release mode (e.g. a react-native-vector-icons
bug that broke the release build). In the future, testing plans for React Native upgrades should include manual tests on a release version of Joplin.