Skip to content

[iOS] BottomNavigation with custom TabStrip is "cutting" any scrollable content #8220

Closed

Description

@NickIliev

Environment

  • CLI: 6.3.0
  • Cross-platform modules: 6.3.0
  • iOS Runtime: 6.3.0

Describe the bug

Using custom tan strip with scrollable content is causing the last portion of the content to be hidden behind the tab strip. Possible related to #7471

To Reproduce

  • Deploy on iOS phone/emmulator (works on Android)
  • Use this Playground
  • Scroll to the bottom - you should be able to see the "END of CONTENT" label but it is hidden behind the tab strip.

Expected behavior

To be able to scroll all scrollable content outside the tabstrip item.

Sample project

https://play.nativescript.org/?template=play-ng&id=xDXBee&v=8&_ga=2.96675223.942765476.1577959082-1966613037.1569573015

Additional context

Probably related to #7471

Reported via t.1447435

Activity

  1. NickIliev commented on Jan 6, 2020

    @NickIliev
    ContributorAuthor

    The solution is to wrap the BottomNavigation in an additional layout.
    Playground demo here

  2. NickIliev commented on Jan 8, 2020

    @NickIliev
    ContributorAuthor

    It seems that the grid-wrapping solution above is not working when we have a page-router-outlet as tab content. For example the issue is present when there is a large scrollable content in one of the page-router-outlets as shown below

        <BottomNavigation #bottomNav
                          (selectedIndexChanged)="activateOutlet($event.newIndex)"
                          (loaded)="onBottomNavLoaded()">
          <TabContentItem><page-router-outlet name="overviewTab"></page-router-outlet></TabContentItem>
          <TabContentItem><page-router-outlet name="paymentTab"></page-router-outlet></TabContentItem>
          <TabContentItem><page-router-outlet name="communityTab"></page-router-outlet></TabContentItem>
          <TabContentItem><page-router-outlet name="feedTab"></page-router-outlet></TabContentItem>
          <TabContentItem><page-router-outlet name="moreTab"></page-router-outlet></TabContentItem>
        </BottomNavigation>
  3. NickIliev commented on Jan 14, 2020

    @NickIliev
    ContributorAuthor

    This issue seems closely related to the above behavior

  4. self-assigned this
    on Jan 16, 2020
  5. vakrilov commented on Jan 20, 2020

    @vakrilov
    Contributor

    We found that the issue is related to this "simple" rule and is caused by the NSEmptyOutletComponent used in Angular when there is lazy loaded modules. It renders a Frame which is not wrapped in a layout and the result is that it sometimes gets its dimensions wrong.

    There is an easy workaround - implement and use a custom version of NSEmptyOutletComponent. The approach is shown in this repo. The custom empty outlet implementation (and usage in the routing module) is in this commit.

  6. NickIliev commented on Feb 3, 2020

    @NickIliev
    ContributorAuthor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions