Incorrect interpretation of AutoLayouts in certain situations
ivan-015 opened this issue · 0 comments
Describe the bug
AutoLayout is currently being interpreted incorrectly in certain situations. Specifically, this is caused by misinterpretation of sizing/constraints from the Figma elements.
For a specific example, take a look at the following image. Specifically, the element labeled Tag Section
:
Horizontally, it has a value of fill, which means that as it scales horizontally, it fills its parent:
However, when converting, the Tag Section
does not scale as it should:
Going into the code, we see the following:
Looking at line 138
and line 149
, we can see that the Container actually has a width, when it shouldn't. Removing the container in line 138 and removing the width in line 149 solves the issue:
The fixes applied above match the planning for AutoLayout rules as seen here:
To Reproduce
Steps to reproduce the behavior:
- Generate the following file: AaGNw26baKo91CT0I4BwlJ
- Open the
admin_city_section_edit_screen.g.dart
file and scale horizontally. - You should notice the scaling issues when comparing it to horizontal scaling of the screen in Figma.
Impact of the problem
AutoLayout is generating incorrectly.
Environment:
- OS: macOS
- Flutter and dart versions:
-
Flutter 3.0.1 • channel stable • https://github.com/flutter/flutter.git Framework • revision fb57da5f94 (11 days ago) • 2022-05-19 15:50:29 -0700 Engine • revision caaafc5604 Tools • Dart 2.17.1 • DevTools 2.12.2
-
- parabeac_core branch:
dev
- pbdl branch:
master
Additional Context:
For more information on the original planning for AutoLayout, see below:
https://www.figma.com/file/wqP2dNsmIvPiSnhM8m97kw/Auto-Layout-Map-Planning?node-id=0%3A1
https://www.notion.so/parabeac/Auto-Layout-support-5e1a77740f234cfdbdd6b94b506a65f1