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

feat: Add spacing feature to flex example ✨ #830

Merged
merged 1 commit into from
Jan 16, 2024

Conversation

kdheepak
Copy link
Collaborator

This adds the spacing using + and - to the flex example:

space-flex.mov

This was useful to find and debug spacing related bugs like this: #829

@Valentin271
Copy link
Member

I like this a lot, could we display the current spacing value somewhere? And maybe add a note that Space* don't support spacing.

I see you fixed the proportional bug in #829 (I rebased locally and tested). I still can see a bug with Percentage or maybe Length.

flex-bug-2024-01-16_13.18.21.mp4

I also recommend bumping the layout cache to 200 because every + or - is a lot of "layouting" added. I can really feel it on my machine.

@kdheepak kdheepak force-pushed the kd/flex-spacing-example branch from 8179e9f to eb9ed42 Compare January 16, 2024 14:51
Copy link

codecov bot commented Jan 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (813f707) 92.5% compared to head (59a352b) 92.5%.
Report is 2 commits behind head on main.

Additional details and impacted files
@@          Coverage Diff           @@
##            main    #830    +/-   ##
======================================
  Coverage   92.5%   92.5%            
======================================
  Files         59      59            
  Lines      15745   15849   +104     
======================================
+ Hits       14571   14675   +104     
  Misses      1174    1174            

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kdheepak kdheepak force-pushed the kd/flex-spacing-example branch from eb9ed42 to 59a352b Compare January 16, 2024 14:55
@kdheepak
Copy link
Collaborator Author

I like this a lot, could we display the current spacing value somewhere?

Good idea. I added it to the axis.

image

I also fixed the axis to show the correct width of the blocks when there is a scrollbar or not.

And maybe add a note that Space* don't support spacing.

Done.

image

I still can see a bug with Percentage or maybe Length.

Yes, that can only be fixed with this PR though: #788
Trying to get other PRs through and will work on the constraint weights at the end.

I also recommend bumping the layout cache to 200

I bumped it to a higher number because I was seeing lag too.

Thanks for the comments!

Copy link
Member

@Valentin271 Valentin271 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me then!

@Valentin271 Valentin271 merged commit ae6a2b0 into main Jan 16, 2024
34 checks passed
@Valentin271 Valentin271 deleted the kd/flex-spacing-example branch January 16, 2024 16:19
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