From 3f3c480c606aa32ea50d0f7eb775e245dd9e3d9a Mon Sep 17 00:00:00 2001 From: Yogendra Shelke Date: Tue, 26 Aug 2025 16:49:47 +0530 Subject: [PATCH 1/2] chore: remove react-native-system-navigation-bar Remove react-native-system-navigation-bar --- configs/e2e/native_dependencies.json | 1 - .../video-player-native/CHANGELOG.md | 4 ++++ .../video-player-native/package.json | 4 +--- .../video-player-native/src/VideoPlayer.tsx | 4 ---- .../video-player-native/src/package.xml | 2 +- pnpm-lock.yaml | 17 ----------------- 6 files changed, 6 insertions(+), 26 deletions(-) diff --git a/configs/e2e/native_dependencies.json b/configs/e2e/native_dependencies.json index 28a67ef1c..17b88eaf6 100644 --- a/configs/e2e/native_dependencies.json +++ b/configs/e2e/native_dependencies.json @@ -7,7 +7,6 @@ "react-native-linear-gradient": "2.8.3", "@react-native-community/netinfo": "11.4.1", "react-native-svg": "15.11.1", - "react-native-system-navigation-bar": "2.6.3", "react-native-video": "6.10.0", "@react-native-async-storage/async-storage": "2.0.0", "react-native-camera": "3.40.0", diff --git a/packages/pluggableWidgets/video-player-native/CHANGELOG.md b/packages/pluggableWidgets/video-player-native/CHANGELOG.md index 7ee5a24e1..b320af2d3 100644 --- a/packages/pluggableWidgets/video-player-native/CHANGELOG.md +++ b/packages/pluggableWidgets/video-player-native/CHANGELOG.md @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased] +### Changed + +- We have removed react-native-system-navigation-bar and deprecated-react-native-prop-types dependencies. Navigation bar visibility is now handled by the react-native-video package. + ## [6.2.0] - 2025-08-18 ### Changed diff --git a/packages/pluggableWidgets/video-player-native/package.json b/packages/pluggableWidgets/video-player-native/package.json index 11fb5ddd0..228d43b1e 100644 --- a/packages/pluggableWidgets/video-player-native/package.json +++ b/packages/pluggableWidgets/video-player-native/package.json @@ -1,7 +1,7 @@ { "name": "video-player-native", "widgetName": "VideoPlayer", - "version": "6.2.0", + "version": "6.3.0", "license": "Apache-2.0", "repository": { "type": "git", @@ -20,8 +20,6 @@ }, "dependencies": { "@mendix/piw-native-utils-internal": "*", - "deprecated-react-native-prop-types": "^4.0.0", - "react-native-system-navigation-bar": "2.6.3", "react-native-vector-icons": "10.2.0", "react-native-video": "6.10.0" }, diff --git a/packages/pluggableWidgets/video-player-native/src/VideoPlayer.tsx b/packages/pluggableWidgets/video-player-native/src/VideoPlayer.tsx index 413f054df..53aca132a 100644 --- a/packages/pluggableWidgets/video-player-native/src/VideoPlayer.tsx +++ b/packages/pluggableWidgets/video-player-native/src/VideoPlayer.tsx @@ -86,13 +86,9 @@ export function VideoPlayer(props: VideoPlayerProps): ReactElement { setFullScreen(isFullScreen); const { NavigationBar } = NativeModules; if (NavigationBar) { - const SystemNavigationBar = (await import("react-native-system-navigation-bar")).default; - if (isFullScreen) { - SystemNavigationBar.navigationHide(); StatusBar.setHidden(true); } else { - SystemNavigationBar.navigationShow(); StatusBar.setHidden(false); const isDark = Appearance.getColorScheme() === "dark"; StatusBar.setBarStyle(isDark ? "light-content" : "dark-content"); diff --git a/packages/pluggableWidgets/video-player-native/src/package.xml b/packages/pluggableWidgets/video-player-native/src/package.xml index d4dd3a4dd..ef839d1f1 100644 --- a/packages/pluggableWidgets/video-player-native/src/package.xml +++ b/packages/pluggableWidgets/video-player-native/src/package.xml @@ -1,6 +1,6 @@ - + diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5dff069bb..0fe0138af 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -888,12 +888,6 @@ importers: '@mendix/piw-native-utils-internal': specifier: '*' version: link:../../tools/piw-native-utils-internal - deprecated-react-native-prop-types: - specifier: ^4.0.0 - version: 4.2.3 - react-native-system-navigation-bar: - specifier: 2.6.3 - version: 2.6.3(react-native@0.77.3(@babel/core@7.28.0)(@babel/preset-env@7.28.0(@babel/core@7.28.0))(@react-native-community/cli@14.1.0(typescript@5.8.3))(@types/react@18.3.23)(react@18.2.0))(react@18.2.0) react-native-vector-icons: specifier: 10.2.0 version: 10.2.0 @@ -6576,12 +6570,6 @@ packages: react: 18.2.0 react-native: 0.77.3 - react-native-system-navigation-bar@2.6.3: - resolution: {integrity: sha512-QzKVdIkDfwziJQA5PEHPJhT2/WCioWaNaXOg0HpzLAX5XlSdirnfz3riWJB9Zrj/RdWIt+qZGihkw5zTdYA3uA==} - peerDependencies: - react: 18.2.0 - react-native: 0.77.3 - react-native-vector-icons@10.2.0: resolution: {integrity: sha512-n5HGcxUuVaTf9QJPs/W22xQpC2Z9u0nb0KgLPnVltP8vdUvOp6+R26gF55kilP/fV4eL4vsAHUqUjewppJMBOQ==} hasBin: true @@ -15094,11 +15082,6 @@ snapshots: react-native: 0.77.3(@babel/core@7.28.0)(@babel/preset-env@7.28.0(@babel/core@7.28.0))(@react-native-community/cli@14.1.0(typescript@5.8.3))(@types/react@18.3.23)(react@18.2.0) warn-once: 0.1.1 - react-native-system-navigation-bar@2.6.3(react-native@0.77.3(@babel/core@7.28.0)(@babel/preset-env@7.28.0(@babel/core@7.28.0))(@react-native-community/cli@14.1.0(typescript@5.8.3))(@types/react@18.3.23)(react@18.2.0))(react@18.2.0): - dependencies: - react: 18.2.0 - react-native: 0.77.3(@babel/core@7.28.0)(@babel/preset-env@7.28.0(@babel/core@7.28.0))(@react-native-community/cli@14.1.0(typescript@5.8.3))(@types/react@18.3.23)(react@18.2.0) - react-native-vector-icons@10.2.0: dependencies: prop-types: 15.8.1 From 937130c1b68366affb3976dfe97b54324aa0f17e Mon Sep 17 00:00:00 2001 From: Yogendra Shelke Date: Tue, 26 Aug 2025 17:06:57 +0530 Subject: [PATCH 2/2] fix: unit tests --- .../video-player-native/src/__tests__/VideoPlayer.spec.tsx | 4 ---- 1 file changed, 4 deletions(-) diff --git a/packages/pluggableWidgets/video-player-native/src/__tests__/VideoPlayer.spec.tsx b/packages/pluggableWidgets/video-player-native/src/__tests__/VideoPlayer.spec.tsx index 3ac55e14d..0673acf59 100644 --- a/packages/pluggableWidgets/video-player-native/src/__tests__/VideoPlayer.spec.tsx +++ b/packages/pluggableWidgets/video-player-native/src/__tests__/VideoPlayer.spec.tsx @@ -10,10 +10,6 @@ import { VideoStyle } from "../ui/Styles"; jest.useFakeTimers(); jest.mock("react-native-video", () => "Video"); -jest.mock("react-native-system-navigation-bar", () => ({ - navigationHide: jest.fn(), - navigationShow: jest.fn() -})); describe("VideoPlayer", () => { let defaultProps: VideoPlayerProps;