Skip to content

[iOS] ScrollView inside a nested RadSideDrawer incorrect layout #7185

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

Closed
erjdriver opened this issue Apr 27, 2019 · 12 comments
Closed

[iOS] ScrollView inside a nested RadSideDrawer incorrect layout #7185

erjdriver opened this issue Apr 27, 2019 · 12 comments

Comments

@erjdriver
Copy link

This is a repeat of issue #6674.

Aplogies - but I posted at the end of that issue and getting no response.

The issue is: With the following xml, sometimes it creates an extra margin at the top - the green part of the image (ios only).

main-page.xml.txt

51789202-652e1880-2154-11e9-826c-834cf6d63183

Using the latest environment 5.3.x

@tsonevn
Copy link
Contributor

tsonevn commented Apr 29, 2019

Hi @erjdriver,
Try setting up the RadSideDrawer component as a root component and check if the issue will be still reproducible. For further help, you can review our drawer-navigation template.

@erjdriver
Copy link
Author

erjdriver commented Apr 29, 2019

You're saying no Page element??

Then where would I put the ActionBar?

My actual page is not the root/starting page of the page, it's just another page the user can navigate to - so there's a limit to how much I can change. I'd prefer to get this working as is considering...this same code works on Android and did on ios until about 2-3 months ago - so it's a bug in NS.

But I'd be happy to change things as long as I can have the ActionBar and also be able to navigate to this page (i.e. not a root page).

If I remove the ActionBar - the offset is less.

This problem can be easily replicated by creating a sample tsc project and replace the main-page.xml with my code above.

@tsonevn
Copy link
Contributor

tsonevn commented Apr 30, 2019

Hi @erjdriver,
I tested the provided XML in a local project. However, I was unable to recreate the issue on my side. I will check again in the lower iOS versions.
Meanwhile, my suggestion was to set the RadSideDrawer in the app-root.xml and then set the Frame as mainContent. In this scenario, the ActionBar should be still defined in each page individually as it is done in the template, that I have mentioned in my previous comment. The idea of this check is to verify if layouting will be fixed. Also, keep in mind that RadSideDrawer will not be stretched while using it inside the pages on iPhone X and above. Check out this feature request.

It will also help if you can send a project, which can be used for debugging.

@erjdriver
Copy link
Author

Here's the project with the problem.

I just did tns create layout-problem --template tsc

Then added nativescript-ui-sidedrawer plugin.

The latest NS versions are installed - 5.3.x

The simulator is running iPhone 6 running ios 12.2.

layout-problem.zip

@erjdriver
Copy link
Author

erjdriver commented Apr 30, 2019

I followed your suggestion - and attached is the app with RadSideDrawer in app-root.xml file.

In main-page.xml file, if I enable the ActionBar code - it works as expected.

But if the ActionBar is commented out, then there's a layout issue.

Please see attached screenshot. The layout goes all the way to the top of the device screen (shown in blue. Looks like the parent GridLayout starts at y-offset 0 and again there's an offset before the child ScrollView is rendered (area shown in blue).

Works fine on Android (top screenshot).

Screen-shot 2019-04-30 at 10 37 25 AM

layout-problem.zip

Again, there seems to be a layout bug in the ios version - proven by both this and the earlier submitted versions.

I would like the earlier project to work as is - as the second one would require quite a bit of changes in my code - and also I've got some pages without ActionBar - so the above problem would appear.

Thank you.

@DevPlus31
Copy link

I do have the same issue especially when I use RadListView or RadDataForm.
I am using RadSideDrawer for the whole app with Vue template and slot.
I will provide more codes when I will get my Mac.

@erjdriver
Copy link
Author

erjdriver commented May 5, 2019

@tsonevn - as requested I submitted a project with the issue - above with the attached layout-problem.zip file.

Did you get a chance to replicate it?

The last attached zip file above - the problem occurs if the ActionBar is commented out - there's a problem.

In the the second to last attached zip file - is the original code that I'd like to get working (w/o moving the sidedrawer to the root). That problem occurs everytime and should be easy to replicate.

layout-problem.zip

Thanks.

@tsonevn
Copy link
Contributor

tsonevn commented May 6, 2019

Hi @erjdriver,
I was able to recreate your case on my side. I also find this feature request for allowing RadSideDrawer stretch while using it inside the Page component. I would suggest keeping track of it. You can also comment it if you want to add some additional info.
Meanwhile, you can set the SideDrawer component as root and for those Pages without ActionBar to set up the StatusBar color via nativescript-statusbar plugin.

@tsonevn tsonevn closed this as completed May 6, 2019
@erjdriver
Copy link
Author

I don't understand how you can close this issue - it's a bug!

Ok - you're saying for pages with ActionBar have RadSideDrawer as root. This requires me moving quite a bit of re-arrangement of logic and code - but I can do it. This used to work and still works on Android - isn't this a bug on the ios side?

You're saying for pages with OUT ActionBar - style the status bar. The problem is that the page goes to the top of the device screen. If I had a label text at the top of my page - it would be displayed over the status bar. This is a bug - not a matter of styling the status-bar.

NS guys - too many times when I report a bug - it's not fixed. Usually the solution is a workaround or suggestions of code changes on my end.

I'm working on a production software and there are limits to how much changes I can make without causing unforeseen issues.

I appreciate the tool, doesn't matter if it's free or for purchase - bottom line is that - if you guys want this to be used in production app development - it has to be stable and reliable.

@DevPlus31
Copy link

DevPlus31 commented May 6, 2019

Here's my code about the issue. just to precise I am not using ScrollView but I do get the same result (top space) also the issue is iOS only.
https://play.nativescript.org/?template=play-vue&id=JJxeIs
bugios

Thanks.

@tsonevn tsonevn reopened this May 7, 2019
@erjdriver
Copy link
Author

I've implemented my app with RadSideDrawer in the root file now. Unfortunately, the menu also appears on some pages where it shouldn't because of gestures - so I disabled gestures. Side-effect of this workaround.

Please tag this issue as a bug.

Thanks.

@NickIliev
Copy link
Contributor

@erjdriver as of this moment the RadSideDrawer (adn with latest versions) is supported only as a root. Here is how to prevent the drawer from being opened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants