Skip to content
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

Fill container percentage values #4291

Merged
merged 4 commits into from
Oct 3, 2023
Merged

Conversation

bkrmendy
Copy link
Contributor

@bkrmendy bkrmendy commented Oct 2, 2023

Problems

  • When resizing an element that has its width or height set in percentage values, Utopia writes back non-rounded percentage values into the resulting width/height prop (such as 97.3544973545%). This is unnecessarily long and precise.
  • Percentage values other than 100% are classified as Fill container by the width/height control.

Fix

  • Round the percentage values to 2 decimal places
  • Fix the width/height control setting detection function

@github-actions
Copy link
Contributor

github-actions bot commented Oct 2, 2023

Try me

@relativeci
Copy link

relativeci bot commented Oct 2, 2023

Job #8371: Bundle Size — 62.78MiB (~+0.01%).

78b3c94(current) vs 5957b21 master#8364(baseline)

Warning

Bundle contains 64 duplicate packages - View duplicate packages

Bundle metrics (1 change)
                 Current
Job #8371
     Baseline
Job #8364
Initial JS 35.05MiB(~+0.01%) 35.05MiB
Initial CSS 0B 0B
Cache Invalidation 18.39% 18.39%
Chunks 27 27
Assets 31 31
Modules 3973 3973
Duplicate Modules 424 424
Duplicate Code 30.9% 30.9%
Packages 409 409
Duplicate Packages 64 64
Bundle size by type (1 change)
                 Current
Job #8371
     Baseline
Job #8364
CSS 0B 0B
Fonts 0B 0B
HTML 11.43KiB 11.43KiB
IMG 0B 0B
JS 62.77MiB (~+0.01%) 62.77MiB
Media 0B 0B
Other 0B 0B

View job #8371 reportView fix/arbitrary-percent-value-fill branch activity

@github-actions
Copy link
Contributor

github-actions bot commented Oct 2, 2023

Performance test results:
(Chart1)
(Chart2)

@bkrmendy bkrmendy marked this pull request as ready for review October 3, 2023 08:28
@bkrmendy bkrmendy merged commit 53f7769 into master Oct 3, 2023
12 checks passed
@bkrmendy bkrmendy deleted the fix/arbitrary-percent-value-fill branch October 3, 2023 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants