XamarinCommunityToolkit icon indicating copy to clipboard operation
XamarinCommunityToolkit copied to clipboard

[Bug] [ShieldView] [Android] [iOS] ShieldView incorrect height when in grid and with colspan set

Open FedericoNembrini opened this issue 2 years ago • 0 comments

Description

I have encountered a bug when using the ShieldView. When in a grid, setting the columnspan cause the height to overflow.

I did some tests by rebuilding the shieldview from scratch and changing some settings to correct this strange behaviour which, as far as i saw, is probably caused by:

  1. The use of the margin on the labels
  2. The use of the grid with two auto columns and the individual grids with columns *.

However, I could not understand why one grid is used, with two other grids inside, with the two labels inside. Wouldn't it be better to just use the outer grid and the two labels? Is it possible that I am missing something?

All of this is for Android, I have not yet had time to test it on iOS and UWP. If I can in the next few days I will do some tests on the other platforms.

Edit: Same behaviour happens for iOS.

Link to Reproduction Sample

https://github.com/FedericoNembrini/XamarinCommunityToolkit/tree/shield-view-colspan-issue

Steps to Reproduce

  1. Add a shield view to a grid with multiple columns and set the column span to the max number of columns

Expected Behavior

View with correct height.

Actual Behavior

View with incorrect height.

Workaround

Workarounds can be found in Reproduction Sample.

Reproduction imagery

  1. Shield view and reconstructed shield view
  2. Modified shield view structure

FedericoNembrini avatar Sep 17 '22 10:09 FedericoNembrini