Skip to content
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

MOO-1739 Intro Screen widget has always visible modal #223

Open
wants to merge 4 commits into
base: mx/10.12.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/jsActions/mobile-resources-native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@
"rimraf": "^2.7.1",
"rollup": "^2.68.0"
}
}
}
4 changes: 4 additions & 0 deletions packages/pluggableWidgets/intro-screen-native/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]

### Fixed

- We've updated the modal visibility according to the active status to ensure that other pages are not affected by this widget.

## [3.2.3] - 2023-5-24

### Fixed
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "intro-screen-native",
"widgetName": "IntroScreen",
"version": "3.2.3",
"version": "3.3.0",
"license": "Apache-2.0",
"repository": {
"type": "git",
Expand All @@ -28,6 +28,7 @@
"@mendix/piw-native-utils-internal": "*",
"@mendix/piw-utils-internal": "*",
"@react-native-community/async-storage": "1.12.1",
"@react-navigation/core": "6.4.8",
"react-native-device-info": "8.7.1"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ import { SwipeableContainer } from "./SwipeableContainer";
import AsyncStorage from "@react-native-community/async-storage";
import deepmerge from "deepmerge";
import { executeAction } from "@mendix/piw-utils-internal";
import { useIsFocused } from "@react-navigation/core";

export function IntroScreen(props: IntroScreenProps<IntroScreenStyle>): JSX.Element {
const [visible, setVisible] = useState(false);
const isFocused = useIsFocused();
const customStyles = props.style ? props.style.filter(o => o != null) : [];
const styles =
customStyles.length > 0
Expand Down Expand Up @@ -57,7 +59,7 @@ export function IntroScreen(props: IntroScreenProps<IntroScreenStyle>): JSX.Elem
const showNextDone = props.buttonPattern !== "none";

return (
<Modal visible={visible} transparent={props.showMode === "popup"}>
<Modal visible={visible && isFocused} transparent={props.showMode === "popup"}>
<View style={props.showMode === "fullscreen" ? styles.fullscreenContainer : styles.popupContainer}>
<SwipeableContainer
testID={props.name}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<package xmlns="http://www.mendix.com/package/1.0/">
<clientModule name="IntroScreen" version="3.2.3" xmlns="http://www.mendix.com/clientModule/1.0/">
<clientModule name="IntroScreen" version="3.3.0" xmlns="http://www.mendix.com/clientModule/1.0/">
<widgetFiles>
<widgetFile path="IntroScreen.xml" />
</widgetFiles>
Expand Down
86 changes: 85 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3566,6 +3566,31 @@ __metadata:
languageName: node
linkType: hard

"@react-navigation/core@npm:6.4.8":
version: 6.4.8
resolution: "@react-navigation/core@npm:6.4.8"
dependencies:
"@react-navigation/routers": ^6.1.8
escape-string-regexp: ^4.0.0
nanoid: ^3.1.23
query-string: ^7.1.3
react-is: ^16.13.0
use-latest-callback: ^0.1.5
peerDependencies:
react: "*"
checksum: d4ae55f4827622cf02389344ea154fbae6e0da26165e9c8644ba4b54c50fb2bf930856b080f5fc5c57af46809909b19903f414f3df071d75113e54c9dc6d2ed0
languageName: node
linkType: hard

"@react-navigation/routers@npm:^6.1.8":
version: 6.1.9
resolution: "@react-navigation/routers@npm:6.1.9"
dependencies:
nanoid: ^3.1.23
checksum: 3a3392ce095d6a2bd2aad69856f513b35774f943a3dc73d8ffb75127de6773203e3264188d87058bdea4c0c9a7d43ed28d0cbf3a1f1cdc086df3ee255d8e1e27
languageName: node
linkType: hard

"@rollup/plugin-alias@npm:^3.1.5":
version: 3.1.9
resolution: "@rollup/plugin-alias@npm:3.1.9"
Expand Down Expand Up @@ -7095,6 +7120,13 @@ __metadata:
languageName: node
linkType: hard

"decode-uri-component@npm:^0.2.2":
version: 0.2.2
resolution: "decode-uri-component@npm:0.2.2"
checksum: 95476a7d28f267292ce745eac3524a9079058bbb35767b76e3ee87d42e34cd0275d2eb19d9d08c3e167f97556e8a2872747f5e65cbebcac8b0c98d83e285f139
languageName: node
linkType: hard

"dedent@npm:^0.7.0":
version: 0.7.0
resolution: "dedent@npm:0.7.0"
Expand Down Expand Up @@ -8386,6 +8418,13 @@ __metadata:
languageName: node
linkType: hard

"filter-obj@npm:^1.1.0":
version: 1.1.0
resolution: "filter-obj@npm:1.1.0"
checksum: cf2104a7c45ff48e7f505b78a3991c8f7f30f28bd8106ef582721f321f1c6277f7751aacd5d83026cb079d9d5091082f588d14a72e7c5d720ece79118fa61e10
languageName: node
linkType: hard

"finalhandler@npm:1.1.2":
version: 1.1.2
resolution: "finalhandler@npm:1.1.2"
Expand Down Expand Up @@ -9482,6 +9521,7 @@ __metadata:
"@mendix/piw-utils-internal": "*"
"@mendix/pluggable-widgets-tools": ^9.0.0
"@react-native-community/async-storage": 1.12.1
"@react-navigation/core": 6.4.8
detox: ^19.13.0
eslint: ^7.20.0
react-native-device-info: 8.7.1
Expand Down Expand Up @@ -12799,6 +12839,15 @@ __metadata:
languageName: unknown
linkType: soft

"nanoid@npm:^3.1.23":
version: 3.3.8
resolution: "nanoid@npm:3.3.8"
bin:
nanoid: bin/nanoid.cjs
checksum: dfe0adbc0c77e9655b550c333075f51bb28cfc7568afbf3237249904f9c86c9aaaed1f113f0fddddba75673ee31c758c30c43d4414f014a52a7a626efc5958c9
languageName: node
linkType: hard

"nanoid@npm:^3.3.4":
version: 3.3.4
resolution: "nanoid@npm:3.3.4"
Expand Down Expand Up @@ -14484,6 +14533,18 @@ __metadata:
languageName: node
linkType: hard

"query-string@npm:^7.1.3":
version: 7.1.3
resolution: "query-string@npm:7.1.3"
dependencies:
decode-uri-component: ^0.2.2
filter-obj: ^1.1.0
split-on-first: ^1.0.0
strict-uri-encode: ^2.0.0
checksum: 91af02dcd9cc9227a052841d5c2eecb80a0d6489d05625df506a097ef1c59037cfb5e907f39b84643cbfd535c955abec3e553d0130a7b510120c37d06e0f4346
languageName: node
linkType: hard

"querystringify@npm:^2.1.1":
version: 2.2.0
resolution: "querystringify@npm:2.2.0"
Expand Down Expand Up @@ -14644,7 +14705,7 @@ __metadata:
languageName: node
linkType: hard

"react-is@npm:^16.12.0, react-is@npm:^16.13.1, react-is@npm:^16.7.0":
"react-is@npm:^16.12.0, react-is@npm:^16.13.0, react-is@npm:^16.13.1, react-is@npm:^16.7.0":
version: 16.13.1
resolution: "react-is@npm:16.13.1"
checksum: f7a19ac3496de32ca9ae12aa030f00f14a3d45374f1ceca0af707c831b2a6098ef0d6bdae51bd437b0a306d7f01d4677fcc8de7c0d331eb47ad0f46130e53c5f
Expand Down Expand Up @@ -16457,6 +16518,13 @@ __metadata:
languageName: node
linkType: hard

"split-on-first@npm:^1.0.0":
version: 1.1.0
resolution: "split-on-first@npm:1.1.0"
checksum: 16ff85b54ddcf17f9147210a4022529b343edbcbea4ce977c8f30e38408b8d6e0f25f92cd35b86a524d4797f455e29ab89eb8db787f3c10708e0b47ebf528d30
languageName: node
linkType: hard

"split2@npm:^3.0.0":
version: 3.2.2
resolution: "split2@npm:3.2.2"
Expand Down Expand Up @@ -16542,6 +16610,13 @@ __metadata:
languageName: node
linkType: hard

"strict-uri-encode@npm:^2.0.0":
version: 2.0.0
resolution: "strict-uri-encode@npm:2.0.0"
checksum: eaac4cf978b6fbd480f1092cab8b233c9b949bcabfc9b598dd79a758f7243c28765ef7639c876fa72940dac687181b35486ea01ff7df3e65ce3848c64822c581
languageName: node
linkType: hard

"string-argv@npm:0.3.1":
version: 0.3.1
resolution: "string-argv@npm:0.3.1"
Expand Down Expand Up @@ -17461,6 +17536,15 @@ __metadata:
languageName: node
linkType: hard

"use-latest-callback@npm:^0.1.5":
version: 0.1.11
resolution: "use-latest-callback@npm:0.1.11"
peerDependencies:
react: ">=16.8"
checksum: cc6df404a4ed3a39d0eb014a815c2e568a6abbe8c5ff09f9205a08bf68e86201826ed633865a6056ca0fd9581e0e7e70f18ca26c592a9eaccea5d244cf283b1f
languageName: node
linkType: hard

"use-sync-external-store@npm:^1.0.0":
version: 1.2.0
resolution: "use-sync-external-store@npm:1.2.0"
Expand Down
Loading