dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
21.87k stars 1.68k forks source link

[iOS] Reusing the same page for formsheet Modal causes measuring issues #6994

Open PureWeen opened 2 years ago

PureWeen commented 2 years ago

https://github.com/dotnet/maui/tree/weird-modal-repro-pr6813

Every time you push the same page the modal gets smaller and smaller. If you create a new ContentPage each time then it measures without any issues

ghost commented 1 year ago

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

jpsaccount commented 1 year ago

It would be great if this is reconsidered soon :)

Manish-Pradhan-FP commented 5 months ago

Any updates? We need this desperately.

rysbilinski commented 5 months ago

Also very keen for updates. @PureWeen is there a workaround for this in the meantime?

Manish-Pradhan-FP commented 5 months ago

@rysbilinski We have resorted to instantiating the modal page each time to overcome this issue for now.

rysbilinski commented 5 months ago

@rysbilinski We have resorted to instantiating the modal page each time to overcome this issue for now.

Thanks so much for the response. Can I ask how you are achieving that? Do you use shell navigation?

Does it impact the performance of showing the modal?

Manish-Pradhan-FP commented 5 months ago

We do not use Shell navigation. We have a Flyout Page as the base page for our App and manage the navigation/push/pop ourselves. There are 2 problems here.

  1. The one OP mentioned in this ticket
  2. Layout changes are not recalculated which means if you rotate your device to Landscape from Portrait the Modal page does not change / does not update when new layout changes are applied for example height, width etc

To get around both issues we have to instantiate the page every time. There is some performance hit but since the modal page for us is not heavy its workable for now.

rysbilinski commented 5 months ago

We do not use Shell navigation. We have a Flyout Page as the base page for our App and manage the navigation/push/pop ourselves. There are 2 problems here.

  1. The one OP mentioned in this ticket
  2. Layout changes are not recalculated which means if you rotate your device to Landscape from Portrait the Modal page does not change / does not update when new layout changes are applied for example height, width etc

To get around both issues we have to instantiate the page every time. There is some performance hit but since the modal page for us is not heavy its workable for now.

thanks so much for your response!

Could you show a code snippet that shows how you are navigating to that page please?

pictos commented 1 month ago

This also happens using ModalPresentationStyle = PageSheet

OudomMunint commented 2 weeks ago

Also having this issue