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

ScrollView ios safe area issue #2

Open
ghost opened this issue Jul 21, 2021 · 11 comments
Open

ScrollView ios safe area issue #2

ghost opened this issue Jul 21, 2021 · 11 comments

Comments

@ghost
Copy link

ghost commented Jul 21, 2021

When using PullToRefresh with <ScrollView iosOverFlowSafeArea="true"> the refresh control sits inside the safe area behind the notch.

<pr:PullToRefresh refresh="refreshData">
  <ScrollView iosOverflowSafeArea="true">
    ...
  </ScrolLView>
</pr:PullToRefresh>

Screenshot from 2021-07-21 16-01-46

@farfromrefug
Copy link
Member

@toby-wollit that s normal if you use iosOverflowSafeArea. Not a bug i think

@ghost
Copy link
Author

ghost commented Jul 21, 2021

The refreshControl is cut in half - How would we adjust its position so that it is visible?

@ghost
Copy link
Author

ghost commented Jul 21, 2021

Also, after the first refresh the page content jumps up by the height of the safe area. (same issue mentioned here: https://stackoverflow.com/questions/53263346/nativescript-pull-to-refresh-page-behind-actionbar-after-refresh-nativescript)

@farfromrefug
Copy link
Member

Again it is normal as you overflow the safe area and thus get under the notch.
And your other issue do not seem to be related to this plugin

@ghost
Copy link
Author

ghost commented Jul 21, 2021

I agree that it makes sense the refresh control is within the safe area, but we need the ability to move the refreshControl so that it is visible.

Also, the second issue is related to this plugin. Would you like me to setup an example repository?

@farfromrefug
Copy link
Member

@toby-wollit i am sorry but it is out of the scope of that plugin. It follows the specs of safearea and i wont change that. You need to play with your listview contentOffset but again it is in the listview component not this plugin.
And i am almost 100% sure the second issue is related to how N handles safe area. And the linked discussion seems to go that way.

@cuzzea
Copy link

cuzzea commented Jan 22, 2022

Hey, did you ever found a solution for this? I am having the same issue, regardless of the value of iosOverFlowSafeArea. The loader never shows up for me, because I think it's hidden behind the ActionBar. Using the margin-top: 1 works, but it adds a really ugly padding to anything in the ScrollView.

<ActionBar title="Dashboard"></ActionBar>
<PullToRefresh (refresh)="refreshList($event)" style="margin-top: 1">
  <ScrollView width="100%" height="100%" class="main-holder">...</ScrollView>
</PullToRefresh>

Loader not visible:

image

Margin causing content cut-off

image

Any tips on how to do this without the margin would be helpful.

@farfromrefug
Copy link
Member

@cuzzea dont think this is the same issue. try to wrap the pull inside a gridlayout

@cuzzea
Copy link

cuzzea commented Jan 22, 2022

I tried multiple combinations of layouts and properties with height and iosOverflowSafeArea and the best I could get was having the loader show up (with GridLayout and iosOverflowSafeArea="false" on ScrollView) but now I have the bottom part of the app cut off. I can see, using backgroundColor, that the grid view is taking the necessary space, going to the bottom of the screen, but the scroll view dose not.

<ActionBar title="Dashboard"></ActionBar>
<GridLayout backgroundColor="red">
  <PullToRefresh (refresh)="refreshList($event)">
    <ScrollView width="100%" height="100%" iosOverflowSafeArea="false">

image

I removed the PullToRefresh component, and now the cut-off height is 50% smaller

<ActionBar title="Dashboard"></ActionBar>
<GridLayout backgroundColor="red">
  <ScrollView width="100%" height="100%" iosOverflowSafeArea="false">

image

so in short

  • iosOverflowSafeArea="false" on ScrollView brings back the loader and there is no margin on top, but there is a bottom cut-off
  • no iosOverflowSafeArea and margin-top on PullToRefresh streaches the content to the end, but adds the margin on top

Let me know if I should move this conversation to a new issue to not span this one, if it's not related.

@farfromrefug
Copy link
Member

@cuzzea no.let s keep it here. might be related. could you create a simple repro example? ( vue or vanilla, no angular)

@stasdav
Copy link

stasdav commented May 27, 2023

@cuzzea It solved the same problem <PullToRefresh @refresh="updateSettings" style="margin-top: 0.001" height="100%"> style="margin-top: 0.001"

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

No branches or pull requests

3 participants