Skip to content

Blank image when Source set to null or on image loading error - #13614

Merged
hartez merged 5 commits into
mainfrom
fix-8787
Mar 15, 2023
Merged

hartez merged 5 commits into
mainfrom
fix-8787

Conversation

@hartez

@hartez hartez commented Mar 1, 2023

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Mar 1, 2023

Copy link
Copy Markdown
Contributor

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

@jsuarezruiz jsuarezruiz added the area-controls-image Image control label Mar 1, 2023
@ghost ghost added the legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor label Mar 1, 2023
@EdwardMcFlurry

Copy link
Copy Markdown

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.

@samhouts samhouts left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️❤️

@hartez

hartez commented Mar 2, 2023

Copy link
Copy Markdown
Contributor Author

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
hartez marked this pull request as ready for review March 8, 2023 23:40
@hartez
hartez requested a review from mattleibow March 8, 2023 23:43
@hartez
hartez enabled auto-merge (squash) March 13, 2023 15:53
@hartez
hartez merged commit 019b2b6 into main Mar 15, 2023
@hartez
hartez deleted the fix-8787 branch March 15, 2023 00:19
@samhouts samhouts added the backport/suggested The PR author or issue review has suggested that the change should be backported. label Mar 15, 2023
@jfversluis jfversluis added the backport/approved After some discussion or review, this PR or change was approved to be backported. label Mar 16, 2023
@jfversluis

Copy link
Copy Markdown
Member

/backport to net7.0

@github-actions

Copy link
Copy Markdown
Contributor

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

@github-actions

Copy link
Copy Markdown
Contributor

@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

Copy link
Copy Markdown
Contributor

@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.

@jfversluis

Copy link
Copy Markdown
Member

Backported manually: #13989

@Eilon Eilon removed the legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor label May 10, 2024
@samhouts samhouts added the fixed-in-8.0.0-preview.3.8149 Look for this fix in 8.0.0-preview.3.8149! label Aug 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-controls-image Image control backport/approved After some discussion or review, this PR or change was approved to be backported. backport/suggested The PR author or issue review has suggested that the change should be backported. fixed-in-8.0.0-preview.3.8149 Look for this fix in 8.0.0-preview.3.8149!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Image Source to null doesn't work if the Source had a different value before

8 participants