diff --git a/.eslintignore b/.eslintignore index 91fcf075a..11d9cf3bd 100644 --- a/.eslintignore +++ b/.eslintignore @@ -449,6 +449,7 @@ packages/app-mobile/components/ProfileSwitcher/ProfileSwitcher.js packages/app-mobile/components/ProfileSwitcher/useProfileConfig.js packages/app-mobile/components/ScreenHeader.js packages/app-mobile/components/SelectDateTimeDialog.js +packages/app-mobile/components/SideMenu.js packages/app-mobile/components/TextInput.js packages/app-mobile/components/app-nav.js packages/app-mobile/components/biometrics/BiometricPopup.js diff --git a/.gitignore b/.gitignore index 3ed375072..dbaaeb22b 100644 --- a/.gitignore +++ b/.gitignore @@ -435,6 +435,7 @@ packages/app-mobile/components/ProfileSwitcher/ProfileSwitcher.js packages/app-mobile/components/ProfileSwitcher/useProfileConfig.js packages/app-mobile/components/ScreenHeader.js packages/app-mobile/components/SelectDateTimeDialog.js +packages/app-mobile/components/SideMenu.js packages/app-mobile/components/TextInput.js packages/app-mobile/components/app-nav.js packages/app-mobile/components/biometrics/BiometricPopup.js diff --git a/.yarn/patches/react-native-animation-fix/react-native-reanimated-npm-3.3.0-fb4272741c.patch b/.yarn/patches/react-native-animation-fix/react-native-reanimated-npm-3.3.0-fb4272741c.patch deleted file mode 100644 index 24a97b696..000000000 --- a/.yarn/patches/react-native-animation-fix/react-native-reanimated-npm-3.3.0-fb4272741c.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff --git a/android/src/main/java/com/swmansion/reanimated/NodesManager.java b/android/src/main/java/com/swmansion/reanimated/NodesManager.java -index e974f8eb827a35be4d7e5fa9b096af9387c595dd..bc9e5ff566c9484274e8eacefc88327a5ff30def 100644 ---- a/android/src/main/java/com/swmansion/reanimated/NodesManager.java -+++ b/android/src/main/java/com/swmansion/reanimated/NodesManager.java -@@ -34,7 +34,7 @@ import java.util.List; - import java.util.Map; - import java.util.Queue; - import java.util.Set; --import java.util.concurrent.ConcurrentLinkedQueue; -+import java.util.concurrent.LinkedBlockingQueue; - import java.util.concurrent.Semaphore; - import java.util.concurrent.TimeUnit; - import java.util.concurrent.atomic.AtomicBoolean; -@@ -80,7 +80,12 @@ public class NodesManager implements EventDispatcherListener { - private ReactApplicationContext mReactApplicationContext; - private RCTEventEmitter mCustomEventHandler; - private List mFrameCallbacks = new ArrayList<>(); -- private ConcurrentLinkedQueue mEventQueue = new ConcurrentLinkedQueue<>(); -+ -+ // Patch: On some versions of Android, ConcurrentLinkedQueue is known to -+ // drop items. LinkedBlockingQueue is a potentially-slower alternative that -+ // should not drop items. -+ // See https://github.com/laurent22/joplin/issues/8425 -+ private LinkedBlockingQueue mEventQueue = new LinkedBlockingQueue<>(); - public double currentFrameTimeMs; - public Set uiProps = Collections.emptySet(); - public Set nativeProps = Collections.emptySet(); diff --git a/package.json b/package.json index cf71d64a1..e156cb38a 100644 --- a/package.json +++ b/package.json @@ -100,7 +100,6 @@ "react-native-vosk@0.1.12": "patch:react-native-vosk@npm%3A0.1.12#./.yarn/patches/react-native-vosk-npm-0.1.12-76b1caaae8.patch", "eslint": "patch:eslint@npm%3A8.39.0#./.yarn/patches/eslint-npm-8.39.0-d92bace04d.patch", "app-builder-lib@24.4.0": "patch:app-builder-lib@npm%3A24.4.0#./.yarn/patches/app-builder-lib-npm-24.4.0-05322ff057.patch", - "react-native@0.71.10": "patch:react-native@npm%3A0.71.10#./.yarn/patches/react-native-animation-fix/react-native-npm-0.71.10-f9c32562d8.patch", - "react-native-reanimated@3.3.0": "patch:react-native-reanimated@npm%3A3.3.0#./.yarn/patches/react-native-animation-fix/react-native-reanimated-npm-3.3.0-fb4272741c.patch" + "react-native@0.71.10": "patch:react-native@npm%3A0.71.10#./.yarn/patches/react-native-animation-fix/react-native-npm-0.71.10-f9c32562d8.patch" } } diff --git a/packages/app-mobile/android/app/build.gradle b/packages/app-mobile/android/app/build.gradle index 02d09ac06..fcb06db55 100644 --- a/packages/app-mobile/android/app/build.gradle +++ b/packages/app-mobile/android/app/build.gradle @@ -110,8 +110,8 @@ android { applicationId "net.cozic.joplin" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 2097719 - versionName "2.12.2" + versionCode 2097720 + versionName "2.12.3" ndk { abiFilters "armeabi-v7a", "x86", "arm64-v8a", "x86_64" } diff --git a/packages/app-mobile/android/app/src/main/AndroidManifest.xml b/packages/app-mobile/android/app/src/main/AndroidManifest.xml index 36828c00d..3972acaf8 100644 --- a/packages/app-mobile/android/app/src/main/AndroidManifest.xml +++ b/packages/app-mobile/android/app/src/main/AndroidManifest.xml @@ -7,7 +7,7 @@ - + diff --git a/packages/app-mobile/babel.config.js b/packages/app-mobile/babel.config.js index b23608952..e953058a7 100644 --- a/packages/app-mobile/babel.config.js +++ b/packages/app-mobile/babel.config.js @@ -1,4 +1,3 @@ module.exports = { presets: ['module:metro-react-native-babel-preset'], - plugins: ['react-native-reanimated/plugin'], }; diff --git a/packages/app-mobile/components/ScreenHeader.tsx b/packages/app-mobile/components/ScreenHeader.tsx index b9a2cdbe6..6f8589186 100644 --- a/packages/app-mobile/components/ScreenHeader.tsx +++ b/packages/app-mobile/components/ScreenHeader.tsx @@ -601,7 +601,9 @@ class ScreenHeaderComponent extends PureComponent this.menu_select(value)} style={this.styles().contextMenu}> - + + + {menuOptionComponents} diff --git a/packages/app-mobile/components/SideMenu.ts b/packages/app-mobile/components/SideMenu.ts new file mode 100644 index 000000000..272a4c842 --- /dev/null +++ b/packages/app-mobile/components/SideMenu.ts @@ -0,0 +1,22 @@ +const { connect } = require('react-redux'); +const SideMenu_ = require('react-native-side-menu-updated').default; +import { Dimensions } from 'react-native'; +import { State } from '@joplin/lib/reducer'; + +class SideMenuComponent extends SideMenu_ { + public onLayoutChange(e: any) { + const { width, height } = e.nativeEvent.layout; + const openMenuOffsetPercentage = this.props.openMenuOffset / Dimensions.get('window').width; + const openMenuOffset = width * openMenuOffsetPercentage; + const hiddenMenuOffset = width * this.state.hiddenMenuOffsetPercentage; + this.setState({ width, height, openMenuOffset, hiddenMenuOffset }); + } +} + +const SideMenu = connect((state: State) => { + return { + isOpen: state.showSideMenu, + }; +})(SideMenuComponent); + +export default SideMenu; diff --git a/packages/app-mobile/components/screens/Note.tsx b/packages/app-mobile/components/screens/Note.tsx index 1623872e2..090cece1b 100644 --- a/packages/app-mobile/components/screens/Note.tsx +++ b/packages/app-mobile/components/screens/Note.tsx @@ -10,7 +10,8 @@ import { ChangeEvent, UndoRedoDepthChangeEvent } from '../NoteEditor/types'; const FileViewer = require('react-native-file-viewer').default; const React = require('react'); -const { Platform, Keyboard, View, TextInput, StyleSheet, Linking, Image, Share, PermissionsAndroid } = require('react-native'); +const { Keyboard, View, TextInput, StyleSheet, Linking, Image, Share } = require('react-native'); +import { Platform, PermissionsAndroid } from 'react-native'; const { connect } = require('react-redux'); // const { MarkdownEditor } = require('@joplin/lib/../MarkdownEditor/index.js'); import Note from '@joplin/lib/models/Note'; @@ -807,8 +808,12 @@ class NoteScreenComponent extends BaseScreenComponent { public async onAlarmDialogAccept(date: Date) { const response = await checkPermissions(PermissionsAndroid.PERMISSIONS.POST_NOTIFICATIONS); - if (response !== PermissionsAndroid.RESULTS.GRANTED) { - logger.warn('POST_NOTIFICATION permission was not granted'); + + // The POST_NOTIFICATIONS permission isn't supported on Android API < 33. + // (If unsupported, returns NEVER_ASK_AGAIN). + // On earlier releases, notifications should work without this permission. + if (response === PermissionsAndroid.RESULTS.DENIED) { + logger.warn('POST_NOTIFICATIONS permission was not granted'); return; } diff --git a/packages/app-mobile/components/screens/search.tsx b/packages/app-mobile/components/screens/search.tsx index 3b4444582..8bcc8d9ab 100644 --- a/packages/app-mobile/components/screens/search.tsx +++ b/packages/app-mobile/components/screens/search.tsx @@ -189,7 +189,10 @@ class SearchScreenComponent extends BaseScreenComponent { selectionColor={theme.textSelectionColor} keyboardAppearance={theme.keyboardAppearance} /> - this.clearButton_press()}> + this.clearButton_press()} + accessibilityLabel={_('Clear')} + > diff --git a/packages/app-mobile/components/side-menu-content.tsx b/packages/app-mobile/components/side-menu-content.tsx index 5949e85f4..bacd89bbe 100644 --- a/packages/app-mobile/components/side-menu-content.tsx +++ b/packages/app-mobile/components/side-menu-content.tsx @@ -23,6 +23,7 @@ Icon.loadFont().catch((error: any) => { console.info(error); }); interface Props { syncStarted: boolean; themeId: number; + sideMenuVisible: boolean; // eslint-disable-next-line @typescript-eslint/ban-types -- Old code before rule was applied dispatch: Function; collapsedFolderIds: string[]; @@ -491,15 +492,29 @@ const SideMenuContentComponent = (props: Props) => { items = items.concat(folderItems); } + const isHidden = !props.sideMenuVisible; + const style = { flex: 1, borderRightWidth: 1, borderRightColor: theme.dividerColor, backgroundColor: theme.backgroundColor, + + // Have the UI reflect whether the View is hidden to the screen reader. + // This way, there will be visual feedback if isHidden is incorrect. + opacity: isHidden ? 0.5 : undefined, }; + // Note: iOS uses accessibilityElementsHidden and Android uses importantForAccessibility + // to hide elements from the screenreader. + return ( - + {items} @@ -520,6 +535,7 @@ export default connect((state: AppState) => { notesParentType: state.notesParentType, locale: state.settings.locale, themeId: state.settings.theme, + sideMenuVisible: state.showSideMenu, // Don't do the opacity animation as it means re-rendering the list multiple times // opacity: state.sideMenuOpenPercent, collapsedFolderIds: state.collapsedFolderIds, diff --git a/packages/app-mobile/index.js b/packages/app-mobile/index.js index e38877608..a72cfbfa3 100644 --- a/packages/app-mobile/index.js +++ b/packages/app-mobile/index.js @@ -10,9 +10,6 @@ import 'react-native-get-random-values'; import 'react-native-url-polyfill/auto'; -// Set up required for react-native-drawer-layout (See: https://reactnavigation.org/docs/drawer-layout/ v6.x) -import 'react-native-gesture-handler'; - import { LogBox, AppRegistry } from 'react-native'; const Root = require('./root').default; diff --git a/packages/app-mobile/ios/Joplin.xcodeproj/project.pbxproj b/packages/app-mobile/ios/Joplin.xcodeproj/project.pbxproj index 8a53dc7e5..4e145ad6f 100644 --- a/packages/app-mobile/ios/Joplin.xcodeproj/project.pbxproj +++ b/packages/app-mobile/ios/Joplin.xcodeproj/project.pbxproj @@ -511,13 +511,13 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Joplin/Joplin.entitlements; - CURRENT_PROJECT_VERSION = 96; + CURRENT_PROJECT_VERSION = 97; DEVELOPMENT_TEAM = A9BXAFS6CT; ENABLE_BITCODE = NO; INFOPLIST_FILE = Joplin/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - MARKETING_VERSION = 12.12.2; + MARKETING_VERSION = 12.12.3; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -540,12 +540,12 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Joplin/Joplin.entitlements; - CURRENT_PROJECT_VERSION = 96; + CURRENT_PROJECT_VERSION = 97; DEVELOPMENT_TEAM = A9BXAFS6CT; INFOPLIST_FILE = Joplin/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - MARKETING_VERSION = 12.12.2; + MARKETING_VERSION = 12.12.3; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -692,14 +692,14 @@ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_ENTITLEMENTS = ShareExtension/ShareExtension.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 96; + CURRENT_PROJECT_VERSION = 97; DEBUG_INFORMATION_FORMAT = dwarf; DEVELOPMENT_TEAM = A9BXAFS6CT; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = ShareExtension/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; - MARKETING_VERSION = 12.12.2; + MARKETING_VERSION = 12.12.3; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = net.cozic.joplin.ShareExtension; @@ -723,14 +723,14 @@ CODE_SIGN_ENTITLEMENTS = ShareExtension/ShareExtension.entitlements; CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 96; + CURRENT_PROJECT_VERSION = 97; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = A9BXAFS6CT; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = ShareExtension/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; - MARKETING_VERSION = 12.12.2; + MARKETING_VERSION = 12.12.3; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = net.cozic.joplin.ShareExtension; PRODUCT_NAME = "$(TARGET_NAME)"; diff --git a/packages/app-mobile/ios/Podfile.lock b/packages/app-mobile/ios/Podfile.lock index e265f1dcb..ed52f1405 100644 --- a/packages/app-mobile/ios/Podfile.lock +++ b/packages/app-mobile/ios/Podfile.lock @@ -288,9 +288,9 @@ PODS: - React-Core - react-native-get-random-values (1.9.0): - React-Core - - react-native-image-picker (5.6.0): + - react-native-image-picker (5.6.1): - React-Core - - react-native-image-resizer (3.0.5): + - react-native-image-resizer (3.0.7): - React-Core - react-native-netinfo (9.4.1): - React-Core @@ -300,13 +300,13 @@ PODS: - React-Core - react-native-safe-area-context (4.7.1): - React-Core - - react-native-slider (4.4.2): + - react-native-slider (4.4.3): - React-Core - react-native-sqlite-storage (6.0.1): - React-Core - react-native-version-info (1.1.1): - React-Core - - react-native-webview (13.2.2): + - react-native-webview (13.3.1): - React-Core - React-perflogger (0.71.10) - React-RCTActionSheet (0.71.10): @@ -408,41 +408,10 @@ PODS: - React-Core - RNFS (2.20.0): - React-Core - - RNGestureHandler (2.12.1): - - React-Core - RNLocalize (3.0.2): - React-Core - RNQuickAction (0.3.13): - React - - RNReanimated (3.3.0): - - DoubleConversion - - FBLazyVector - - FBReactNativeSpec - - glog - - hermes-engine - - RCT-Folly - - RCTRequired - - RCTTypeSafety - - React-callinvoker - - React-Core - - React-Core/DevSupport - - React-Core/RCTWebSocket - - React-CoreModules - - React-cxxreact - - React-hermes - - React-jsi - - React-jsiexecutor - - React-jsinspector - - React-RCTActionSheet - - React-RCTAnimation - - React-RCTBlob - - React-RCTImage - - React-RCTLinking - - React-RCTNetwork - - React-RCTSettings - - React-RCTText - - ReactCommon/turbomodule/core - - Yoga - RNSecureRandom (1.0.1): - React - RNShare (8.2.2): @@ -521,10 +490,8 @@ DEPENDENCIES: - RNExitApp (from `../node_modules/react-native-exit-app`) - RNFileViewer (from `../node_modules/react-native-file-viewer`) - RNFS (from `../node_modules/react-native-fs`) - - RNGestureHandler (from `../node_modules/react-native-gesture-handler`) - RNLocalize (from `../node_modules/react-native-localize`) - RNQuickAction (from `../node_modules/react-native-quick-actions`) - - RNReanimated (from `../node_modules/react-native-reanimated`) - RNSecureRandom (from `../node_modules/react-native-securerandom`) - RNShare (from `../node_modules/react-native-share`) - RNVectorIcons (from `../node_modules/react-native-vector-icons`) @@ -656,14 +623,10 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native-file-viewer" RNFS: :path: "../node_modules/react-native-fs" - RNGestureHandler: - :path: "../node_modules/react-native-gesture-handler" RNLocalize: :path: "../node_modules/react-native-localize" RNQuickAction: :path: "../node_modules/react-native-quick-actions" - RNReanimated: - :path: "../node_modules/react-native-reanimated" RNSecureRandom: :path: "../node_modules/react-native-securerandom" RNShare: @@ -706,16 +669,16 @@ SPEC CHECKSUMS: react-native-fingerprint-scanner: ac6656f18c8e45a7459302b84da41a44ad96dbbe react-native-geolocation: 0f7fe8a4c2de477e278b0365cce27d089a8c5903 react-native-get-random-values: dee677497c6a740b71e5612e8dbd83e7539ed5bb - react-native-image-picker: db60857e03d63721f19b6f4027de20429ddd9cba - react-native-image-resizer: 00ceb0e05586c7aadf061eea676957a6c2ec60fa + react-native-image-picker: 5fcac5a5ffcb3737837f0617d43fd767249290de + react-native-image-resizer: 681f7607418b97c084ba2d0999b153b103040d8a react-native-netinfo: fefd4e98d75cbdd6e85fc530f7111a8afdf2b0c5 react-native-rsa-native: 12132eb627797529fdb1f0d22fd0f8f9678df64a react-native-saf-x: 9b16ad19c22cc6bba0fa63ce83e4b7d24bce5a01 react-native-safe-area-context: 9697629f7b2cda43cf52169bb7e0767d330648c2 - react-native-slider: 33b8d190b59d4f67a541061bb91775d53d617d9d + react-native-slider: 1cdd6ba29675df21f30544253bf7351d3c2d68c4 react-native-sqlite-storage: f6d515e1c446d1e6d026aa5352908a25d4de3261 react-native-version-info: a106f23009ac0db4ee00de39574eb546682579b9 - react-native-webview: b8ec89966713985111a14d6e4bf98d8b54bced0d + react-native-webview: c2b70afb1d910cdd8810375aecc6c2894e2ba061 React-perflogger: 217095464d5c4bb70df0742fa86bf2a363693468 React-RCTActionSheet: 8deae9b85a4cbc6a2243618ea62a374880a2c614 React-RCTAnimation: 59c62353a8b59ce206044786c5d30e4754bffa64 @@ -737,10 +700,8 @@ SPEC CHECKSUMS: RNExitApp: c4e052df2568b43bec8a37c7cd61194d4cfee2c3 RNFileViewer: ce7ca3ac370e18554d35d6355cffd7c30437c592 RNFS: 4ac0f0ea233904cb798630b3c077808c06931688 - RNGestureHandler: c0d04458598fcb26052494ae23dda8f8f5162b13 RNLocalize: dbea38dcb344bf80ff18a1757b1becf11f70cae4 RNQuickAction: 6d404a869dc872cde841ad3147416a670d13fa93 - RNReanimated: 9976fbaaeb8a188c36026154c844bf374b3b7eeb RNSecureRandom: 07efbdf2cd99efe13497433668e54acd7df49fef RNShare: d82e10f6b7677f4b0048c23709bd04098d5aee6c RNVectorIcons: fcc2f6cb32f5735b586e66d14103a74ce6ad61f8 diff --git a/packages/app-mobile/package.json b/packages/app-mobile/package.json index 5b5bd44ed..80e1add1a 100644 --- a/packages/app-mobile/package.json +++ b/packages/app-mobile/package.json @@ -48,13 +48,11 @@ "react-native-device-info": "10.8.0", "react-native-dialogbox": "0.6.10", "react-native-document-picker": "9.0.1", - "react-native-drawer-layout": "3.2.1", "react-native-dropdownalert": "4.5.1", "react-native-exit-app": "1.1.0", "react-native-file-viewer": "2.1.5", "react-native-fingerprint-scanner": "6.0.0", "react-native-fs": "2.20.0", - "react-native-gesture-handler": "2.12.1", "react-native-get-random-values": "1.9.0", "react-native-image-picker": "5.6.1", "react-native-localize": "3.0.2", @@ -62,11 +60,11 @@ "react-native-paper": "5.9.1", "react-native-popup-menu": "0.16.1", "react-native-quick-actions": "0.3.13", - "react-native-reanimated": "3.3.0", "react-native-rsa-native": "2.0.5", "react-native-safe-area-context": "4.7.1", "react-native-securerandom": "1.0.1", "react-native-share": "8.2.2", + "react-native-side-menu-updated": "1.3.2", "react-native-sqlite-storage": "6.0.1", "react-native-url-polyfill": "1.3.0", "react-native-vector-icons": "9.2.0", diff --git a/packages/app-mobile/root.tsx b/packages/app-mobile/root.tsx index a74aa8f12..a66920e21 100644 --- a/packages/app-mobile/root.tsx +++ b/packages/app-mobile/root.tsx @@ -22,14 +22,14 @@ import handleShared from './utils/shareHandler'; import uuid from '@joplin/lib/uuid'; import { loadKeychainServiceAndSettings } from '@joplin/lib/services/SettingUtils'; import KeychainServiceDriverMobile from '@joplin/lib/services/keychain/KeychainServiceDriver.mobile'; -import { setLocale } from '@joplin/lib/locale'; +import { _, setLocale } from '@joplin/lib/locale'; import SyncTargetJoplinServer from '@joplin/lib/SyncTargetJoplinServer'; import SyncTargetJoplinCloud from '@joplin/lib/SyncTargetJoplinCloud'; import SyncTargetOneDrive from '@joplin/lib/SyncTargetOneDrive'; import initProfile from '@joplin/lib/services/profileConfig/initProfile'; const VersionInfo = require('react-native-version-info').default; -const { Keyboard, BackHandler, View, StatusBar, Platform, Dimensions } = require('react-native'); -import { AppState as RNAppState, EmitterSubscription, Linking, NativeEventSubscription, Appearance } from 'react-native'; +const { Keyboard, BackHandler, Animated, View, StatusBar, Platform, Dimensions } = require('react-native'); +import { AppState as RNAppState, EmitterSubscription, Linking, NativeEventSubscription, Appearance, AccessibilityInfo } from 'react-native'; import getResponsiveValue from './components/getResponsiveValue'; import NetInfo from '@react-native-community/netinfo'; const DropdownAlert = require('react-native-dropdownalert').default; @@ -67,7 +67,7 @@ const { OneDriveLoginScreen } = require('./components/screens/onedrive-login.js' import EncryptionConfigScreen from './components/screens/encryption-config'; const { DropboxLoginScreen } = require('./components/screens/dropbox-login.js'); const { MenuContext } = require('react-native-popup-menu'); -import { Drawer } from 'react-native-drawer-layout'; +import SideMenu from './components/SideMenu'; import SideMenuContent from './components/side-menu-content'; const { SideMenuContentNote } = require('./components/side-menu-content-note.js'); const { DatabaseDriverReactNative } = require('./utils/database-driver-react-native'); @@ -117,8 +117,8 @@ import ProfileEditor from './components/ProfileSwitcher/ProfileEditor'; import sensorInfo, { SensorInfo } from './components/biometrics/sensorInfo'; import { getCurrentProfile } from '@joplin/lib/services/profileConfig'; import { getDatabaseName, getProfilesRootDir, getResourceDir, setDispatch } from './services/profiles'; -import { ReactNode } from 'react'; import userFetcher, { initializeUserFetcher } from '@joplin/lib/utils/userFetcher'; +import { ReactNode } from 'react'; import { parseShareCache } from '@joplin/lib/services/share/reducer'; import autodetectTheme, { onSystemColorSchemeChange } from './utils/autodetectTheme'; @@ -748,6 +748,7 @@ class AppComponent extends React.Component { super(); this.state = { + sideMenuContentOpacity: new Animated.Value(0), sideMenuWidth: this.getSideMenuWidth(), sensorInfo: null, }; @@ -983,6 +984,9 @@ class AppComponent extends React.Component { this.props.dispatch({ type: isOpen ? 'SIDE_MENU_OPEN' : 'SIDE_MENU_CLOSE', }); + AccessibilityInfo.announceForAccessibility( + isOpen ? _('Side menu opened') : _('Side menu closed'), + ); } private getSideMenuWidth = () => { @@ -1041,20 +1045,18 @@ class AppComponent extends React.Component { const mainContent = ( - this.sideMenu_change(true)} - onClose={() => this.sideMenu_change(false)} - drawerPosition={menuPosition} - swipeEdgeWidth={15} - drawerStyle={{ - width: this.state.sideMenuWidth, + this.sideMenu_change(isOpen)} + onSliding={(percent: number) => { + this.props.dispatch({ + type: 'SIDE_MENU_OPEN_PERCENT', + value: percent, + }); }} - renderDrawerContent={() => sideMenuContent} > @@ -1071,7 +1073,7 @@ class AppComponent extends React.Component { /> } - + ); diff --git a/readme/changelog_android.md b/readme/changelog_android.md index 61ace4d0d..784e76547 100644 --- a/readme/changelog_android.md +++ b/readme/changelog_android.md @@ -1,5 +1,12 @@ # Joplin Android app changelog +## [android-v2.12.3](https://github.com/laurent22/joplin/releases/tag/android-v2.12.3) (Pre-release) - 2023-09-11T20:01:44Z + +- Improved: Add screen reader labels to search/note actions buttons (#8797) (#8796 by Henry Heino) +- Improved: Improve accessibility of side menu (#8839 by Henry Heino) +- Fixed: Fix older Android versions unable to set alarms (#8837) (#8789 by Henry Heino) +- Fixed: Revert to `react-native-sidemenu-updated` for navigation drawers (#8820) (#8791 by Henry Heino) + ## [android-v2.12.2](https://github.com/laurent22/joplin/releases/tag/android-v2.12.2) (Pre-release) - 2023-08-22T13:15:18Z - Improved: Only include "armeabi-v7a", "x86", "arm64-v8a", "x86_64" in APK (4e2d366) diff --git a/readme/changelog_ios.md b/readme/changelog_ios.md index a60a1bacd..af4f37bde 100644 --- a/readme/changelog_ios.md +++ b/readme/changelog_ios.md @@ -1,5 +1,11 @@ # Joplin iOS app changelog +## [ios-v12.12.3](https://github.com/laurent22/joplin/releases/tag/ios-v12.12.3) - 2023-09-11T20:05:19Z + +- Improved: Add screen reader labels to search/note actions buttons (#8797) (#8796 by Henry Heino) +- Improved: Improve accessibility of side menu (#8839 by Henry Heino) +- Fixed: Revert to `react-native-sidemenu-updated` for navigation drawers (#8820) (#8791 by Henry Heino) + ## [ios-v12.12.2](https://github.com/laurent22/joplin/releases/tag/ios-v12.12.2) - 2023-09-01T22:13:36Z - New: Add JEX export (#8428 by Henry Heino) diff --git a/yarn.lock b/yarn.lock index 9c89beed6..a23fb954c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1392,7 +1392,7 @@ __metadata: languageName: node linkType: hard -"@babel/helper-create-class-features-plugin@npm:^7.18.6, @babel/helper-create-class-features-plugin@npm:^7.20.7, @babel/helper-create-class-features-plugin@npm:^7.21.0, @babel/helper-create-class-features-plugin@npm:^7.22.5": +"@babel/helper-create-class-features-plugin@npm:^7.18.6, @babel/helper-create-class-features-plugin@npm:^7.20.7, @babel/helper-create-class-features-plugin@npm:^7.21.0": version: 7.22.5 resolution: "@babel/helper-create-class-features-plugin@npm:7.22.5" dependencies: @@ -1992,17 +1992,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-syntax-jsx@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-syntax-jsx@npm:7.22.5" - dependencies: - "@babel/helper-plugin-utils": ^7.22.5 - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 8829d30c2617ab31393d99cec2978e41f014f4ac6f01a1cecf4c4dd8320c3ec12fdc3ce121126b2d8d32f6887e99ca1a0bad53dedb1e6ad165640b92b24980ce - languageName: node - linkType: hard - "@babel/plugin-syntax-logical-assignment-operators@npm:^7.10.4, @babel/plugin-syntax-logical-assignment-operators@npm:^7.8.3": version: 7.10.4 resolution: "@babel/plugin-syntax-logical-assignment-operators@npm:7.10.4" @@ -2102,17 +2091,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-syntax-typescript@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-syntax-typescript@npm:7.22.5" - dependencies: - "@babel/helper-plugin-utils": ^7.22.5 - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 8ab7718fbb026d64da93681a57797d60326097fd7cb930380c8bffd9eb101689e90142c760a14b51e8e69c88a73ba3da956cb4520a3b0c65743aee5c71ef360a - languageName: node - linkType: hard - "@babel/plugin-transform-arrow-functions@npm:^7.0.0, @babel/plugin-transform-arrow-functions@npm:^7.18.6": version: 7.22.5 resolution: "@babel/plugin-transform-arrow-functions@npm:7.22.5" @@ -2306,7 +2284,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-modules-commonjs@npm:^7.0.0, @babel/plugin-transform-modules-commonjs@npm:^7.13.8, @babel/plugin-transform-modules-commonjs@npm:^7.19.6, @babel/plugin-transform-modules-commonjs@npm:^7.22.5": +"@babel/plugin-transform-modules-commonjs@npm:^7.0.0, @babel/plugin-transform-modules-commonjs@npm:^7.13.8, @babel/plugin-transform-modules-commonjs@npm:^7.19.6": version: 7.22.5 resolution: "@babel/plugin-transform-modules-commonjs@npm:7.22.5" dependencies: @@ -2368,17 +2346,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-object-assign@npm:^7.16.7": - version: 7.22.5 - resolution: "@babel/plugin-transform-object-assign@npm:7.22.5" - dependencies: - "@babel/helper-plugin-utils": ^7.22.5 - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 5b672d72c7b12973e5e5881c3e69ab02474c44add224a9972b9450f859e713b2065fa18b88797b1393ad72cb952c0b14d80fa36960a17d6b558f24ee5cde219c - languageName: node - linkType: hard - "@babel/plugin-transform-object-super@npm:^7.0.0, @babel/plugin-transform-object-super@npm:^7.18.6": version: 7.22.5 resolution: "@babel/plugin-transform-object-super@npm:7.22.5" @@ -2582,20 +2549,6 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-typescript@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/plugin-transform-typescript@npm:7.22.5" - dependencies: - "@babel/helper-annotate-as-pure": ^7.22.5 - "@babel/helper-create-class-features-plugin": ^7.22.5 - "@babel/helper-plugin-utils": ^7.22.5 - "@babel/plugin-syntax-typescript": ^7.22.5 - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: d12f1ca1ef1f2a54432eb044d2999705d1205ebe211c2a7f05b12e8eb2d2a461fd7657b5486b2f2f1efe7c0c0dc8e80725b767073d40fe4ae059a7af057b05e4 - languageName: node - linkType: hard - "@babel/plugin-transform-unicode-escapes@npm:^7.18.10": version: 7.22.5 resolution: "@babel/plugin-transform-unicode-escapes@npm:7.22.5" @@ -2745,21 +2698,6 @@ __metadata: languageName: node linkType: hard -"@babel/preset-typescript@npm:^7.16.7": - version: 7.22.5 - resolution: "@babel/preset-typescript@npm:7.22.5" - dependencies: - "@babel/helper-plugin-utils": ^7.22.5 - "@babel/helper-validator-option": ^7.22.5 - "@babel/plugin-syntax-jsx": ^7.22.5 - "@babel/plugin-transform-modules-commonjs": ^7.22.5 - "@babel/plugin-transform-typescript": ^7.22.5 - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 7be1670cb4404797d3a473bd72d66eb2b3e0f2f8a672a5e40bdb0812cc66085ec84bcd7b896709764cabf042fdc6b7f2d4755ac7cce10515eb596ff61dab5154 - languageName: node - linkType: hard - "@babel/register@npm:^7.13.16": version: 7.18.9 resolution: "@babel/register@npm:7.18.9" @@ -3465,15 +3403,6 @@ __metadata: languageName: node linkType: hard -"@egjs/hammerjs@npm:^2.0.17": - version: 2.0.17 - resolution: "@egjs/hammerjs@npm:2.0.17" - dependencies: - "@types/hammerjs": ^2.0.36 - checksum: 8945137cec5837edd70af3f2e0ea621543eb0aa3b667e6269ec6485350f4d120c2434b37c7c30b1cf42a65275dd61c1f24626749c616696d3956ac0c008c4766 - languageName: node - linkType: hard - "@electron/asar@npm:^3.2.1": version: 3.2.4 resolution: "@electron/asar@npm:3.2.4" @@ -4635,13 +4564,11 @@ __metadata: react-native-device-info: 10.8.0 react-native-dialogbox: 0.6.10 react-native-document-picker: 9.0.1 - react-native-drawer-layout: 3.2.1 react-native-dropdownalert: 4.5.1 react-native-exit-app: 1.1.0 react-native-file-viewer: 2.1.5 react-native-fingerprint-scanner: 6.0.0 react-native-fs: 2.20.0 - react-native-gesture-handler: 2.12.1 react-native-get-random-values: 1.9.0 react-native-image-picker: 5.6.1 react-native-localize: 3.0.2 @@ -4649,11 +4576,11 @@ __metadata: react-native-paper: 5.9.1 react-native-popup-menu: 0.16.1 react-native-quick-actions: 0.3.13 - react-native-reanimated: 3.3.0 react-native-rsa-native: 2.0.5 react-native-safe-area-context: 4.7.1 react-native-securerandom: 1.0.1 react-native-share: 8.2.2 + react-native-side-menu-updated: 1.3.2 react-native-sqlite-storage: 6.0.1 react-native-url-polyfill: 1.3.0 react-native-vector-icons: 9.2.0 @@ -7633,13 +7560,6 @@ __metadata: languageName: node linkType: hard -"@types/hammerjs@npm:^2.0.36": - version: 2.0.41 - resolution: "@types/hammerjs@npm:2.0.41" - checksum: d16fbd688fc9b18cc270abe8dea8d4c50ef7bd8375e593d92c233d299387933a6b003c8db69819344833052458bc5f9ef1b472001277a49f095928d184356006 - languageName: node - linkType: hard - "@types/hoist-non-react-statics@npm:*, @types/hoist-non-react-statics@npm:^3.3.0, @types/hoist-non-react-statics@npm:^3.3.1": version: 3.3.1 resolution: "@types/hoist-non-react-statics@npm:3.3.1" @@ -27842,7 +27762,7 @@ __metadata: languageName: node linkType: hard -"prop-types@npm:*, prop-types@npm:15.8.1, prop-types@npm:^15.8.1": +"prop-types@npm:*, prop-types@npm:15.8.1, prop-types@npm:^15.5.10, prop-types@npm:^15.8.1": version: 15.8.1 resolution: "prop-types@npm:15.8.1" dependencies: @@ -28422,20 +28342,6 @@ __metadata: languageName: node linkType: hard -"react-native-drawer-layout@npm:3.2.1": - version: 3.2.1 - resolution: "react-native-drawer-layout@npm:3.2.1" - dependencies: - use-latest-callback: ^0.1.5 - peerDependencies: - react: "*" - react-native: "*" - react-native-gesture-handler: ">= 1.0.0" - react-native-reanimated: ">= 1.0.0" - checksum: 2644175b2fc9fee33a2ff98802007721b1974e8b338b6932a8df8964741474a8549366f63130dce817ae8fe91055c7216314b717c9bf7ec7e78321f3fb50dd0f - languageName: node - linkType: hard - "react-native-dropdownalert@npm:4.5.1": version: 4.5.1 resolution: "react-native-dropdownalert@npm:4.5.1" @@ -28486,22 +28392,6 @@ __metadata: languageName: node linkType: hard -"react-native-gesture-handler@npm:2.12.1": - version: 2.12.1 - resolution: "react-native-gesture-handler@npm:2.12.1" - dependencies: - "@egjs/hammerjs": ^2.0.17 - hoist-non-react-statics: ^3.3.0 - invariant: ^2.2.4 - lodash: ^4.17.21 - prop-types: ^15.7.2 - peerDependencies: - react: "*" - react-native: "*" - checksum: 1aec3d71c5fd3b8087e613708ee77a0ce7a1ac2bc87f5a6a22529300795b48aaa2359bcba7309f2c14f9de1ca1ffa4904d06b3cb7263820f657a4469976aecb3 - languageName: node - linkType: hard - "react-native-get-random-values@npm:1.9.0": version: 1.9.0 resolution: "react-native-get-random-values@npm:1.9.0" @@ -28594,48 +28484,6 @@ __metadata: languageName: node linkType: hard -"react-native-reanimated@npm:3.3.0": - version: 3.3.0 - resolution: "react-native-reanimated@npm:3.3.0" - dependencies: - "@babel/plugin-transform-object-assign": ^7.16.7 - "@babel/preset-typescript": ^7.16.7 - convert-source-map: ^2.0.0 - invariant: ^2.2.4 - peerDependencies: - "@babel/core": ^7.0.0-0 - "@babel/plugin-proposal-nullish-coalescing-operator": ^7.0.0-0 - "@babel/plugin-proposal-optional-chaining": ^7.0.0-0 - "@babel/plugin-transform-arrow-functions": ^7.0.0-0 - "@babel/plugin-transform-shorthand-properties": ^7.0.0-0 - "@babel/plugin-transform-template-literals": ^7.0.0-0 - react: "*" - react-native: "*" - checksum: 58096b28caef8af261c446eccb91a5a74caa303ba3520b1a2767c5b922b3d19b9a58612ab9b517a959c1b562b2e76e4cf4a8ffb21136960ed63375f6a4c37d1e - languageName: node - linkType: hard - -"react-native-reanimated@patch:react-native-reanimated@npm%3A3.3.0#./.yarn/patches/react-native-animation-fix/react-native-reanimated-npm-3.3.0-fb4272741c.patch::locator=root%40workspace%3A.": - version: 3.3.0 - resolution: "react-native-reanimated@patch:react-native-reanimated@npm%3A3.3.0#./.yarn/patches/react-native-animation-fix/react-native-reanimated-npm-3.3.0-fb4272741c.patch::version=3.3.0&hash=13daee&locator=root%40workspace%3A." - dependencies: - "@babel/plugin-transform-object-assign": ^7.16.7 - "@babel/preset-typescript": ^7.16.7 - convert-source-map: ^2.0.0 - invariant: ^2.2.4 - peerDependencies: - "@babel/core": ^7.0.0-0 - "@babel/plugin-proposal-nullish-coalescing-operator": ^7.0.0-0 - "@babel/plugin-proposal-optional-chaining": ^7.0.0-0 - "@babel/plugin-transform-arrow-functions": ^7.0.0-0 - "@babel/plugin-transform-shorthand-properties": ^7.0.0-0 - "@babel/plugin-transform-template-literals": ^7.0.0-0 - react: "*" - react-native: "*" - checksum: 5d73a35e694ab6c37b5f12530e1acdac822f2cceef7d04dcc060cc4c9221f51cf6bb68ed16737b25e79086de9dca6cd322819c6d04d668c9b97526408e97db68 - languageName: node - linkType: hard - "react-native-rsa-native@npm:2.0.5": version: 2.0.5 resolution: "react-native-rsa-native@npm:2.0.5" @@ -28671,6 +28519,15 @@ __metadata: languageName: node linkType: hard +"react-native-side-menu-updated@npm:1.3.2": + version: 1.3.2 + resolution: "react-native-side-menu-updated@npm:1.3.2" + dependencies: + prop-types: ^15.5.10 + checksum: 5d7ae7d2b372c80d9f7a3472f945daa6c11b43f00193ebec92fdb40ee853e86f522686736aa6a510a4fb09479c8eb7e4f14b53ad117d7e23749cd58c3c9d6cb7 + languageName: node + linkType: hard + "react-native-sqlite-storage@npm:6.0.1": version: 6.0.1 resolution: "react-native-sqlite-storage@npm:6.0.1"