-
-
Notifications
You must be signed in to change notification settings - Fork 241
Broken layout in iOS after upgrading to Nativescript 5 #1599
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
Comments
Same here... any workarounds?... |
Nope, no workarounds that I know of. I was told to try and downgrade tns-core-modules as this seems to be where the issue is (I believe tns-core-modules handles layout) but it just created more issues. |
I've tried multiple combinations of GridLayout, FlexboxLayout and StackLayout and everything gets overlapped in iOS. This is really frustrating since we need to update our app and wont be able to publish until this gets fixed... Android on the other hand works fine. |
Same issue here. Update: Reverting my "tns-core-modules" did seem to solve the problem for me. |
Just out of interest, what |
@thequiet @cerealexx hey guys in NativeScript 5.0.0 the iOS Safe Area support was introduced and it can be controlled via a boolean property called If anyone has a specific case and needs further assistance please do create a Playground demo and I will be happy to investigate it. @marklanhamhc you case seems not to be relaated to the Safe area support but more to the template option used with the structural directive ngFor inside the scrollview. We are still ireviwing this one but please do let us know if you have more insights on the issue. |
@marklanhamhc it seems that using the Angular's 'ngFor' structural directive along with the NativeScript's StackLayout is causing this one in cases where the items does not have predefined size (e.g. Stacklayout with no width) and you are creating a dynamicly resized ScrollView which waits for the right sizes. We are currently investigating why the making and paddings are not applied as expected. Meanwhile, as a workaround, you could create the same logic while directly using the Label component instead of StackLayout.
Playground demo of the above can be found here. |
I've tried setting the |
...just to add, I've also tried removing all of the |
Yeah... I ended up testing plain |
Might this be related to this: #1593 ? Best |
Not quite, I have also tried adding |
@marklanhamhc are you still having the issue with the linked Playground ? |
Yes, I viewed your Playground link but its still broken on my iPhone X: I also tried editing the other sections to match the one you edited but ran into the same issues: |
4.2.1, and yes it still worked. |
Ok, good to know. We did also try rolling back to |
Even I fixed it by rolling to 4.2.1 but have deal breaking bugs for android with 4.2.1 Any workaround to fix this with version 5 ? |
@NickIliev curious on this one - this seems to be a cascading serious breaking change with 5.0. Is this anticipated to be fixed in an upcoming patch release/hotfix? Just curious if you all are aware of this or acknowledged there is a problem here (it's labeled |
Having layout issues too #1594 Also, when using the slider, it totally messes up the layout |
Can confirm the slider issue was fixed when reverting to:
|
Hi guys, thanks for reporting these. I will be looking into this. There seems to be a problem with the ScrollView passing its size to its children in angular. In the meantime, I applied |
Okay, @MartoYankov I have figured out why this is happening From tns 5, safeArea was introduced. What is happening is, if you checkout view.ios.ts, where we are readjusting the frame and assigning adjusted frame to native.frame. If i just comment out those lines, and disable offset adjustment, everything works fine. |
@sivsushruth Yep, the property |
No, actually it does not solve problem when content is deeply nested, or inside list view etc. We cannot put iosOverFlowSafeArea for all components. |
Yeah, understood @MartoYankov, the |
I see this task has been closed, does this mean the bug fix has been released into the latest version of Nativescript 5? If so, which version? |
@marklanhamhc as of this moment the fix is currently in the
|
Hey @NickIliev, after I updated to next everything seemed back to normal. But I think I found a new behavior related to this bug that is still affecting this version. In iOS, if you are in a view that was affected by the old bug and you call a modal, after dismissing the modal, the view is again messed up with all the layouts overlapping. |
Also happens when opening and closing a drawer. |
@cerealexx I've tested the case with RadSideDrawer and safe area but everything works as expected on my side. Make sure that you are using the latest version of Update: the above is also valid for the modal view scenario (works as expected on our side) so additional details on how to reproduce the issue will be appreciated. |
Same here on an iPhone X: after opening a modal an closing it, the first element of a list view slides under the navigation bar and only half of its height is visible. I have to do keyboard input or click somewhere to refresh and correct the layout dimensions. There seems to be an issue with the refresh of a view: I'm having the same trouble with a scrollview (#1593), which only refreshed if I type some text in a textfield (don't know why). In both cases, I have to do a lot of messy code like programmatically scroll up and down to force a refresh or use refresh encapsulated in |
@cremfert Can you please open a new issue regarding this? Also, if you can provide some code sample, it would be great. |
FYI adding iosOverflowSafeAreaEnabled="false" to the ScrollView fixed this issue for me as it cascaded the disabling of OverflowSafeArea to all children. (using tns-core-modules 5.1.2) |
Hi! I have the same bug, look: Somebody can help me? |
@SebastianCBA I think the issue here is different - you have conditional layout inside the listview cells. On iOS this might result in unpredictable behavior. You should use multiple templates instead. See this example - https://play.nativescript.org/?template=play-vue&id=L8tcfY&v=23 |
@MartoYankov I have removed the conditions and the problem persists...
the application is broken |
@SebastianCBA I've also removed the conditions and the items laid out properly. See this playground - https://play.nativescript.org/?template=play-vue&id=MHVN2k&v=51. There is a weird behavior with scrolling. I believe the issue there is with the infinite scroll implementation. I don't think this is connected to the current issue. Please open a new one, so that we can take a look at it properly. |
Environment
Provide version numbers for the following components (information can be retrieved by running
tns info
in your project folder or by inspecting thepackage.json
of the project):This is what I get when I run
tns doctor
:✔ Your ANDROID_HOME environment variable is set and points to correct directory.
✔ Your adb from the Android SDK is correctly installed.
✔ The Android SDK is installed.
✔ A compatible Android SDK for compilation is found.
✔ Javac is installed and is configured properly.
✔ The Java Development Kit (JDK) is installed and is configured properly.
✔ Xcode is installed and is configured properly.
✔ xcodeproj is installed and is configured properly.
✔ CocoaPods are installed.
✔ CocoaPods update is not required.
✔ CocoaPods are configured properly.
✔ Your current CocoaPods version is newer than 1.0.0.
✔ Python installed and configured correctly.
✔ The Python 'six' package is found.
✔ Xcode version 10.1.0 satisfies minimum required version 9.
✔ Getting NativeScript components versions information...
✔ Component nativescript has 5.0.0 version and is up to date.
✔ Component tns-core-modules has 5.0.2 version and is up to date.
✔ Component tns-android has 5.0.0 version and is up to date.
✔ Component tns-ios has 5.0.0 version and is up to date.
Describe the bug
Layout is broken in iOS. Android works fine. iOS was working fine before upgrading from NS4 to NS5.
To Reproduce
See sample project in Playground example below.
Expected behavior
Home page shopping lists should be stacked without overlapping.
Sample project
See example here: https://play.nativescript.org/?template=play-ng&id=eGOyrq&v=13
The text was updated successfully, but these errors were encountered: