maui icon indicating copy to clipboard operation
maui copied to clipboard

Blank image when Source set to null or on image loading error

Open hartez opened this issue 2 years ago • 2 comments

Description of Change

Replace existing image with nothing when image source is set to null; replace existing image with nothing when new image results in a loading error.

Issues Fixed

Fixes #8787

hartez avatar Mar 01 '23 06:03 hartez

Thank you for your pull request. We are auto-formating your source code to follow our code guidelines.

github-actions[bot] avatar Mar 01 '23 06:03 github-actions[bot]

Hi @jsuarezruiz

Just out of curiosity, what about the Image Placeholder especially when the image failed to load. This is a need functionality in any Mobile apps.

EdwardMcFlurry avatar Mar 01 '23 15:03 EdwardMcFlurry

Hi @jsuarezruiz

Just out of curiosity, what about the Image Placeholder especially when the image failed to load. This is a need functionality in any Mobile apps.

I agree that .NET MAUI should support placeholder images, but that is outside the scope of this PR.

hartez avatar Mar 02 '23 16:03 hartez

/backport to net7.0

jfversluis avatar Mar 16 '23 15:03 jfversluis

Started backporting to net7.0: https://github.com/dotnet/maui/actions/runs/4438518577

github-actions[bot] avatar Mar 16 '23 15:03 github-actions[bot]

@jfversluis backporting to net7.0 failed, the patch most likely resulted in conflicts:

$ git am --3way --ignore-whitespace --keep-non-patch changes.patch

Applying: Blank image when Source set to null or on image loading error Fixes #8787
.git/rebase-apply/patch:77: trailing whitespace.
			else 
.git/rebase-apply/patch:293: trailing whitespace.
						throw new XunitException($"Color {unexpectedColor} was found at point {x}, {y}.");						
.git/rebase-apply/patch:297: trailing whitespace.
			
warning: 3 lines add whitespace errors.
Using index info to reconstruct a base tree...
M	src/TestUtils/src/DeviceTests/AssertionExtensions.Android.cs
M	src/TestUtils/src/DeviceTests/AssertionExtensions.iOS.cs
Falling back to patching base and 3-way merge...
Auto-merging src/TestUtils/src/DeviceTests/AssertionExtensions.iOS.cs
CONFLICT (content): Merge conflict in src/TestUtils/src/DeviceTests/AssertionExtensions.iOS.cs
Auto-merging src/TestUtils/src/DeviceTests/AssertionExtensions.Android.cs
CONFLICT (content): Merge conflict in src/TestUtils/src/DeviceTests/AssertionExtensions.Android.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Blank image when Source set to null or on image loading error Fixes #8787
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Error: The process '/usr/bin/git' failed with exit code 128

Please backport manually!

github-actions[bot] avatar Mar 16 '23 15:03 github-actions[bot]

@jfversluis an error occurred while backporting to net7.0, please check the run log for details!

Error: git am failed, most likely due to a merge conflict.

github-actions[bot] avatar Mar 16 '23 15:03 github-actions[bot]

Backported manually: #13989

jfversluis avatar Mar 16 '23 15:03 jfversluis