Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upstyle: Add a "start_end()" method to LogicalMargin #14136
Conversation
highfive
commented
Nov 8, 2016
|
Heads up! This PR modifies the following files:
|
highfive
commented
Nov 8, 2016
|
Sadly that I failed to find a better name after months :) |
|
I’m ok with adding a new method that takes a direction parameter, for future code where this direction will be a variable. I think But I think this method should not replace the existing |
|
|
|
I have no problem on the rework, while my main concern is the accidental complexity we may add. A new comer may be confused by the three methods with nearly identical behavior, and IMHO we should try to maintain a minimal interface, and the extra Looking forward to your thoughts on this. |
|
It’s true that I haven’t been a newcomer to Servo for some time, but I don’t see how "
I have the exact opposite opinion. These methods are used many times, so making usage more convenient is worth maintaining a couple of one-liner convenience methods. |
|
Alright, I agree your perspective has its rationality. I will rebase and follow your comments later. |
Add a `LogicalMargin::start_end()` method that receives a `Direction' parameter. This is useful for some layout that is symmetric in inline and block directions, like flexbox.
|
Comments addressed. @SimonSapin Thanks for review! |
|
@bors-servo r+ Thanks! Reviewed 5 of 5 files at r1. Comments from Reviewable |
|
|
style: Add a "start_end()" method to LogicalMargin <!-- Please describe your changes on the following line: --> Add a `LogicalMargin::start_end()` method that receives a `Direction' parameter. This is useful for some layout that is symmetric in inline and block directions, like flexbox. Part of #14123. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [X] These changes do not require tests because refactoring <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> r? @SimonSapin <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14136) <!-- Reviewable:end -->
|
|
|
@bors-servo retry |
style: Add a "start_end()" method to LogicalMargin <!-- Please describe your changes on the following line: --> Add a `LogicalMargin::start_end()` method that receives a `Direction' parameter. This is useful for some layout that is symmetric in inline and block directions, like flexbox. Part of #14123. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [X] These changes do not require tests because refactoring <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> r? @SimonSapin <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14136) <!-- Reviewable:end -->
|
|
stshine commentedNov 8, 2016
•
edited
Add a
LogicalMargin::start_end()method that receives a `Direction' parameter. This is useful for some layout that is symmetric in inline and block directions, like flexbox.Part of #14123.
./mach build -ddoes not report any errors./mach test-tidydoes not report any errorsr? @SimonSapin
This change is