Fix SearchHandler.QueryIcon, ClearIcon, and ClearPlaceholderIcon do not update dynamically at runtime - #35893
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 35893Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 35893" |
|
Hey there @@SubhikshaSf4851! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
|
/review -b feature/enhanced-reviewer |
MauiBot
left a comment
There was a problem hiding this comment.
Expert Review — 2 findings
See inline comments for details.
|
/azp run maui-pr-uitests |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/review -b feature/enhanced-reviewer -p android |
MauiBot
left a comment
There was a problem hiding this comment.
Expert Review — 3 findings
See inline comments for details.
MauiBot
left a comment
There was a problem hiding this comment.
AI Review Summary
@SubhikshaSf4851 — new AI review results are available based on this last commit:
5e48713. To request a fresh review after new comments or commits, comment/review rerun.
Review Sessions — click to expand
Gate — Test Before & After Fix
Gate Result: ✅ PASSED
Platform: ANDROID · Base: main · Merge base: bb4e7040
| Test | Without Fix (expect FAIL) | With Fix (expect PASS) |
|---|---|---|
🖥️ Issue35736 Issue35736 |
✅ FAIL — 1763s | ✅ PASS — 581s |
🔴 Without fix — 🖥️ Issue35736: FAIL ✅ · 1763s
(truncated to last 15,000 chars)
Cases.HostApp/Debug/net10.0-android/Controls.TestCases.HostApp.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14377095
Graphics -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Graphics.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14377095
Essentials -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Essentials.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14377095
Core -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.dll
Controls.BindingSourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14377095
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14377095
Maps -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Maps.dll
Controls.Core -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14377095
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14377095
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14377095
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14377095
Controls.Foldable -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.Foldable.dll
Microsoft.AspNetCore.Components.WebView.Maui -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.AspNetCore.Components.WebView.Maui.dll
Controls.Maps -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.Maps.dll
Controls.Xaml -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.Xaml.dll
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:08:34.85
Broadcasting: Intent { act=android.intent.action.CLOSE_SYSTEM_DIALOGS flg=0x400000 }
Broadcast completed: result=0
Determining projects to restore...
Restored /home/vsts/work/1/s/src/TestUtils/src/VisualTestUtils/VisualTestUtils.csproj (in 1.08 sec).
Restored /home/vsts/work/1/s/src/TestUtils/src/UITest.NUnit/UITest.NUnit.csproj (in 935 ms).
Restored /home/vsts/work/1/s/src/TestUtils/src/UITest.Core/UITest.Core.csproj (in 4 ms).
Restored /home/vsts/work/1/s/src/TestUtils/src/UITest.Appium/UITest.Appium.csproj (in 1.59 sec).
Restored /home/vsts/work/1/s/src/TestUtils/src/VisualTestUtils.MagickNet/VisualTestUtils.MagickNet.csproj (in 5.73 sec).
Restored /home/vsts/work/1/s/src/TestUtils/src/UITest.Analyzers/UITest.Analyzers.csproj (in 2.58 sec).
Restored /home/vsts/work/1/s/src/Controls/tests/CustomAttributes/Controls.CustomAttributes.csproj (in 5 ms).
Restored /home/vsts/work/1/s/src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj (in 1.26 sec).
5 of 13 projects are up-to-date for restore.
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14377095
Graphics -> /home/vsts/work/1/s/artifacts/bin/Graphics/Debug/net10.0/Microsoft.Maui.Graphics.dll
Controls.CustomAttributes -> /home/vsts/work/1/s/artifacts/bin/Controls.CustomAttributes/Debug/net10.0/Controls.CustomAttributes.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14377095
Essentials -> /home/vsts/work/1/s/artifacts/bin/Essentials/Debug/net10.0/Microsoft.Maui.Essentials.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14377095
Core -> /home/vsts/work/1/s/artifacts/bin/Core/Debug/net10.0/Microsoft.Maui.dll
Controls.BindingSourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14377095
Controls.Core -> /home/vsts/work/1/s/artifacts/bin/Controls.Core/Debug/net10.0/Microsoft.Maui.Controls.dll
UITest.Core -> /home/vsts/work/1/s/artifacts/bin/UITest.Core/Debug/net10.0/UITest.Core.dll
VisualTestUtils -> /home/vsts/work/1/s/artifacts/bin/VisualTestUtils/Debug/netstandard2.0/VisualTestUtils.dll
UITest.NUnit -> /home/vsts/work/1/s/artifacts/bin/UITest.NUnit/Debug/net10.0/UITest.NUnit.dll
VisualTestUtils.MagickNet -> /home/vsts/work/1/s/artifacts/bin/VisualTestUtils.MagickNet/Debug/netstandard2.0/VisualTestUtils.MagickNet.dll
UITest.Appium -> /home/vsts/work/1/s/artifacts/bin/UITest.Appium/Debug/net10.0/UITest.Appium.dll
UITest.Analyzers -> /home/vsts/work/1/s/artifacts/bin/UITest.Analyzers/Debug/netstandard2.0/UITest.Analyzers.dll
Controls.TestCases.Android.Tests -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.Android.Tests/Debug/net10.0/Controls.TestCases.Android.Tests.dll
Test run for /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.Android.Tests/Debug/net10.0/Controls.TestCases.Android.Tests.dll (.NETCoreApp,Version=v10.0)
VSTest version 18.0.1 (x64)
Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
[xUnit.net 00:00:00.00] xUnit.net VSTest Adapter v2.8.2+699d445a1a (64-bit .NET 10.0.0)
[xUnit.net 00:00:00.12] Discovering: Controls.TestCases.Android.Tests
[xUnit.net 00:00:00.47] Discovered: Controls.TestCases.Android.Tests
NUnit Adapter 4.5.0.0: Test execution started
Running selected tests in /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.Android.Tests/Debug/net10.0/Controls.TestCases.Android.Tests.dll
NUnit3TestExecutor discovered 4 of 4 NUnit test cases using Current Discovery mode, Non-Explicit run
>>>>> 06/15/2026 12:50:44 FixtureSetup for Issue35736(Android)
>>>>> 06/15/2026 12:50:45 SearchHandlerClearIconUpdatesAtRuntime Start
>>>>> 06/15/2026 12:50:52 SearchHandlerClearIconUpdatesAtRuntime Stop
Passed SearchHandlerClearIconUpdatesAtRuntime [7 s]
>>>>> 06/15/2026 12:50:52 SearchHandlerClearPlaceholderIconUpdatesAtRuntime Start
>>>>> 06/15/2026 12:50:54 SearchHandlerClearPlaceholderIconUpdatesAtRuntime Stop
Passed SearchHandlerClearPlaceholderIconUpdatesAtRuntime [2 s]
>>>>> 06/15/2026 12:50:54 SearchHandlerQueryIconUpdatesAtRuntime Start
>>>>> 06/15/2026 12:50:59 SearchHandlerQueryIconUpdatesAtRuntime Stop
>>>>> 06/15/2026 12:50:59 Log types: logcat, bugreport, server
Failed SearchHandlerQueryIconUpdatesAtRuntime [5 s]
Error Message:
VisualTestUtils.VisualTestFailedException :
Snapshot different than baseline: SearchHandlerQueryIconUpdatesAtRuntime.png (0.65% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
Stack Trace:
at VisualTestUtils.VisualRegressionTester.Fail(String message) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 162
at VisualTestUtils.VisualRegressionTester.VerifyMatchesSnapshot(String name, ImageSnapshot actualImage, String environmentName, ITestContext testContext) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 123
at Microsoft.Maui.TestCases.Tests.UITest.<VerifyScreenshot>g__Verify|13_0(String name, <>c__DisplayClass13_0&) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 477
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 309
at Microsoft.Maui.TestCases.Tests.Issues.Issue35736.SearchHandlerQueryIconUpdatesAtRuntime() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue35736.cs:line 22
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
>>>>> 06/15/2026 12:50:59 SearchHandlerResetAllRestoresDefaultIcons Start
>>>>> 06/15/2026 12:51:05 SearchHandlerResetAllRestoresDefaultIcons Stop
>>>>> 06/15/2026 12:51:05 Log types: logcat, bugreport, server
Failed SearchHandlerResetAllRestoresDefaultIcons [6 s]
Error Message:
VisualTestUtils.VisualTestFailedException :
Snapshot different than baseline: SearchHandlerResetAllRestoresDefaultIcons.png (0.80% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
Stack Trace:
at VisualTestUtils.VisualRegressionTester.Fail(String message) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 162
at VisualTestUtils.VisualRegressionTester.VerifyMatchesSnapshot(String name, ImageSnapshot actualImage, String environmentName, ITestContext testContext) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 123
at Microsoft.Maui.TestCases.Tests.UITest.<VerifyScreenshot>g__Verify|13_0(String name, <>c__DisplayClass13_0&) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 477
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 309
at Microsoft.Maui.TestCases.Tests.Issues.Issue35736.SearchHandlerResetAllRestoresDefaultIcons() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue35736.cs:line 73
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
NUnit Adapter 4.5.0.0: Test execution complete
Results File: /home/vsts/work/1/s/CustomAgentLogsTmp/UITests/TestResults/Issue35736.trx
Total tests: 4
Passed: 2
Test Run Failed.
Failed: 2
Total time: 41.6805 Seconds
>>> TRX_RESULT_FILE: /home/vsts/work/1/s/CustomAgentLogsTmp/UITests/TestResults/Issue35736.trx
Test run for /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.Android.Tests/Debug/net10.0/Controls.TestCases.Android.Tests.dll (.NETCoreApp,Version=v10.0)
VSTest version 18.0.1 (x64)
Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
[xUnit.net 00:00:00.00] xUnit.net VSTest Adapter v2.8.2+699d445a1a (64-bit .NET 10.0.0)
[xUnit.net 00:00:00.36] Discovering: Controls.TestCases.Android.Tests
[xUnit.net 00:00:00.82] Discovered: Controls.TestCases.Android.Tests
NUnit Adapter 4.5.0.0: Test execution started
Running selected tests in /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.Android.Tests/Debug/net10.0/Controls.TestCases.Android.Tests.dll
NUnit3TestExecutor discovered 2 of 2 NUnit test cases using Current Discovery mode, Non-Explicit run
>>>>> 06/15/2026 12:51:22 FixtureSetup for Issue35736(Android)
>>>>> 06/15/2026 12:51:23 SearchHandlerQueryIconUpdatesAtRuntime Start
>>>>> 06/15/2026 12:51:30 SearchHandlerQueryIconUpdatesAtRuntime Stop
>>>>> 06/15/2026 12:51:30 Log types: logcat, bugreport, server
Failed SearchHandlerQueryIconUpdatesAtRuntime [7 s]
Error Message:
VisualTestUtils.VisualTestFailedException :
Snapshot different than baseline: SearchHandlerQueryIconUpdatesAtRuntime.png (1.36% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
Stack Trace:
at VisualTestUtils.VisualRegressionTester.Fail(String message) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 162
at VisualTestUtils.VisualRegressionTester.VerifyMatchesSnapshot(String name, ImageSnapshot actualImage, String environmentName, ITestContext testContext) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 123
at Microsoft.Maui.TestCases.Tests.UITest.<VerifyScreenshot>g__Verify|13_0(String name, <>c__DisplayClass13_0&) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 477
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 309
at Microsoft.Maui.TestCases.Tests.Issues.Issue35736.SearchHandlerQueryIconUpdatesAtRuntime() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue35736.cs:line 22
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
>>>>> 06/15/2026 12:51:31 SearchHandlerResetAllRestoresDefaultIcons Start
>>>>> 06/15/2026 12:51:37 SearchHandlerResetAllRestoresDefaultIcons Stop
>>>>> 06/15/2026 12:51:37 Log types: logcat, bugreport, server
Failed SearchHandlerResetAllRestoresDefaultIcons [6 s]
Error Message:
VisualTestUtils.VisualTestFailedException :
Snapshot different than baseline: SearchHandlerResetAllRestoresDefaultIcons.png (1.02% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
Stack Trace:
at VisualTestUtils.VisualRegressionTester.Fail(String message) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 162
at VisualTestUtils.VisualRegressionTester.VerifyMatchesSnapshot(String name, ImageSnapshot actualImage, String environmentName, ITestContext testContext) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 123
at Microsoft.Maui.TestCases.Tests.UITest.<VerifyScreenshot>g__Verify|13_0(String name, <>c__DisplayClass13_0&) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 477
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 309
at Microsoft.Maui.TestCases.Tests.Issues.Issue35736.SearchHandlerResetAllRestoresDefaultIcons() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue35736.cs:line 73
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
NUnit Adapter 4.5.0.0: Test execution complete
Results File: /home/vsts/work/1/s/CustomAgentLogsTmp/UITests/TestResults/retry-Issue35736.trx
Test Run Failed.
Total tests: 2
Failed: 2
Total time: 26.7765 Seconds
🟢 With fix — 🖥️ Issue35736: PASS ✅ · 581s
Determining projects to restore...
All projects are up-to-date for restore.
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14377095
Graphics -> /home/vsts/work/1/s/artifacts/bin/Graphics/Debug/net10.0-android36.0/Microsoft.Maui.Graphics.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14377095
Essentials -> /home/vsts/work/1/s/artifacts/bin/Essentials/Debug/net10.0-android36.0/Microsoft.Maui.Essentials.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14377095
Core -> /home/vsts/work/1/s/artifacts/bin/Core/Debug/net10.0-android36.0/Microsoft.Maui.dll
Controls.BindingSourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14377095
Maps -> /home/vsts/work/1/s/artifacts/bin/Maps/Debug/net10.0-android36.0/Microsoft.Maui.Maps.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14377095
Controls.Core -> /home/vsts/work/1/s/artifacts/bin/Controls.Core/Debug/net10.0-android36.0/Microsoft.Maui.Controls.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14377095
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14377095
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14377095
Microsoft.AspNetCore.Components.WebView.Maui -> /home/vsts/work/1/s/artifacts/bin/Microsoft.AspNetCore.Components.WebView.Maui/Debug/net10.0-android36.0/Microsoft.AspNetCore.Components.WebView.Maui.dll
Controls.Maps -> /home/vsts/work/1/s/artifacts/bin/Controls.Maps/Debug/net10.0-android36.0/Microsoft.Maui.Controls.Maps.dll
Controls.Foldable -> /home/vsts/work/1/s/artifacts/bin/Controls.Foldable/Debug/net10.0-android36.0/Microsoft.Maui.Controls.Foldable.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14377095
Controls.Xaml -> /home/vsts/work/1/s/artifacts/bin/Controls.Xaml/Debug/net10.0-android36.0/Microsoft.Maui.Controls.Xaml.dll
Controls.TestCases.HostApp -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Controls.TestCases.HostApp.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14377095
Graphics -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Graphics.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14377095
Essentials -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Essentials.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14377095
Core -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.dll
Controls.BindingSourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14377095
Maps -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Maps.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14377095
Controls.Core -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14377095
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14377095
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14377095
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14377095
Controls.Maps -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.Maps.dll
Controls.Xaml -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.Xaml.dll
Microsoft.AspNetCore.Components.WebView.Maui -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.AspNetCore.Components.WebView.Maui.dll
Controls.Foldable -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.Foldable.dll
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:07:38.63
Broadcasting: Intent { act=android.intent.action.CLOSE_SYSTEM_DIALOGS flg=0x400000 }
Broadcast completed: result=0
Determining projects to restore...
All projects are up-to-date for restore.
Controls.CustomAttributes -> /home/vsts/work/1/s/artifacts/bin/Controls.CustomAttributes/Debug/net10.0/Controls.CustomAttributes.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14377095
Graphics -> /home/vsts/work/1/s/artifacts/bin/Graphics/Debug/net10.0/Microsoft.Maui.Graphics.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14377095
Essentials -> /home/vsts/work/1/s/artifacts/bin/Essentials/Debug/net10.0/Microsoft.Maui.Essentials.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14377095
Core -> /home/vsts/work/1/s/artifacts/bin/Core/Debug/net10.0/Microsoft.Maui.dll
Controls.BindingSourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14377095
Controls.Core -> /home/vsts/work/1/s/artifacts/bin/Controls.Core/Debug/net10.0/Microsoft.Maui.Controls.dll
UITest.Core -> /home/vsts/work/1/s/artifacts/bin/UITest.Core/Debug/net10.0/UITest.Core.dll
UITest.Appium -> /home/vsts/work/1/s/artifacts/bin/UITest.Appium/Debug/net10.0/UITest.Appium.dll
UITest.NUnit -> /home/vsts/work/1/s/artifacts/bin/UITest.NUnit/Debug/net10.0/UITest.NUnit.dll
VisualTestUtils -> /home/vsts/work/1/s/artifacts/bin/VisualTestUtils/Debug/netstandard2.0/VisualTestUtils.dll
VisualTestUtils.MagickNet -> /home/vsts/work/1/s/artifacts/bin/VisualTestUtils.MagickNet/Debug/netstandard2.0/VisualTestUtils.MagickNet.dll
UITest.Analyzers -> /home/vsts/work/1/s/artifacts/bin/UITest.Analyzers/Debug/netstandard2.0/UITest.Analyzers.dll
Controls.TestCases.Android.Tests -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.Android.Tests/Debug/net10.0/Controls.TestCases.Android.Tests.dll
Test run for /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.Android.Tests/Debug/net10.0/Controls.TestCases.Android.Tests.dll (.NETCoreApp,Version=v10.0)
VSTest version 18.0.1 (x64)
Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
[xUnit.net 00:00:00.00] xUnit.net VSTest Adapter v2.8.2+699d445a1a (64-bit .NET 10.0.0)
[xUnit.net 00:00:00.18] Discovering: Controls.TestCases.Android.Tests
[xUnit.net 00:00:00.62] Discovered: Controls.TestCases.Android.Tests
NUnit Adapter 4.5.0.0: Test execution started
Running selected tests in /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.Android.Tests/Debug/net10.0/Controls.TestCases.Android.Tests.dll
NUnit3TestExecutor discovered 4 of 4 NUnit test cases using Current Discovery mode, Non-Explicit run
>>>>> 06/15/2026 13:01:04 FixtureSetup for Issue35736(Android)
>>>>> 06/15/2026 13:01:05 SearchHandlerClearIconUpdatesAtRuntime Start
>>>>> 06/15/2026 13:01:11 SearchHandlerClearIconUpdatesAtRuntime Stop
Passed SearchHandlerClearIconUpdatesAtRuntime [6 s]
>>>>> 06/15/2026 13:01:11 SearchHandlerClearPlaceholderIconUpdatesAtRuntime Start
>>>>> 06/15/2026 13:01:13 SearchHandlerClearPlaceholderIconUpdatesAtRuntime Stop
Passed SearchHandlerClearPlaceholderIconUpdatesAtRuntime [1 s]
>>>>> 06/15/2026 13:01:13 SearchHandlerQueryIconUpdatesAtRuntime Start
>>>>> 06/15/2026 13:01:15 SearchHandlerQueryIconUpdatesAtRuntime Stop
Passed SearchHandlerQueryIconUpdatesAtRuntime [1 s]
>>>>> 06/15/2026 13:01:15 SearchHandlerResetAllRestoresDefaultIcons Start
>>>>> 06/15/2026 13:01:19 SearchHandlerResetAllRestoresDefaultIcons Stop
Passed SearchHandlerResetAllRestoresDefaultIcons [3 s]
NUnit Adapter 4.5.0.0: Test execution complete
Results File: /home/vsts/work/1/s/CustomAgentLogsTmp/UITests/TestResults/Issue35736.trx
Test Run Successful.
Total tests: 4
Passed: 4
Total time: 27.8170 Seconds
>>> TRX_RESULT_FILE: /home/vsts/work/1/s/CustomAgentLogsTmp/UITests/TestResults/Issue35736.trx
📁 Fix files reverted (4 files)
eng/pipelines/ci-copilot.ymlsrc/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellSearchView.cssrc/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellPageRendererTracker.cssrc/Controls/src/Core/Handlers/Shell/ShellItemHandler.Windows.cs
UI Tests — Shell
Detected UI test categories: Shell
❌ Deep UI tests — 0 passed; 1 category setup failure (311 impacted tests marked failed by TRX) across 1 category on platform-pool agent (replaces in-process counts above).
🧪 UI Test Execution Results (deep, platform pool)
| Category | Tests | Snapshot diffs |
|---|---|---|
Shell |
0/311 (setup failed; 311 marked failed) | — |
⚠️ Shell — fixture setup failed for 311 tests
NUnit reported a OneTimeSetUp/fixture setup failure before test bodies ran; the TRX marked each affected test failed.
Multiple setup failure signatures were present; showing the first one. See the TRX artifact for all details.
OneTimeSetUp: System.TimeoutException : Timed out waiting for Go To Test button to appear
at UITest.Appium.HelperExtensions.Wait(Func`1 query, Func`2 satisfactory, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2757
at UITest.Appium.HelperExtensions.WaitForAtLeastOne(Func`1 query, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2784
at UITest.Appium.HelperExtensions.WaitForElement(IApp app, String marked, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency, Nullable`1 postTimeout) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 793
at Microsoft.Maui.TestCases.Tests.UtilExtensions.NavigateToGallery(IApp app, String page) in /_/src/Controls/tests/TestCases.Shared.Tests/UtilExtensions.cs:line 37
at Microsoft.Maui.TestCases.Tests._GalleryUITest.FixtureSetup() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/_GalleryUITest.cs:line 57
at UITest.Appium.NUnit.UITestBase.OneTimeSetup() in /_/src/TestUtils/src/UITest.NUnit/UITestBase.cs:line 221
at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
📎 Download drop-deep-uitests artifact (TRX + snapshot diffs)
Pre-Flight — Context & Validation
Issue: #35736 - SearchHandler.QueryIcon, ClearIcon, and ClearPlaceholderIcon do not update dynamically at runtime
PR: #35893 - Fix SearchHandler.QueryIcon, ClearIcon, and ClearPlaceholderIcon do not update dynamically at runtime
Platforms Affected: Android, iOS, MacCatalyst, Windows
Files Changed: 3 implementation, 14 test/snapshot
Key Findings
- The issue reports runtime changes to
SearchHandler.QueryIcon,ClearIcon, andClearPlaceholderIcondo not visually update after the Shell search UI has been created. - The PR's Android fix updates
ShellSearchView.OnSearchHandlerPropertyChangedto reapply the relevantImageSourceto the existing native buttons via a sharedApplyImageSourcehelper. - Android is the requested validation platform; relevant UI tests are the new
Issue35736Shell screenshot tests. - GitHub CLI is unauthenticated in this environment, so public GitHub API/curl was used for PR and issue context. Required-check status could not be collected with
gh pr checks --required.
Code Review Summary
Verdict: NEEDS_CHANGES
Confidence: low
Errors: 1 | Warnings: 1 | Suggestions: 2
Key code review findings:
- ❌
src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellPageRendererTracker.cs: asyncLoadImagecallbacks only guard_disposed; a stale callback can overwrite a newer icon/reset state. ⚠️ src/Controls/src/Core/Handlers/Shell/ShellItemHandler.Windows.cs: TODO comment for unsupported clear icons is placed afterbreak, making it misleadingly associated with theQueryIconcase.- 💡
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue35736.cs: reset test does not type text before reset, so the visible clear-button reset path is not covered. - 💡
src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellPageRendererTracker.cs: default clear icon restoration viamultiply.circle.fillmay be cosmetically different from UIKit's native default.
Fix Candidates
| # | Source | Approach | Test Result | Files Changed | Notes |
|---|---|---|---|---|---|
| PR | PR #35893 | Platform-specific PropertyChanged handling reapplies runtime SearchHandler icon sources to native search UI controls. Android refactors image loading into ApplyImageSource. |
✅ PASSED (Gate) | ShellSearchView.cs, ShellPageRendererTracker.cs, ShellItemHandler.Windows.cs, UI tests/snapshots |
Original PR; gate result supplied by caller. |
Code Review — Deep Analysis
Code Review — PR #35893
Independent Assessment
What this changes: Adds PropertyChanged handlers for QueryIcon, ClearIcon, and ClearPlaceholderIcon on Android, iOS, and Windows so icon changes are reflected at runtime without restart. On Android, it extracts a reusable ApplyImageSource method (refactoring + new handler). On iOS, it adds UpdateSearchBarIcon (dispatcher for set/reset paths) and UpdateClearButtonImage (KVC-based direct button manipulation to work around UIKit's clear-button image cache). On Windows, it routes the QueryIcon case in the existing property-change switch.
Inferred motivation: Users changing SearchHandler.QueryIcon, ClearIcon, or ClearPlaceholderIcon at runtime saw no visual update; the icons were only applied on initial setup, not re-applied on property change.
Is the approach sound? Yes for all three platforms. The Android refactor is clean. The iOS approach correctly identifies the UIKit caching issue for the clear button and uses the established KVC workaround. The Windows partial support (QueryIcon only, with documented tracking issue for Clear/Placeholder) is appropriate. The underlying architecture is correct.
Reconciliation with PR Narrative
Author claims: Runtime icon update support added for Android, iOS, Windows; includes sample page and automated UI tests; tested on all four platforms.
Agreement: Assessment matches. The description is accurate. The videos shown in the PR description demonstrate the bug clearly.
Discrepancy: Author's commit "Addressed review concerns" (5e48713) does not appear to resolve the MauiBot async stale-closure finding—see Prior Review Reconciliation below.
Prior Review Reconciliation
| Prior ❌ Error Finding | Source | Status | Evidence |
|---|---|---|---|
| [major] iOS snapshots: ios-26 baselines missing | MauiBot (inline @ Issue35736.cs:22) | ✅ Fixed | Files snapshots/ios-26/SearchHandler*.png are present in the current diff |
[major] Async stale-closure race: SetSearchBarIcon callback only guards _disposed, does not verify the icon is still current before applying |
MauiBot (inline @ ShellPageRendererTracker.cs:1196) | ❌ Unresolved | Current code still uses only if (_disposed) return; in the LoadImage callback inside SetSearchBarIcon. No version token, no source-identity check |
Blast Radius Assessment
- Runs for all instances: Yes —
OnSearchHandlerPropertyChangedis subscribed for anyShellpage that uses aSearchHandler, so all Shell search users receive the new code paths. - Startup impact: No — the new property-change handling is reactive, not initialization code.
- Static/shared state: None introduced.
- Android drawable mutation concern:
ApplyImageSourcecallsbutton.Drawable?.Mutate()beforeSetColorFilter.Mutate()on Android makes the drawable's constant state private, preventing color changes from bleeding to other widgets that share the same resource drawable. This is correct. - Disposal safety:
ApplyImageSourcechecks_disposedin the async callback. Thebuttonparameter is captured by value, not the field, so post-disposal null-of-field is safe.
CI Status
- Required-check result: pending/undetermined.
ghCLI is unauthenticated and could not be used forgh pr checks --required; public checks context was not sufficient for required-check classification. - Classification: undetermined.
- Action taken: capped confidence at low.
Findings
❌ Error — iOS async stale-closure in SetSearchBarIcon
src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellPageRendererTracker.cs loads an image asynchronously and only checks _disposed before applying. If the icon is changed again or reset to null before the earlier load completes, the stale callback can reapply the old image over the newer state.
⚠️ Warning — Windows TODO comment placed in unreachable position after break
src/Controls/src/Core/Handlers/Shell/ShellItemHandler.Windows.cs places the unsupported-icon TODO after break, which is misleading.
💡 Suggestion — Reset test does not verify visible clear-button reset path
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue35736.cs resets all icons without first typing text, so the clear button is not visible for screenshot verification of the reset path.
💡 Suggestion — iOS default clear symbol may differ cosmetically from UIKit default
UIImage.GetSystemImage("multiply.circle.fill") may not exactly match UIKit's native default across appearances.
Failure-Mode Probing
- Rapid-fire icon change on Android: multiple
ApplyImageSourcecallbacks can complete out of order; only_disposedis checked, so last-to-complete wins rather than last-set wins. - Rapid-fire icon change on iOS: async
UriImageSourcecan produce a real stale-overwrite race, including after a synchronous reset tonull. - Handler reconnect/navigation: subscriptions are removed in platform lifecycle paths and should not accumulate duplicate handlers.
- Null
_searchControlleron iOS: guarded before new icon cases run. - Null Android button: guarded at the top of
ApplyImageSource.
Verdict: NEEDS_CHANGES
Confidence: low (platform handler code plus undetermined CI and unresolved prior error)
Summary: The PR's runtime update direction is sound, and Android has a straightforward reactive update path. The main correctness concern is stale async image callbacks, especially on iOS and potentially Android for non-file image sources. CI status is undetermined in this unauthenticated environment.
Fix — Analysis & Comparison
Fix Candidates
| # | Source | Approach | Test Result | Files Changed | Notes |
|---|---|---|---|---|---|
| 1 | try-fix-1 | Android version-token guarded image loading: each native search icon button gets a monotonically increasing version, and async ImageSource.LoadImage callbacks only apply when their captured version is still current. |
✅ Pass | 1 file | Better than the PR's Android fix because it preserves runtime updates while preventing stale async callbacks from overwriting newer icon/reset state. |
| PR | PR #35893 | Platform-specific PropertyChanged handling reapplies runtime SearchHandler icon sources to native search UI controls. Android reuses ApplyImageSource but only guards callbacks with _disposed. |
✅ PASSED (Gate) | 3 implementation files + tests/snapshots | Original PR; gate result supplied by caller. |
Cross-Pollination
| Model | Round | New Ideas? | Details |
|---|---|---|---|
| claude-opus-4.6 | 1 | Yes | Produced Candidate #1, version-token guarded Android image loading. |
| claude-opus-4.7 | 2 | Not run | Stopped per requested stop condition: Candidate #1 passed all Android tests and is demonstrably better than the PR's Android fix for stale async callback behavior. |
| gpt-5.3-codex | 2 | Not run | Stopped per requested stop condition. |
| gpt-5.5 | 2 | Not run | Stopped per requested stop condition. |
Exhausted: No
Selected Fix: Candidate #1 — It passed the Android Issue35736 UI test filter and improves on the PR's Android approach by preventing out-of-order async image loads from applying stale icon state. This addresses both the original runtime-update failure and the code-review race concern for Android.
Report — Final Recommendation
Comparative Report — PR #35893
Candidates compared
| Rank | Candidate | Regression result | Assessment |
|---|---|---|---|
| 1 | pr-plus-reviewer |
Not re-run; based on PR gate-pass plus sandbox diff validation | Best overall. Keeps the PR's cross-platform runtime icon update implementation and applies expert feedback for Android/iOS stale async image races plus Android clear-placeholder visibility refresh. |
| 2 | try-fix-1 |
✅ Pass on Android Issue35736 filter |
Strong Android-specific candidate. It fixes the Android stale async callback race with version tokens and passed Android tests, but it only covers the Android file and does not address the PR's iOS/Windows runtime update work or the Android clear-placeholder visibility state issue. |
| 3 | pr |
✅ Gate passed | Correctly fixes the reported runtime update path and has regression coverage, but expert review found major stale async callback races on Android/iOS and a clear-placeholder reset visibility bug. |
Analysis
The raw PR fix is directionally sound: it adds runtime property-change handling for SearchHandler.QueryIcon, ClearIcon, and ClearPlaceholderIcon across the affected platform implementations and includes regression UI coverage. The supplied gate result confirms the tests catch the bug and pass with the PR fix.
try-fix-1 improves the Android implementation by adding version-token guards around async image loading. It passed the Android Issue35736 test filter and is better than the raw PR for Android stale-callback correctness. However, it is narrower than the PR: it does not include the iOS/MacCatalyst or Windows updates and does not address the additional Android ClearPlaceholderIcon visibility state finding.
pr-plus-reviewer combines the PR's full-platform behavior with the expert review fixes. It applies the same Android stale-callback protection idea as try-fix-1, adds the missing UpdateClearButtonState() call for clear-placeholder resets, and guards iOS/MacCatalyst async icon callbacks against both stale sources and detached/replaced search bars. No candidate failed regression tests, so the deciding factor is correctness coverage: pr-plus-reviewer covers the original bug and the expert-identified edge cases most completely.
Winner
pr-plus-reviewer wins. It is the most complete candidate because it preserves the PR's tested behavior while addressing all actionable major expert-review findings.
Future Action — review latest findings
No alternative fix was selected for this run. Review the session findings and CI results before merging.
This comment has been minimized.
This comment has been minimized.
85ddddc to
8d165c9
Compare
…net#34527) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! ### Issue Details: Horizontalspacing / Verticalspacing is not not applied to the first column in GridItemLayout using CollectionView on Android platform. ### Root Cause: The grid spacing was not being distributed symmetrically across the active layout implementations, so edge items did not fully participate when spacing changed at runtime. ### Description of Change: - On Android, the fix in MauiRecyclerView.cs changes how RecyclerView padding is handled for GridItemsLayout. Android was already using SpacingItemDecoration, which applies half-spacing on all four sides of each item. Previously, negative RecyclerView padding canceled that spacing at the control edges. The branch keeps that negative-padding behavior for non-grid layouts, but disables it for GridItemsLayout, allowing the grid’s half-spacing to remain visible at the outer perimeter. This makes the first row and first column visually respond when spacing changes, but it also changes the grid behavior from spacing only between items to spacing around the outside edges as well. **Tested the behavior in the following platforms:** - [x] Android - [x] Windows - [ ] iOS - [ ] Mac ### Reference: N/A ### Issues Fixed: Fixes dotnet#34257 ### Screenshots | Before | After | |---------|--------| | <Video src="https://github.com/user-attachments/assets/578dda69-1d60-474c-a6d8-23b3f9d29a50" Width="300" Height="600"> | <Video src="https://github.com/user-attachments/assets/7f3826e6-5922-4b6f-a6b9-de581b7db6c3" Width="300" Height="600"> |
Fixes Android Shell `SearchHandler` toolbar icon tinting when `SearchBoxVisibility` is `Collapsible`. After the Android Shell flyout icon tint changes, `ShellToolbarTracker.TintColor` can remain unset. The collapsible SearchHandler menu icon and the search action view navigation button still used `TintColor.ToPlatform(Colors.White)`, which caused them to fall back to white even when `Shell.ForegroundColor` was set. This change keeps the flyout icon behavior intact and resolves the SearchHandler-specific path by deriving SearchHandler toolbar icon tint from: 1. explicit `ShellToolbarTracker.TintColor` 2. current page `Shell.ForegroundColor` 3. Shell `Shell.ForegroundColor` 4. existing white fallback It also refreshes the SearchHandler menu item tint when `Shell.ForegroundColor` changes. Fixes dotnet#36015 ---------
…ceholder Icon runtime update
07c9ac2 to
913b3b4
Compare
Skill Validation Results
✅ Skill Validation Results —
|
…ot update dynamically at runtime (#35893) <!-- Please keep the note below for people who find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment whether this change resolves your issue. Thank you! <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> This pull request improves the runtime update behavior of `SearchHandler` icons (`QueryIcon`, `ClearIcon`, and `ClearPlaceholderIcon`) across Android, iOS, and Windows platforms. It ensures that changes to these icon properties are reflected visually without requiring a restart or navigation. The update also adds new test cases and a sample page to verify and demonstrate this functionality. ### Description of Change **Platform-specific icon update support:** - **Android:** - Added logic in `ShellSearchView.cs` to listen for changes to `QueryIcon`, `ClearIcon`, and `ClearPlaceholderIcon` properties and update the corresponding buttons immediately. Refactored image loading into a reusable `ApplyImageSource` method. [[1]](diffhunk://#diff-cd10009f7e4bc472ed235e594c3d3b7a87df79b413c1a0acf6edee9e73840176R243-R284) [[2]](diffhunk://#diff-cd10009f7e4bc472ed235e594c3d3b7a87df79b413c1a0acf6edee9e73840176L319-R361) - **iOS:** - Enhanced `ShellPageRendererTracker.cs` to update search bar icons at runtime for `QueryIcon`, `ClearIcon`, and `ClearPlaceholderIcon`. Added a workaround to force-refresh the clear button image, addressing iOS caching behavior. [[1]](diffhunk://#diff-7649316957d61ad7ad533c7a27d303e022ef35c1fe79b8568ca34c85ce81a719R920-R931) [[2]](diffhunk://#diff-7649316957d61ad7ad533c7a27d303e022ef35c1fe79b8568ca34c85ce81a719R1163-R1215) - **Windows:** - Updated `ShellItemHandler.Windows.cs` to support dynamic updates for `QueryIcon`. Added comments and tracking for unsupported icons (`ClearIcon`, `ClearPlaceholderIcon`). **Testing and sample coverage:** - **New sample page:** - Introduced `Issue35736` sample page to manually test toggling of all three icon properties and resetting them to defaults at runtime. - **Automated UI tests:** - Added UITest cases for all icon properties to ensure they update visually at runtime and after reset, with platform-specific handling for unsupported features. <!-- Enter description of the fix in this section --> ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Fixes #35736 ### Tested the behavior in the following platforms - [x] Windows - [x] Android - [x] iOS - [x] Mac | Before Issue Fix | After Issue Fix | |----------|----------| | <video src="https://github.com/user-attachments/assets/7a105556-4c64-4012-8668-a5829a3c3a13"> | <video src="https://github.com/user-attachments/assets/008e86ec-d97d-46fe-a6c0-04104f7a794e"> | | Before Issue Fix | After Issue Fix | |----------|----------| | <video src="https://github.com/user-attachments/assets/d010995c-b244-4a1a-bbca-b4b33f0f166a"> | <video src="https://github.com/user-attachments/assets/9acb925f-e4b9-46ff-903d-f34432f22367"> | <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. --> ---------
…ot update dynamically at runtime (#35893) <!-- Please keep the note below for people who find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment whether this change resolves your issue. Thank you! <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> This pull request improves the runtime update behavior of `SearchHandler` icons (`QueryIcon`, `ClearIcon`, and `ClearPlaceholderIcon`) across Android, iOS, and Windows platforms. It ensures that changes to these icon properties are reflected visually without requiring a restart or navigation. The update also adds new test cases and a sample page to verify and demonstrate this functionality. ### Description of Change **Platform-specific icon update support:** - **Android:** - Added logic in `ShellSearchView.cs` to listen for changes to `QueryIcon`, `ClearIcon`, and `ClearPlaceholderIcon` properties and update the corresponding buttons immediately. Refactored image loading into a reusable `ApplyImageSource` method. [[1]](diffhunk://#diff-cd10009f7e4bc472ed235e594c3d3b7a87df79b413c1a0acf6edee9e73840176R243-R284) [[2]](diffhunk://#diff-cd10009f7e4bc472ed235e594c3d3b7a87df79b413c1a0acf6edee9e73840176L319-R361) - **iOS:** - Enhanced `ShellPageRendererTracker.cs` to update search bar icons at runtime for `QueryIcon`, `ClearIcon`, and `ClearPlaceholderIcon`. Added a workaround to force-refresh the clear button image, addressing iOS caching behavior. [[1]](diffhunk://#diff-7649316957d61ad7ad533c7a27d303e022ef35c1fe79b8568ca34c85ce81a719R920-R931) [[2]](diffhunk://#diff-7649316957d61ad7ad533c7a27d303e022ef35c1fe79b8568ca34c85ce81a719R1163-R1215) - **Windows:** - Updated `ShellItemHandler.Windows.cs` to support dynamic updates for `QueryIcon`. Added comments and tracking for unsupported icons (`ClearIcon`, `ClearPlaceholderIcon`). **Testing and sample coverage:** - **New sample page:** - Introduced `Issue35736` sample page to manually test toggling of all three icon properties and resetting them to defaults at runtime. - **Automated UI tests:** - Added UITest cases for all icon properties to ensure they update visually at runtime and after reset, with platform-specific handling for unsupported features. <!-- Enter description of the fix in this section --> ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Fixes #35736 ### Tested the behavior in the following platforms - [x] Windows - [x] Android - [x] iOS - [x] Mac | Before Issue Fix | After Issue Fix | |----------|----------| | <video src="https://github.com/user-attachments/assets/7a105556-4c64-4012-8668-a5829a3c3a13"> | <video src="https://github.com/user-attachments/assets/008e86ec-d97d-46fe-a6c0-04104f7a794e"> | | Before Issue Fix | After Issue Fix | |----------|----------| | <video src="https://github.com/user-attachments/assets/d010995c-b244-4a1a-bbca-b4b33f0f166a"> | <video src="https://github.com/user-attachments/assets/9acb925f-e4b9-46ff-903d-f34432f22367"> | <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. --> ---------
…ot update dynamically at runtime (#35893) <!-- Please keep the note below for people who find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment whether this change resolves your issue. Thank you! <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> This pull request improves the runtime update behavior of `SearchHandler` icons (`QueryIcon`, `ClearIcon`, and `ClearPlaceholderIcon`) across Android, iOS, and Windows platforms. It ensures that changes to these icon properties are reflected visually without requiring a restart or navigation. The update also adds new test cases and a sample page to verify and demonstrate this functionality. ### Description of Change **Platform-specific icon update support:** - **Android:** - Added logic in `ShellSearchView.cs` to listen for changes to `QueryIcon`, `ClearIcon`, and `ClearPlaceholderIcon` properties and update the corresponding buttons immediately. Refactored image loading into a reusable `ApplyImageSource` method. [[1]](diffhunk://#diff-cd10009f7e4bc472ed235e594c3d3b7a87df79b413c1a0acf6edee9e73840176R243-R284) [[2]](diffhunk://#diff-cd10009f7e4bc472ed235e594c3d3b7a87df79b413c1a0acf6edee9e73840176L319-R361) - **iOS:** - Enhanced `ShellPageRendererTracker.cs` to update search bar icons at runtime for `QueryIcon`, `ClearIcon`, and `ClearPlaceholderIcon`. Added a workaround to force-refresh the clear button image, addressing iOS caching behavior. [[1]](diffhunk://#diff-7649316957d61ad7ad533c7a27d303e022ef35c1fe79b8568ca34c85ce81a719R920-R931) [[2]](diffhunk://#diff-7649316957d61ad7ad533c7a27d303e022ef35c1fe79b8568ca34c85ce81a719R1163-R1215) - **Windows:** - Updated `ShellItemHandler.Windows.cs` to support dynamic updates for `QueryIcon`. Added comments and tracking for unsupported icons (`ClearIcon`, `ClearPlaceholderIcon`). **Testing and sample coverage:** - **New sample page:** - Introduced `Issue35736` sample page to manually test toggling of all three icon properties and resetting them to defaults at runtime. - **Automated UI tests:** - Added UITest cases for all icon properties to ensure they update visually at runtime and after reset, with platform-specific handling for unsupported features. <!-- Enter description of the fix in this section --> ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Fixes #35736 ### Tested the behavior in the following platforms - [x] Windows - [x] Android - [x] iOS - [x] Mac | Before Issue Fix | After Issue Fix | |----------|----------| | <video src="https://github.com/user-attachments/assets/7a105556-4c64-4012-8668-a5829a3c3a13"> | <video src="https://github.com/user-attachments/assets/008e86ec-d97d-46fe-a6c0-04104f7a794e"> | | Before Issue Fix | After Issue Fix | |----------|----------| | <video src="https://github.com/user-attachments/assets/d010995c-b244-4a1a-bbca-b4b33f0f166a"> | <video src="https://github.com/user-attachments/assets/9acb925f-e4b9-46ff-903d-f34432f22367"> | <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. --> ---------
…ot update dynamically at runtime (#35893) <!-- Please keep the note below for people who find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment whether this change resolves your issue. Thank you! <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> This pull request improves the runtime update behavior of `SearchHandler` icons (`QueryIcon`, `ClearIcon`, and `ClearPlaceholderIcon`) across Android, iOS, and Windows platforms. It ensures that changes to these icon properties are reflected visually without requiring a restart or navigation. The update also adds new test cases and a sample page to verify and demonstrate this functionality. ### Description of Change **Platform-specific icon update support:** - **Android:** - Added logic in `ShellSearchView.cs` to listen for changes to `QueryIcon`, `ClearIcon`, and `ClearPlaceholderIcon` properties and update the corresponding buttons immediately. Refactored image loading into a reusable `ApplyImageSource` method. [[1]](diffhunk://#diff-cd10009f7e4bc472ed235e594c3d3b7a87df79b413c1a0acf6edee9e73840176R243-R284) [[2]](diffhunk://#diff-cd10009f7e4bc472ed235e594c3d3b7a87df79b413c1a0acf6edee9e73840176L319-R361) - **iOS:** - Enhanced `ShellPageRendererTracker.cs` to update search bar icons at runtime for `QueryIcon`, `ClearIcon`, and `ClearPlaceholderIcon`. Added a workaround to force-refresh the clear button image, addressing iOS caching behavior. [[1]](diffhunk://#diff-7649316957d61ad7ad533c7a27d303e022ef35c1fe79b8568ca34c85ce81a719R920-R931) [[2]](diffhunk://#diff-7649316957d61ad7ad533c7a27d303e022ef35c1fe79b8568ca34c85ce81a719R1163-R1215) - **Windows:** - Updated `ShellItemHandler.Windows.cs` to support dynamic updates for `QueryIcon`. Added comments and tracking for unsupported icons (`ClearIcon`, `ClearPlaceholderIcon`). **Testing and sample coverage:** - **New sample page:** - Introduced `Issue35736` sample page to manually test toggling of all three icon properties and resetting them to defaults at runtime. - **Automated UI tests:** - Added UITest cases for all icon properties to ensure they update visually at runtime and after reset, with platform-specific handling for unsupported features. <!-- Enter description of the fix in this section --> ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Fixes #35736 ### Tested the behavior in the following platforms - [x] Windows - [x] Android - [x] iOS - [x] Mac | Before Issue Fix | After Issue Fix | |----------|----------| | <video src="https://github.com/user-attachments/assets/7a105556-4c64-4012-8668-a5829a3c3a13"> | <video src="https://github.com/user-attachments/assets/008e86ec-d97d-46fe-a6c0-04104f7a794e"> | | Before Issue Fix | After Issue Fix | |----------|----------| | <video src="https://github.com/user-attachments/assets/d010995c-b244-4a1a-bbca-b4b33f0f166a"> | <video src="https://github.com/user-attachments/assets/9acb925f-e4b9-46ff-903d-f34432f22367"> | <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. --> ---------
…ot update dynamically at runtime (#35893) <!-- Please keep the note below for people who find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment whether this change resolves your issue. Thank you! <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> This pull request improves the runtime update behavior of `SearchHandler` icons (`QueryIcon`, `ClearIcon`, and `ClearPlaceholderIcon`) across Android, iOS, and Windows platforms. It ensures that changes to these icon properties are reflected visually without requiring a restart or navigation. The update also adds new test cases and a sample page to verify and demonstrate this functionality. ### Description of Change **Platform-specific icon update support:** - **Android:** - Added logic in `ShellSearchView.cs` to listen for changes to `QueryIcon`, `ClearIcon`, and `ClearPlaceholderIcon` properties and update the corresponding buttons immediately. Refactored image loading into a reusable `ApplyImageSource` method. [[1]](diffhunk://#diff-cd10009f7e4bc472ed235e594c3d3b7a87df79b413c1a0acf6edee9e73840176R243-R284) [[2]](diffhunk://#diff-cd10009f7e4bc472ed235e594c3d3b7a87df79b413c1a0acf6edee9e73840176L319-R361) - **iOS:** - Enhanced `ShellPageRendererTracker.cs` to update search bar icons at runtime for `QueryIcon`, `ClearIcon`, and `ClearPlaceholderIcon`. Added a workaround to force-refresh the clear button image, addressing iOS caching behavior. [[1]](diffhunk://#diff-7649316957d61ad7ad533c7a27d303e022ef35c1fe79b8568ca34c85ce81a719R920-R931) [[2]](diffhunk://#diff-7649316957d61ad7ad533c7a27d303e022ef35c1fe79b8568ca34c85ce81a719R1163-R1215) - **Windows:** - Updated `ShellItemHandler.Windows.cs` to support dynamic updates for `QueryIcon`. Added comments and tracking for unsupported icons (`ClearIcon`, `ClearPlaceholderIcon`). **Testing and sample coverage:** - **New sample page:** - Introduced `Issue35736` sample page to manually test toggling of all three icon properties and resetting them to defaults at runtime. - **Automated UI tests:** - Added UITest cases for all icon properties to ensure they update visually at runtime and after reset, with platform-specific handling for unsupported features. <!-- Enter description of the fix in this section --> ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Fixes #35736 ### Tested the behavior in the following platforms - [x] Windows - [x] Android - [x] iOS - [x] Mac | Before Issue Fix | After Issue Fix | |----------|----------| | <video src="https://github.com/user-attachments/assets/7a105556-4c64-4012-8668-a5829a3c3a13"> | <video src="https://github.com/user-attachments/assets/008e86ec-d97d-46fe-a6c0-04104f7a794e"> | | Before Issue Fix | After Issue Fix | |----------|----------| | <video src="https://github.com/user-attachments/assets/d010995c-b244-4a1a-bbca-b4b33f0f166a"> | <video src="https://github.com/user-attachments/assets/9acb925f-e4b9-46ff-903d-f34432f22367"> | <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. --> ---------
…d test fails in candidate (#36467) <!-- Please keep the note below for people who find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment whether this change resolves your issue. Thank you!<!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> This pull request fixes a regression Introduced by PR #35893 which caused the Android UI test `ClearPlaceholderIconShouldHideWhenDisabled` to fail in Candidate PR ### Description of Change Fixes a regression where changes to `SearchHandler.ClearPlaceholderEnabled` were not reflected in the Android `ShellSearchView` clear button state. Updated the `ShellSearchView` handler to invoke `UpdateClearButtonState() `whenever the `SearchHandler.ClearPlaceholderEnabled `property changes, ensuring the clear button visibility and enabled state remain synchronized with the property value. <!-- Enter description of the fix in this section --> ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Fixes #36464 <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. -->
…ot update dynamically at runtime (#35893) <!-- Please keep the note below for people who find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment whether this change resolves your issue. Thank you! <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> This pull request improves the runtime update behavior of `SearchHandler` icons (`QueryIcon`, `ClearIcon`, and `ClearPlaceholderIcon`) across Android, iOS, and Windows platforms. It ensures that changes to these icon properties are reflected visually without requiring a restart or navigation. The update also adds new test cases and a sample page to verify and demonstrate this functionality. ### Description of Change **Platform-specific icon update support:** - **Android:** - Added logic in `ShellSearchView.cs` to listen for changes to `QueryIcon`, `ClearIcon`, and `ClearPlaceholderIcon` properties and update the corresponding buttons immediately. Refactored image loading into a reusable `ApplyImageSource` method. [[1]](diffhunk://#diff-cd10009f7e4bc472ed235e594c3d3b7a87df79b413c1a0acf6edee9e73840176R243-R284) [[2]](diffhunk://#diff-cd10009f7e4bc472ed235e594c3d3b7a87df79b413c1a0acf6edee9e73840176L319-R361) - **iOS:** - Enhanced `ShellPageRendererTracker.cs` to update search bar icons at runtime for `QueryIcon`, `ClearIcon`, and `ClearPlaceholderIcon`. Added a workaround to force-refresh the clear button image, addressing iOS caching behavior. [[1]](diffhunk://#diff-7649316957d61ad7ad533c7a27d303e022ef35c1fe79b8568ca34c85ce81a719R920-R931) [[2]](diffhunk://#diff-7649316957d61ad7ad533c7a27d303e022ef35c1fe79b8568ca34c85ce81a719R1163-R1215) - **Windows:** - Updated `ShellItemHandler.Windows.cs` to support dynamic updates for `QueryIcon`. Added comments and tracking for unsupported icons (`ClearIcon`, `ClearPlaceholderIcon`). **Testing and sample coverage:** - **New sample page:** - Introduced `Issue35736` sample page to manually test toggling of all three icon properties and resetting them to defaults at runtime. - **Automated UI tests:** - Added UITest cases for all icon properties to ensure they update visually at runtime and after reset, with platform-specific handling for unsupported features. <!-- Enter description of the fix in this section --> ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Fixes #35736 ### Tested the behavior in the following platforms - [x] Windows - [x] Android - [x] iOS - [x] Mac | Before Issue Fix | After Issue Fix | |----------|----------| | <video src="https://github.com/user-attachments/assets/7a105556-4c64-4012-8668-a5829a3c3a13"> | <video src="https://github.com/user-attachments/assets/008e86ec-d97d-46fe-a6c0-04104f7a794e"> | | Before Issue Fix | After Issue Fix | |----------|----------| | <video src="https://github.com/user-attachments/assets/d010995c-b244-4a1a-bbca-b4b33f0f166a"> | <video src="https://github.com/user-attachments/assets/9acb925f-e4b9-46ff-903d-f34432f22367"> | <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. --> ---------
…ot update dynamically at runtime (#35893) <!-- Please keep the note below for people who find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment whether this change resolves your issue. Thank you! <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> This pull request improves the runtime update behavior of `SearchHandler` icons (`QueryIcon`, `ClearIcon`, and `ClearPlaceholderIcon`) across Android, iOS, and Windows platforms. It ensures that changes to these icon properties are reflected visually without requiring a restart or navigation. The update also adds new test cases and a sample page to verify and demonstrate this functionality. ### Description of Change **Platform-specific icon update support:** - **Android:** - Added logic in `ShellSearchView.cs` to listen for changes to `QueryIcon`, `ClearIcon`, and `ClearPlaceholderIcon` properties and update the corresponding buttons immediately. Refactored image loading into a reusable `ApplyImageSource` method. [[1]](diffhunk://#diff-cd10009f7e4bc472ed235e594c3d3b7a87df79b413c1a0acf6edee9e73840176R243-R284) [[2]](diffhunk://#diff-cd10009f7e4bc472ed235e594c3d3b7a87df79b413c1a0acf6edee9e73840176L319-R361) - **iOS:** - Enhanced `ShellPageRendererTracker.cs` to update search bar icons at runtime for `QueryIcon`, `ClearIcon`, and `ClearPlaceholderIcon`. Added a workaround to force-refresh the clear button image, addressing iOS caching behavior. [[1]](diffhunk://#diff-7649316957d61ad7ad533c7a27d303e022ef35c1fe79b8568ca34c85ce81a719R920-R931) [[2]](diffhunk://#diff-7649316957d61ad7ad533c7a27d303e022ef35c1fe79b8568ca34c85ce81a719R1163-R1215) - **Windows:** - Updated `ShellItemHandler.Windows.cs` to support dynamic updates for `QueryIcon`. Added comments and tracking for unsupported icons (`ClearIcon`, `ClearPlaceholderIcon`). **Testing and sample coverage:** - **New sample page:** - Introduced `Issue35736` sample page to manually test toggling of all three icon properties and resetting them to defaults at runtime. - **Automated UI tests:** - Added UITest cases for all icon properties to ensure they update visually at runtime and after reset, with platform-specific handling for unsupported features. <!-- Enter description of the fix in this section --> ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Fixes #35736 ### Tested the behavior in the following platforms - [x] Windows - [x] Android - [x] iOS - [x] Mac | Before Issue Fix | After Issue Fix | |----------|----------| | <video src="https://github.com/user-attachments/assets/7a105556-4c64-4012-8668-a5829a3c3a13"> | <video src="https://github.com/user-attachments/assets/008e86ec-d97d-46fe-a6c0-04104f7a794e"> | | Before Issue Fix | After Issue Fix | |----------|----------| | <video src="https://github.com/user-attachments/assets/d010995c-b244-4a1a-bbca-b4b33f0f166a"> | <video src="https://github.com/user-attachments/assets/9acb925f-e4b9-46ff-903d-f34432f22367"> | <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. --> ---------
…ot update dynamically at runtime (#35893) <!-- Please keep the note below for people who find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment whether this change resolves your issue. Thank you! <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> This pull request improves the runtime update behavior of `SearchHandler` icons (`QueryIcon`, `ClearIcon`, and `ClearPlaceholderIcon`) across Android, iOS, and Windows platforms. It ensures that changes to these icon properties are reflected visually without requiring a restart or navigation. The update also adds new test cases and a sample page to verify and demonstrate this functionality. ### Description of Change **Platform-specific icon update support:** - **Android:** - Added logic in `ShellSearchView.cs` to listen for changes to `QueryIcon`, `ClearIcon`, and `ClearPlaceholderIcon` properties and update the corresponding buttons immediately. Refactored image loading into a reusable `ApplyImageSource` method. [[1]](diffhunk://#diff-cd10009f7e4bc472ed235e594c3d3b7a87df79b413c1a0acf6edee9e73840176R243-R284) [[2]](diffhunk://#diff-cd10009f7e4bc472ed235e594c3d3b7a87df79b413c1a0acf6edee9e73840176L319-R361) - **iOS:** - Enhanced `ShellPageRendererTracker.cs` to update search bar icons at runtime for `QueryIcon`, `ClearIcon`, and `ClearPlaceholderIcon`. Added a workaround to force-refresh the clear button image, addressing iOS caching behavior. [[1]](diffhunk://#diff-7649316957d61ad7ad533c7a27d303e022ef35c1fe79b8568ca34c85ce81a719R920-R931) [[2]](diffhunk://#diff-7649316957d61ad7ad533c7a27d303e022ef35c1fe79b8568ca34c85ce81a719R1163-R1215) - **Windows:** - Updated `ShellItemHandler.Windows.cs` to support dynamic updates for `QueryIcon`. Added comments and tracking for unsupported icons (`ClearIcon`, `ClearPlaceholderIcon`). **Testing and sample coverage:** - **New sample page:** - Introduced `Issue35736` sample page to manually test toggling of all three icon properties and resetting them to defaults at runtime. - **Automated UI tests:** - Added UITest cases for all icon properties to ensure they update visually at runtime and after reset, with platform-specific handling for unsupported features. <!-- Enter description of the fix in this section --> ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Fixes #35736 ### Tested the behavior in the following platforms - [x] Windows - [x] Android - [x] iOS - [x] Mac | Before Issue Fix | After Issue Fix | |----------|----------| | <video src="https://github.com/user-attachments/assets/7a105556-4c64-4012-8668-a5829a3c3a13"> | <video src="https://github.com/user-attachments/assets/008e86ec-d97d-46fe-a6c0-04104f7a794e"> | | Before Issue Fix | After Issue Fix | |----------|----------| | <video src="https://github.com/user-attachments/assets/d010995c-b244-4a1a-bbca-b4b33f0f166a"> | <video src="https://github.com/user-attachments/assets/9acb925f-e4b9-46ff-903d-f34432f22367"> | <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. --> ---------
Note
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment whether this change resolves your issue. Thank you!
This pull request improves the runtime update behavior of
SearchHandlericons (QueryIcon,ClearIcon, andClearPlaceholderIcon) across Android, iOS, and Windows platforms. It ensures that changes to these icon properties are reflected visually without requiring a restart or navigation. The update also adds new test cases and a sample page to verify and demonstrate this functionality.Description of Change
Platform-specific icon update support:
Android:
ShellSearchView.csto listen for changes toQueryIcon,ClearIcon, andClearPlaceholderIconproperties and update the corresponding buttons immediately. Refactored image loading into a reusableApplyImageSourcemethod. [1] [2]iOS:
ShellPageRendererTracker.csto update search bar icons at runtime forQueryIcon,ClearIcon, andClearPlaceholderIcon. Added a workaround to force-refresh the clear button image, addressing iOS caching behavior. [1] [2]Windows:
ShellItemHandler.Windows.csto support dynamic updates forQueryIcon. Added comments and tracking for unsupported icons (ClearIcon,ClearPlaceholderIcon).Testing and sample coverage:
New sample page:
Issue35736sample page to manually test toggling of all three icon properties and resetting them to defaults at runtime.Automated UI tests:
Issues Fixed
Fixes #35736
Tested the behavior in the following platforms
AndroidBefore35736.mov
AndroidAfterFix35736.mov
iOSBeforeFix35736.mov
iOSAfterFix35736.mov