Skip to content

[iOS] Make sure the Window is available#28013

Closed
tj-devel709 wants to merge 45 commits intomainfrom
dev/TJ/ScrollWindowNull
Closed

[iOS] Make sure the Window is available#28013
tj-devel709 wants to merge 45 commits intomainfrom
dev/TJ/ScrollWindowNull

Conversation

@tj-devel709
Copy link
Copy Markdown
Member

Description of Change

There is an issue where the KeyboardAutoManagerScroll.AnimateHidingKeyboard is looking for the NextResponder after the Window has been garbage collected. These changes will make sure if the Window has been GC'd, we will stop the search and return null.

This PR still needs to be tested

Issues Fixed

Fixes #dotnet/macios#21648

@tj-devel709 tj-devel709 added platform/ios area-controls-window Window perf/memory-leak 💦 Memory usage grows / objects live forever (sub: perf) labels Feb 24, 2025
@tj-devel709 tj-devel709 added this to the .NET 9 SR5 milestone Feb 24, 2025
tj-devel709 and others added 24 commits February 24, 2025 22:45
This reverts commit 47de72a.
… - 2 (#27405)

* Migrated the ContextMenu related test cases

* Addressed the feedback and added one more case

* Removed snapshots and updated the some test cases

* Added the comments
…ion - 9 (#27743)

* Enabled TestCases in All platforms

* Updated changes

* Updated Snapshots

* Updated Mac Snapshots

* Update Issue25362.cs
…ion - 10 (#27751)

* Migrated the 8 cases from issues folder

* Addressed the feedbacks

* Migrated the 8 cases from issues folder

* Updated the snapshots for Mac platform

* Updated the Issue20920

* Updated the Issue20920.cs

* Added the images for mac platform

* Addressed the feedbacks

* Updated the Issue20920

* Issue5191 test enabled for the Mac platform

* Migrated the 8 cases from issues folder

* Migrated the 8 cases from issues folder

* Updated the Issue20920

* Added the images for mac platform

* Addressed the feedbacks

* Updated the Issue22306
)

* enabled flaky UITest cases

* updated changes

* updated changes

* Updated Image

* updated Android image
* Verified the flaky test cases

* Verified the Flaky related test cases

* Addressed the Feedbacks

* Added the Issue20535

* Added the comment to the  Issue2354

* Update the snapshot for Windows platform
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
The `_PublishBlobItems` target in `eng/Publishing.props` needs to hook
into the publishing targets, and it looks like `PublishDependsOnTargets`
can be used to accomplish this.
…View (#27669)

* Added repro sample

* Added UITest

* Some changes based on the issue attached log (cannot repro the issue)
* Fixed the IsEnabled property dynamic updating issue.

* Updated the fix and added the test case.

* Added the output images for android and iOS

* Updated the fix and test case.

* Added the output image.

* Updated the test case and output image

* Added color for check box

* Updated windows image.

* Added the macOS output image
* [ci] Remove usage on cake script

* [ci] Restore packages with net10  by not using PackagePruning
…ion - 11 (#27764)

* enable test case for all platforms

* update the changes

* modified changes

* replace snapshot

* update the changes

* modified changes

* modified
* [android] move `IsDispatchRequiredImplementation()` to Java

Context: #8919
Context: https://github.com/jonathanpeppers/MAUI_CollectionView/tree/net9.0

Profiling the above sample, I saw a lot of time in:

    46.21ms (0.89%)	0.00ns (<0.01%)	Microsoft!Microsoft.Maui.Dispatching.Dispatcher.IsDispatchRequiredImplementation()

`Microsoft.Maui.Dispatching.Dispatcher.IsDispatchRequired` looks like
it is called *a lot* by .NET MAUI, so it's likely worth improving here.

Almost all of the time is spent on the check:

    _looper != Looper.MyLooper();

`MyLooper()` does interop to Java, and then bookkeeping to create a C#
instance of the `Looper`.

You can see this time spent inside `IsDispatchRequiredImplementation()` as:

    20.18ms (44%) Mono.Android!Java.Lang.Object.GetObject(intptr,Android.Runtime.JniHandleOwnership)

If we instead move the call to Java, C# can instead call a new
`PlatformDispatcher` type that extends `Handler`:

    _dispatcher.IsDispatchRequired;

So now C# calls a Java method that simply returns a `bool`, and no C#
`Looper` instance has to be created or managed. This completely
removes the ~20ms or so we see spent in `Java.Lang.Object.GetObject()`.

This will also help performance tiny amount at startup, as we don't
call `MyLooper()` or `MainLooper` any longer in C#, when creating the
`Dispatcher`.

* Update src/Core/AndroidNative/maui/src/main/java/com/microsoft/maui/PlatformDispatcher.java
* [ci] Move device tests to Sequoia

* [ci] Fix provisioning uitests

* [ci] Move templates to Sequoia

* [ci] Make sure to run iOS tests on 18.0 simulators
* remove Dispose call on ShellItemRenderer

* update publicAPI txt
* Added UITest for SliderControl

* Modified changes in UI

* Modified UI Test cases

* Added snapshots for Android

* Updated the images for android

* Added images for IOS

* Addressed feedbacks

* Added images for Catalyst and Windows

* Added Markdown File

---------

Co-authored-by: Anandhan Rajagopal <97146406+anandhan-rajagopal@users.noreply.github.com>
* Fix naming

* More changes

* Updated test

* Updated snapshot

* More changes
jkurdek and others added 19 commits March 3, 2025 13:40
…27610)

* [BindingSG] Added Binding.Create support for xaml generated sources

* Removed redundant checks from BindingCreate verification
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* add DebuggerTypeProxy for Shell

* add DebuggerTypeProxy for ShellItem and BaseShellItem

* add DebuggerTypeProxy for ShellSectionCollection

* add DebuggerTypeProxy for ShellSection and Collection
* [ci] Always provisioning on devdiv

* [ci] Don t provision tvOS

* Provision uitests

* [ci] Fix uitest steps provisioning
)

* Fix for Issue 26498 - Null Exception in listview

* Modified the changes

* Modified the test case sample

* Apply suggestions from code review

---------

Co-authored-by: Gerald Versluis <gerald@verslu.is>
… when binding context values are changed (#27151)

* Fixed FlyoutItem issue

* Fixed Flyout Issues.

* Added test case.

* Added snapshot for WinUI and Mac

* Revert changes
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Implement the option to change system theme on Appium

* Fix build error
)

* Resolved catalyst failures

* Update ShellTabBarTests.iOS.cs

* Update ShellTabBarTests.iOS.cs

* Addressed review concerns
* [Android] Fixed the ScrollbarVisibility issues

* Committed the review changes and added additional test

* Renamed Variable
…en dynamically updated. (#27742)

* Fixed The FontImageSource icon color does not change in the TabbedPage when dynamically updated.

* Updated code changes
* Update SkiaSharp package versions

* Update GTK to match the new versions

* Use the new SkiaSharp APIs in resizetizer

* Regenerate resizetizer test images

* Improve test assertions

* Color ToString is invariant

* Update Graphics.Skia with new SkiaSharp APIs

* Regenerate graphics images

* Force all images to be regenerated on CI

* Fix stack overflow by setting the typeface
* Fixed-ImageButton-Padding-Issue-iOS

* Modified-code

* Optimized-code

* Added-Mac-Snapshot

* fixed-conflicts

* Removed-nullable-directive

* Resolved-Conflicts

* Modified-Code

* Updated-Snapshots

* Modified-Code

* Modified-Snapshot

---------

Co-authored-by: prakashKannanSf3972 <127308739+prakashKannanSf3972@users.noreply.github.com>
Co-authored-by: Javier Suárez <javiersuarezruiz@hotmail.com>
…15668)

* IsNullOrEmpty for Paint not returning true if Colors are not set

* Updated unit test

* Updated tests

* More tests

* Added more tests

* Updated conditions

* Added more tests

* Changed condition to work when only one collor is missing

---------

Co-authored-by: Javier Suárez <javiersuarezruiz@hotmail.com>
@PureWeen PureWeen modified the milestones: .NET 9 SR5, .NET 9 SR6 Mar 7, 2025
@tj-devel709 tj-devel709 closed this Mar 7, 2025
@github-project-automation github-project-automation bot moved this from Todo to Done in MAUI SDK Ongoing Mar 7, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Apr 7, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-controls-window Window perf/memory-leak 💦 Memory usage grows / objects live forever (sub: perf) platform/ios

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.