From cd0d8700d50223bac8fb76ba8e9aea85eec997b0 Mon Sep 17 00:00:00 2001 From: Uraz Akgultan Date: Wed, 16 Aug 2023 14:03:20 +0200 Subject: [PATCH 1/3] fix: fix native modules script, update min mx version --- packages/jsActions/mobile-resources-native/package.json | 6 +++--- packages/jsActions/nanoflow-actions-native/package.json | 4 ++-- scripts/release/createNativeModules.js | 4 ++-- scripts/release/module-automation/commons.js | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/jsActions/mobile-resources-native/package.json b/packages/jsActions/mobile-resources-native/package.json index 8b2176d60..ce720e5a8 100644 --- a/packages/jsActions/mobile-resources-native/package.json +++ b/packages/jsActions/mobile-resources-native/package.json @@ -9,12 +9,12 @@ "url": "https://github.com/mendix/native-widgets.git" }, "marketplace": { - "minimumMXVersion": "9.24.0.2965", + "minimumMXVersion": "9.21.0.59661", "marketplaceId": 109513 }, "testProject": { "githubUrl": "https://github.com/mendix/native-mobile-resources", - "branchName": "main" + "branchName": "lts/mx/9.24" }, "scripts": { "prestart": "rimraf ./dist/tsc", @@ -52,4 +52,4 @@ "rimraf": "^2.7.1", "rollup": "^2.68.0" } -} \ No newline at end of file +} diff --git a/packages/jsActions/nanoflow-actions-native/package.json b/packages/jsActions/nanoflow-actions-native/package.json index 43c87d7ca..fc03905cc 100644 --- a/packages/jsActions/nanoflow-actions-native/package.json +++ b/packages/jsActions/nanoflow-actions-native/package.json @@ -9,12 +9,12 @@ "url": "https://github.com/mendix/native-widgets.git" }, "marketplace": { - "minimumMXVersion": "9.24.0.2965", + "minimumMXVersion": "9.21.0.59661", "marketplaceId": 109515 }, "testProject": { "githubUrl": "https://github.com/mendix/native-mobile-resources", - "branchName": "main" + "branchName": "lts/mx/9.24" }, "scripts": { "start": "rollup --config ../../../configs/jsactions/rollup.config.js --watch --configProject nanoflowcommons", diff --git a/scripts/release/createNativeModules.js b/scripts/release/createNativeModules.js index 1c464bfe1..c1a3393a5 100644 --- a/scripts/release/createNativeModules.js +++ b/scripts/release/createNativeModules.js @@ -129,7 +129,7 @@ async function updateNativeComponentsTestProject(moduleInfo, tmpFolder, nativeWi const tmpFolderActions = join(tmpFolder, `javascriptsource/${moduleInfo.moduleFolderNameInModeler}/actions`); console.log("Updating NativeComponentsTestProject..."); - await cloneRepo(moduleInfo.testProjectUrl, tmpFolder); + await cloneRepo(moduleInfo.testProjectUrl, moduleInfo.testProjectBranchName, tmpFolder); console.log("Deleting existing JS Actions from test project..."); await rm(tmpFolderActions, { force: true, recursive: true }); // this is useful to avoid retaining stale dependencies in the test project. @@ -199,7 +199,7 @@ async function updateNativeComponentsTestProjectWithAtlas(moduleInfo, tmpFolder) const tmpFolderNativeStyles = join(tmpFolder, `themesource/${moduleInfo.moduleFolderNameInModeler}`); console.log("Updating NativeComponentsTestProject.."); - await cloneRepo(moduleInfo.testProjectUrl, tmpFolder); + await cloneRepo(moduleInfo.testProjectUrl, moduleInfo.testProjectBranchName, tmpFolder); console.log("Copying Native styling files.."); await Promise.all([ diff --git a/scripts/release/module-automation/commons.js b/scripts/release/module-automation/commons.js index de9e46792..0042a75f0 100644 --- a/scripts/release/module-automation/commons.js +++ b/scripts/release/module-automation/commons.js @@ -207,12 +207,12 @@ async function githubAuthentication(moduleInfo) { await execShellCommand(`echo "${process.env.GH_PAT}" | gh auth login --with-token`); } -async function cloneRepo(githubUrl, localFolder) { +async function cloneRepo(githubUrl, githubBranchName, localFolder) { const githubUrlDomain = githubUrl.replace("https://", ""); const githubUrlAuthenticated = `https://${process.env.GH_USERNAME}:${process.env.GH_PAT}@${githubUrlDomain}`; await rm(localFolder, { recursive: true, force: true }); await mkdir(localFolder, { recursive: true }); - await execShellCommand(`git clone ${githubUrlAuthenticated} ${localFolder}`); + await execShellCommand(`git clone --branch ${githubBranchName} ${githubUrlAuthenticated} ${localFolder}`); await setLocalGitCredentials(localFolder); } From 71a6c05d5d18ad939aad3a03004ccf80bd1a1550 Mon Sep 17 00:00:00 2001 From: Uraz Akgultan Date: Wed, 16 Aug 2023 14:04:28 +0200 Subject: [PATCH 2/3] fix(mobile-resources-native): fix presentation style --- .../mobile-resources-native/CHANGELOG.md | 36 ++++++++++++++++++- .../src/camera/TakePicture.ts | 5 +-- .../src/camera/TakePictureAdvanced.ts | 5 +-- .../nanoflow-actions-native/CHANGELOG.md | 4 +++ 4 files changed, 45 insertions(+), 5 deletions(-) diff --git a/packages/jsActions/mobile-resources-native/CHANGELOG.md b/packages/jsActions/mobile-resources-native/CHANGELOG.md index 61059a4e8..345f81352 100644 --- a/packages/jsActions/mobile-resources-native/CHANGELOG.md +++ b/packages/jsActions/mobile-resources-native/CHANGELOG.md @@ -6,113 +6,139 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased] +### Changed + +- Minimum mx version set to 9.21.0 +- We updated the default presentation mode for both "Take Picture" and "Take Picture Advanced" to full screen. + ## [4.0.3] Native Mobile Resources - 2023-5-24 + ### Fixed - We've updated react-native-device-info library. ## [3.2.2] BottomSheet + ### Fixed - We've updated react-native-device-info library. ## [1.0.2] Gallery + ### Fixed - We've updated react-native-device-info library. ## [3.2.3] IntroScreen + ### Fixed - We've updated react-native-device-info library. ## [4.0.2] Native Mobile Resources - 2023-5-17 - ## [3.0.1] BarChart + ### Fixed - We fixed an issue where height or width with a value of 0 crash the app. ## [2.0.1] ColumnChart + ### Fixed - We fixed an issue where height or width with a value of 0 crash the app. ## [3.0.1] LineChart + ### Fixed - We fixed an issue where height or width with a value of 0 crash the app. ## [2.0.1] PieDoughnutChart + ### Fixed - We fixed an issue where height or width with a value of 0 crash the app. ## [4.0.0] Native Mobile Resources - 2023-3-28 + undefined ## [4.0.0] AppEvents + ## BREAKING - We made the widget compatible with React Native 0.70.7 ## [3.0.0] BarChart + ## BREAKING - We made the widget compatible with React Native 0.70.7 ## [4.0.0] BarcodeScanner + ## BREAKING - We made the widget compatible with React Native 0.70.7 ## [3.0.0] Carousel + ## BREAKING - We made the widget compatible with React Native 0.70.7 ## [2.0.0] ColorPicker + ## BREAKING - We made the widget compatible with React Native 0.70.7 ## [2.0.0] ColumnChart + ## BREAKING - We made the widget compatible with React Native 0.70.7 ## [4.0.0] FloatingActionButton + ## BREAKING - We made the widget compatible with React Native 0.70.7 ## [3.0.0] LineChart + ## BREAKING - We made the widget compatible with React Native 0.70.7 ## [3.0.0] ListViewSwipe + ## BREAKING - We made the widget compatible with React Native 0.70.7 ## [4.0.0] Maps + ## BREAKING - We made the widget compatible with React Native 0.70.7 ## [4.0.0] Notifications + ## BREAKING - We made the widget compatible with React Native 0.70.7 ## [2.0.0] PieDoughnutChart + ## BREAKING - We made the widget compatible with React Native 0.70.7 ## [3.0.0] PopupMenu + ### Added - Added id for testing @@ -122,41 +148,49 @@ undefined - We made the widget compatible with React Native 0.70.7 ## [4.2.1] ProgressBar + ### Changed - Bumped react-native-progress dependency ## [3.1.1] ProgressCircle + ### Changed - Bumped react-native-progress dependency ## [3.0.0] Rating + ## BREAKING - We made the widget compatible with React Native 0.70.7 ## [2.0.0] Signature + ## BREAKING - We made the widget compatible with React Native 0.70.7 ## [3.0.0] Slider + ## BREAKING - We made the widget compatible with React Native 0.70.7 ## [4.0.0] VideoPlayer + ## BREAKING - We made the widget compatible with React Native 0.70.7 ## [4.0.0] WebView + ## BREAKING - We made the widget compatible with React Native 0.70.7 ## [3.13.1] Native Mobile Resources - 2022-12-28 + ### Changed - We reduced the widget file size by reducing the dependencies list file size. diff --git a/packages/jsActions/mobile-resources-native/src/camera/TakePicture.ts b/packages/jsActions/mobile-resources-native/src/camera/TakePicture.ts index 46cef968e..963d97af2 100644 --- a/packages/jsActions/mobile-resources-native/src/camera/TakePicture.ts +++ b/packages/jsActions/mobile-resources-native/src/camera/TakePicture.ts @@ -77,7 +77,7 @@ export async function TakePicture( function takePicture(): Promise { return new Promise((resolve, reject) => { - const options = nativeVersionMajor === 2 ? getOptionsV2() : getOptionsV4(); + const options = nativeVersionMajor === 2 ? getOptionsV2() : getOptions(); getPictureMethod() .then(method => method(options, (response: ImagePickerV2Response | ImagePickerResponse) => { @@ -241,9 +241,10 @@ export async function TakePicture( }; } - function getOptionsV4(): CameraOptions | ImageLibraryOptions { + function getOptions(): CameraOptions | ImageLibraryOptions { const { maxWidth, maxHeight } = getPictureQuality(); return { + presentationStyle: "fullScreen", mediaType: "photo" as const, maxWidth, maxHeight diff --git a/packages/jsActions/mobile-resources-native/src/camera/TakePictureAdvanced.ts b/packages/jsActions/mobile-resources-native/src/camera/TakePictureAdvanced.ts index 0167e1c07..c2deb2596 100644 --- a/packages/jsActions/mobile-resources-native/src/camera/TakePictureAdvanced.ts +++ b/packages/jsActions/mobile-resources-native/src/camera/TakePictureAdvanced.ts @@ -130,7 +130,7 @@ export async function TakePictureAdvanced( function takePicture(): Promise { return new Promise((resolve, reject) => { - const options = nativeVersionMajor === 2 ? getOptionsV2() : getOptionsV4(); + const options = nativeVersionMajor === 2 ? getOptionsV2() : getOptions(); getPictureMethod() .then(method => method(options, (response: ImagePickerV2Response | ImagePickerResponse) => { @@ -294,9 +294,10 @@ export async function TakePictureAdvanced( }; } - function getOptionsV4(): CameraOptions | ImageLibraryOptions { + function getOptions(): CameraOptions | ImageLibraryOptions { const { maxWidth, maxHeight } = getPictureQuality(); return { + presentationStyle: "fullScreen", mediaType: "photo" as const, maxWidth, maxHeight diff --git a/packages/jsActions/nanoflow-actions-native/CHANGELOG.md b/packages/jsActions/nanoflow-actions-native/CHANGELOG.md index d38883dcb..010ebbf66 100644 --- a/packages/jsActions/nanoflow-actions-native/CHANGELOG.md +++ b/packages/jsActions/nanoflow-actions-native/CHANGELOG.md @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased] +### Changed + +- Minimum mx version set to 9.21.0 + ## [2.6.1] Nanoflow Commons - 2022-9-23 ### Fixed From f30839decd3e60c80f9f3781413a17829c746ed5 Mon Sep 17 00:00:00 2001 From: Uraz Akgultan Date: Tue, 22 Aug 2023 10:53:43 +0200 Subject: [PATCH 3/3] chore: update readme and fix version --- packages/jsActions/mobile-resources-native/CHANGELOG.md | 2 +- packages/jsActions/mobile-resources-native/package.json | 2 +- packages/jsActions/nanoflow-actions-native/CHANGELOG.md | 2 +- packages/jsActions/nanoflow-actions-native/package.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/jsActions/mobile-resources-native/CHANGELOG.md b/packages/jsActions/mobile-resources-native/CHANGELOG.md index 345f81352..74712f27b 100644 --- a/packages/jsActions/mobile-resources-native/CHANGELOG.md +++ b/packages/jsActions/mobile-resources-native/CHANGELOG.md @@ -8,7 +8,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ### Changed -- Minimum mx version set to 9.21.0 +- Minimum mx version set to 9.24.1 - We updated the default presentation mode for both "Take Picture" and "Take Picture Advanced" to full screen. ## [4.0.3] Native Mobile Resources - 2023-5-24 diff --git a/packages/jsActions/mobile-resources-native/package.json b/packages/jsActions/mobile-resources-native/package.json index ce720e5a8..2c3dc6dfd 100644 --- a/packages/jsActions/mobile-resources-native/package.json +++ b/packages/jsActions/mobile-resources-native/package.json @@ -9,7 +9,7 @@ "url": "https://github.com/mendix/native-widgets.git" }, "marketplace": { - "minimumMXVersion": "9.21.0.59661", + "minimumMXVersion": "9.24.1.4658", "marketplaceId": 109513 }, "testProject": { diff --git a/packages/jsActions/nanoflow-actions-native/CHANGELOG.md b/packages/jsActions/nanoflow-actions-native/CHANGELOG.md index 010ebbf66..ed7cd63a6 100644 --- a/packages/jsActions/nanoflow-actions-native/CHANGELOG.md +++ b/packages/jsActions/nanoflow-actions-native/CHANGELOG.md @@ -8,7 +8,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ### Changed -- Minimum mx version set to 9.21.0 +- Minimum mx version set to 9.24.1 ## [2.6.1] Nanoflow Commons - 2022-9-23 diff --git a/packages/jsActions/nanoflow-actions-native/package.json b/packages/jsActions/nanoflow-actions-native/package.json index fc03905cc..c26637e43 100644 --- a/packages/jsActions/nanoflow-actions-native/package.json +++ b/packages/jsActions/nanoflow-actions-native/package.json @@ -9,7 +9,7 @@ "url": "https://github.com/mendix/native-widgets.git" }, "marketplace": { - "minimumMXVersion": "9.21.0.59661", + "minimumMXVersion": "9.24.1.4658", "marketplaceId": 109515 }, "testProject": {