-
Notifications
You must be signed in to change notification settings - Fork 540
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Android] Fix column widths #5084
Conversation
Could you please update the description section to also describe the fix you made to the issue? Thanks! |
Hi @golddove. This non-spec pull request has had no recent activity for the past 5 days . Please take the necessary actions (review, address feedback or commit if reviewed already) to move this along. |
Hi @golddove; Thanks for taking action on your previously stale pull request. Resetting staleness. |
@RebeccaAnne updated description to reflect that the fix was to match the flex properties to match the JS renderer. Added the new values to the description. |
Switched weight from flex-basis to flex-grow, as discussed with @dclaux. Later, should investigate how all other platforms deal with combinations of weight, stretch, auto. |
* Fix column widths * Match JS flex-basis * flex-basis 0 for stretch * flex-grow instead of shrink Co-authored-by: Shalini Joshi-MSFT <shalinij@microsoft.com>
Related Issue
Fixes #4988
Description
Auto and fixed width columns were shrinking prematurely. To fix, flex params were set to match the JS renderer params, described below:
fixed
: grow -0
, shrink -0
, basis -<px>
auto
: grow -0
, shrink -1
, basis -content
stretch
: grow -1
, shrink -1
, basis -0
(JS sets a50px
basis here)weighted
: grow -<weight>
, shrink -1
, basis -0
(JS uses weight in basis here)Note: Google's FlexboxLayout library doesn't scale flex-shrink values by flex-basis before applying (unlike CSS flex-shrink). This difference means
auto
columns always shrink to 0 when combined withweighted
columns (e.g. the icons along the center vertical line inAgenda.json
disappears) if we use the same configuration as JS. To avoid this, weighted columns useflex-grow
instead of relying on interaction betweenflex-shrink
andflex-basis
.Sample Card
v1.2\Scenarios\Agenda.json
v1.2\Scenarios\FlightDetails.json
Also verified with samples from Teams production apps.
How Verified
Manual verification. See screenshots above.
Microsoft Reviewers: Open in CodeFlow