maui icon indicating copy to clipboard operation
maui copied to clipboard

Fixed Size not calculated properly when invoking UseMauiCompatibility method in MauiProgram

Open NirmalKumarYuvaraj opened this issue 1 year ago • 13 comments

Root Cause

The DesiredSize of the label is set to 0, making the label invisible. In the GetDesiredSize method of the VisualElementRenderer, a size of 0 is returned because the control is null, even though a child element is present.

Description of Change

Measuring the child elements, if they exist, even though the control is null, will resolve this issue.

Validated the behaviour in the following platforms

  • [x] Android
  • [x] Windows
  • [ ] iOS
  • [ ] Mac

Issues Fixed

Fixes #10238

Output

Windows

Before

Before

After After

NirmalKumarYuvaraj avatar Sep 30 '24 11:09 NirmalKumarYuvaraj

Hey there @NirmalKumarYuvaraj! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

/azp run

jsuarezruiz avatar Oct 04 '24 07:10 jsuarezruiz

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar Oct 04 '24 07:10 azure-pipelines[bot]

/azp run

jsuarezruiz avatar Oct 10 '24 13:10 jsuarezruiz

/rebase

NirmalKumarYuvaraj avatar Oct 11 '24 09:10 NirmalKumarYuvaraj

/azp run

jsuarezruiz avatar Oct 11 '24 11:10 jsuarezruiz

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar Oct 11 '24 11:10 azure-pipelines[bot]

/azp run

PureWeen avatar Oct 15 '24 16:10 PureWeen

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar Oct 15 '24 16:10 azure-pipelines[bot]

/backport to release/9.0.1xx

PureWeen avatar Oct 15 '24 16:10 PureWeen

Started backporting to release/9.0.1xx: https://github.com/dotnet/maui/actions/runs/11350449414

github-actions[bot] avatar Oct 15 '24 16:10 github-actions[bot]

@PureWeen backporting to release/9.0.1xx failed, the patch most likely resulted in conflicts:

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

Applying: Fixed - 10238 - Size not calculated properly when invoking UseMauiCompatibility method in MauiProgram
Applying: Modified code changes
Applying: Fixed - 10238 - Size not calculated properly when invoking UseMauiCompatibility method in MauiProgram
Using index info to reconstruct a base tree...
M	src/Compatibility/Core/src/Windows/VisualElementRenderer.cs
Falling back to patching base and 3-way merge...
Auto-merging src/Compatibility/Core/src/Windows/VisualElementRenderer.cs
CONFLICT (content): Merge conflict in src/Compatibility/Core/src/Windows/VisualElementRenderer.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"
Patch failed at 0003 Fixed - 10238 - Size not calculated properly when invoking UseMauiCompatibility method in MauiProgram
Error: The process '/usr/bin/git' failed with exit code 128

Please backport manually!

github-actions[bot] avatar Oct 15 '24 16:10 github-actions[bot]

@PureWeen an error occurred while backporting to release/9.0.1xx, please check the run log for details!

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

github-actions[bot] avatar Oct 15 '24 16:10 github-actions[bot]

A PR targeting GA has been created. Please refer to the link #25494

NirmalKumarYuvaraj avatar Oct 24 '24 09:10 NirmalKumarYuvaraj