Prism icon indicating copy to clipboard operation
Prism copied to clipboard

[BUG] Content of a ContentPage doesn't occupy full height when page is pushed to PrismNavigationPage

Open anpin opened this issue 1 year ago • 3 comments

Description

Content of a PrismNavigationPage has inconsistent layout on MAUI iOS and MacCatalyst. Not sure if this issue belongs here or upstream in the MAUI, but I can reproduce it only when using prism.

Please see the repro for screenshots https://github.com/anpin/prism-ios-layout

Steps to Reproduce

  1. Clone https://github.com/anpin/prism-ios-layout
  2. Run Debug on iOS -> tap the "Click me" -> Observe aquamarine colored space on top of the list
  3. Run NOPRISM on iOS for vanilla MAUI navigation page with the exact same page shown -> Observe no additional space on top of the list
  4. Run Debug on Mac -> Observe aquamarine space on top of the button -> tap the "Click me" -> Observe pink colored space on top of the list
  5. Run NOPRISM on Mac for vanilla MAUI navigation page with almost exact same page shown -> Observe no additional space on top of the button or list on the next page

Platform with bug

.NET MAUI

Affected platforms

iOS, macOS

Did you find any workaround?

not yet

Relevant log output

No response

anpin avatar Feb 03 '24 13:02 anpin

I've noticed this issue aswell but I don't think Prism is to blame. PrismNavigationPage inherits NavigationPage, I think instead it is a Maui issue.

A good workaround is to put this on your ContentPage:

Padding="{OnPlatform '0', iOS='0,-5,0,0'}"

Axemasta avatar Feb 13 '24 15:02 Axemasta

I opened an issue in MAUI repo too. However as mentioned in the reproduction the native navigation page doesn't have the gap.

anpin avatar Feb 14 '24 09:02 anpin

@anpin ultimately this is unlikely to be a Prism issue. Prism doesn't make up it's own Navigation handlers, we build on top of the MAUI API's for Navigation making it easier but in the end it's just using the same Push and Pop methods that you would get from MAUI itself.

dansiegel avatar Feb 14 '24 12:02 dansiegel

fixed in upstream

anpin avatar May 01 '24 10:05 anpin