mukaschultze / nativescript-windowed-modal

Consistent modals for Android and iOS
https://www.npmjs.com/package/nativescript-windowed-modal
Apache License 2.0
47 stars 18 forks source link

Upgrade to @nativescript/core 7 #34

Closed limux82 closed 4 years ago

limux82 commented 4 years ago

Trying with @nativescript/core 7 (7.0.0-rc.57), version of this plugin 6.2.1 I see this error in compilation due to changes in namespace in @nativescript/core

ERROR in ../node_modules/nativescript-windowed-modal/modal-stack.js Module not found: Error: Can't resolve '@nativescript/core/ui/layouts/stack-layout/stack-layout' in '/nativescript-windowed-modal' @ ../node_modules/nativescript-windowed-modal/modal-stack.js 4:21-87 @ ../node_modules/nativescript-windowed-modal/index.js @ ./app/shared/shared.module.ts @ ./app/app.module.ts @ ./main.ts

ghost commented 4 years ago

Changes to work with NS 7 can be found here: https://github.com/toby-wollit/nativescript-windowed-modal/commit/2a09068b78e4f765dcd804a1e566d5cfde18aed9

I haven't opened a pull request because I've not had time to update the demos or test on Android.

mukaschultze commented 4 years ago

Can anyone test if @toby-wollit's branch works on Android? I don't have the tooling available right now

wendt88 commented 4 years ago

tested (run ns migrate inside ./demo) and ns debug ... on iOS it seems ok, but on android nothing opens

PhilippS93 commented 4 years ago

Tested on Android. The method overrideModalViewMethod is not working. Nothing is shown, but only a dark faded modal background. Removing the method call shows the correct dialogs but with wrong padding.

PhilippS93 commented 4 years ago

A running fork which is NS 7 ready can be found here: https://github.com/enduco/nativescript-windowed-modal

Edit: Pushed missing commits

ghost commented 4 years ago

https://github.com/mukaschultze/nativescript-windowed-modal/pull/35

manijak commented 4 years ago

Will this be updated to support ns7 or is there a new plugin based on this one?

PhilippS93 commented 4 years ago

Will this be updated to support ns7 or is there a new plugin based on this one?

See https://github.com/mukaschultze/nativescript-windowed-modal/pull/36

manijak commented 4 years ago

Can anyone confirm #36 is working on the latest Ns7 build? I ran the build script in the src folder beforehand.

I keep getting the following runtime error in my app:

***** Fatal JavaScript exception - application has been terminated. *****
NativeScript encountered a fatal error: Uncaught TypeError: layout_base_1.CSSType is not a function
at
(file: app/Users/nedim/Projects/nativescript-windowed-modal/src/dist/modal-stack.js:52:0)
at ../../nativescript-windowed-modal/src/dist/modal-stack.js(file: app/Users/nedim/Projects/nativescript-windowed-modal/src/dist/modal-stack.js:56:1)
at __webpack_require__(file: app/webpack/bootstrap:816:0)
at fn(file: app/webpack/bootstrap:120:0)
at ../../nativescript-windowed-modal/src/dist/index.js(file: app/Users/nedim/Projects/nativescript-windowed-modal/src/dist/index.js:3:20)
at __webpack_require__(file: app/webpack/bootstrap:816:0)
at fn(file: app/webpack/bootstrap:120:0)
at (file: app/app.ts:10:28)
at ./app.ts(file:///app/bundle.js:1048:30)
at __webpack_require__(file: app/webpack/bootstrap:816:0)
at checkDeferredModules(file: app/webpack/bootstrap:43:0)
at webpackJsonpCallback(file: app/webpack/bootstrap:30:0)
at (file:///app/bundle.js:2:57)
at require(:1:137)

And I get this when trying to run one of the demos:

***** Fatal JavaScript exception - application has been terminated. *****
NativeScript encountered a fatal error: Uncaught RangeError: Maximum call stack size exceeded
at
Property.get(file: node_modules/@nativescript/core/ui/core/properties/index.js:201:0)
at eachChild(file: node_modules/@nativescript/core/ui/text-base/text-base-common.js:130:0)
at _tearDownUI(file: node_modules/@nativescript/core/ui/core/view-base/index.js:592:0)
at (file: node_modules/@nativescript/core/ui/core/view-base/index.js:593:0)
at eachChildView(file: node_modules/@nativescript/core/ui/layouts/layout-base-common.js:101:0)
at eachChild(file: node_modules/@nativescript/core/ui/core/view/view-common.js:700:0)
at _tearDownUI(file: node_modules/@nativescript/core/ui/core/view-base/index.js:592:0)
at (file: node_modules/@nativescript/core/ui/core/view-base/index.js:593:0)
at eachChildView(file: node_modules/@nativescript/core/ui/layouts/layout-base-common.js:101:0)
at eachChild(file: node_modules/@nativescript/core/ui/core/view/view-common.js:700:0)
at _tearDownUI(file: node_modules/@nativescript/core/ui/core/view-base/index.js:592:0)
at (file: node_modules/@nativescript/core/ui/core/view-base/index.js:593:0)
at eachChildView(file: node_modules/@nativescript/core/ui/content-view/index.js:65:0)
at eachChildView(file: node_modules/@nativescript/core/ui/page/page-common.js:99:0)
at eachChild(file: node_modules/@nativescript/core/ui/core/view/view-common.js:700:0)
at _tearDownUI(file: node_modules/@nativescript/core/ui/core/view-base/index.js:592:0)
at _setupUI(file: node_modules/@nativescript/core/ui/core/view-base/index.js:512:0)
at _setupAsRootView(file: node_modules/@nativescript/core/ui/core/view-base/index.js:505:0)
at _setupAsRootView(file: node_modules/@nativescript/core/ui/core/view/view-common.js:154:0)
at iosModal(file:///app/bundle.<…>
wollittech commented 4 years ago

Could you please merge either #35 or #36 and publish a new release?

mukaschultze commented 4 years ago

NS7 support is now available via nativescript-windowed-modal@latest thanks to @toby-wollit and @PhilippS93 for the migrations.