-
-
Notifications
You must be signed in to change notification settings - Fork 904
New CSSBoxWidget and lots of bug fixes #1135
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
Conversation
Allow centering images with auto-margins
Add support for auto horizontal margins
Codecov ReportBase: 51.09% // Head: 51.44% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #1135 +/- ##
==========================================
+ Coverage 51.09% 51.44% +0.35%
==========================================
Files 11 17 +6
Lines 2018 2587 +569
==========================================
+ Hits 1031 1331 +300
- Misses 987 1256 +269
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
This is impressive work work Matthew! I am going to take it for a spin tomorrow. I have a bunch of experience with golden widget tests so if you like I can help with that. |
This is working really well. It's not that it solves all issues we had rioght now (and it doesn't need to) but it's a great foundation. I tested on Android and Web and rendering looks good. The code is looking good, evn though it's a bit tough to read through all changes. But that's okay, I'd rather have this base with a bug than the spaghetti we had right now sometimes. Good job @Sub6Resources |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is amazing work. Consider my comments as just thoughts/considerations/future work, as it's really solid code. Great job!
width = childSize.width + horizontalMargins; | ||
height = childSize.height + verticalMargins; | ||
break; | ||
case Display.LIST_ITEM: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a thought: This might not be sufficient for list items that (via css) you force to a specific display: inline
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to push this one off as future work. We've got a whole slew of list issues that need to be resolved so I'll tackle this when I start tackling those.
Going to go ahead and merge this since the most recent changes were pretty trivial, unit tests passed, and my visual tests look the same before and after. |
There's a lot going on in this branch but it's time for review.
tldr; Calculating widths/margins/padding/border is hard, so I made a new widget that replaces both ContainerSpan and StyledText. This refactor also caused a good chunk of Style code to need refactoring, so I did so, adding support for
em
,rem
,px
,%
, andauto
values on the margin/width/height properties.Fixes:
issue
auto
width and height is now the default, rather thannull
Enhancements:
em
,rem
,px
,auto
, and%
values to be used. (These extend a new Dimension class that does Unit checking to make sure only valid units are used)em
values now used forh1
-6
andp
tag default margins and font sizes, which are more accurate at various font sizes.Notable breaking change: