-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Rename ambiguous getLeading/Trailing... functions in Node.cpp #1424
Conversation
This pull request was exported from Phabricator. Differential Revision: D50344874 |
Summary: X-link: facebook/yoga#1424 See D50344874 Differential Revision: D50344874 fbshipit-source-id: bb4d0c474e3b8f7e1a087e17cdb5e7eedb648bca
A huge +1 for this change. I can read those new names and know exactly what they refer to. Whereas the old ones were indeed ambiguous to me. |
This pull request was exported from Phabricator. Differential Revision: D50344874 |
…ok#1424) Summary: X-link: facebook/react-native#41018 Pull Request resolved: facebook#1424 See D50344874 Reviewed By: NickGerleman Differential Revision: D50344874 fbshipit-source-id: 1a24ae1cdb9374cd7b84895fb7d5ea6bc9507bb1
a00ffa7
to
3b4169a
Compare
…ok#41018) Summary: Pull Request resolved: facebook#41018 X-link: facebook/yoga#1424 See D50344874 Reviewed By: NickGerleman Differential Revision: D50344874 fbshipit-source-id: 995bb1a6cd2e9a9d2b79caf8aab7e09152a9294c
…ok#1424) Summary: X-link: facebook/react-native#41018 See D50344874 Reviewed By: NickGerleman Differential Revision: D50344874
3b4169a
to
f2510ee
Compare
…ok#41018) Summary: X-link: facebook/yoga#1424 See D50344874 Reviewed By: NickGerleman Differential Revision: D50344874
This pull request was exported from Phabricator. Differential Revision: D50344874 |
1 similar comment
This pull request was exported from Phabricator. Differential Revision: D50344874 |
f2510ee
to
0912018
Compare
…ok#1424) Summary: X-link: facebook/react-native#41018 Pull Request resolved: facebook#1424 See D50344874 Reviewed By: NickGerleman Differential Revision: D50344874 fbshipit-source-id: a423a7f8cefbc541c1b0bb1dae11fe81cbedfe96
…ok#41018) Summary: Pull Request resolved: facebook#41018 X-link: facebook/yoga#1424 See D50344874 Reviewed By: NickGerleman Differential Revision: D50344874 fbshipit-source-id: fdff690712d7740072257afaa931a3b09ad79c16
…ok#41018) Summary: X-link: facebook/yoga#1424 See D50344874 Reviewed By: NickGerleman Differential Revision: D50344874
…ok#41018) Summary: X-link: facebook/yoga#1424 See D50344874 Reviewed By: NickGerleman Differential Revision: D50344874
…ok#41018) Summary: X-link: facebook/yoga#1424 See D50344874 Reviewed By: NickGerleman Differential Revision: D50344874
…ok#1424) Summary: X-link: facebook/react-native#41018 See D50344874 Reviewed By: NickGerleman Differential Revision: D50344874
0912018
to
98cc7c6
Compare
…ok#41018) Summary: X-link: facebook/yoga#1424 See D50344874 Reviewed By: NickGerleman Differential Revision: D50344874
This pull request was exported from Phabricator. Differential Revision: D50344874 |
…ok#1424) Summary: X-link: facebook/react-native#41018 See D50344874 Reviewed By: NickGerleman Differential Revision: D50344874
…ok#41018) Summary: X-link: facebook/yoga#1424 See D50344874 Reviewed By: NickGerleman Differential Revision: D50344874
Summary: X-link: facebook/react-native#41017 Before resolving facebook#1208 yoga was in a state where "leading" and "trailing" only referred to the main-start and main-end directions ([definition in spec](https://drafts.csswg.org/css-flexbox/#box-model)). That is, the start/end of the layout of flex items in a container. This is distinct from something like inline-start/inline-end which is the [start of text layout as defined by direction](https://drafts.csswg.org/css-writing-modes-3/#inline-start). The bug linked above happened because "leading" and "trailing" functions are referring to the wrong directions in certain cases. So in order to fix this we added a new set of functions to get the "leading" and "trailing" edges according to what inline-start/inline-end would refer to - i.e. those defined by the direction (ltr | rtl). In this state I think it is confusing to understand which function refers to which direction and more specific names could help that. This diff just renames the following 4 FlexDirection.h functions: * **leadingEdge** -> **flexStartEdge** * **trailingEdge** -> **flexEndEdge** * **leadingLayoutEdge** -> **inlineStartEdge** * **trailingLayoutEdge** -> **inlineEndEdge** The spec calls the start/end directions as dictated by the flex-direction attribute "main-start" and "main-end" respectively, but mainStartEdge might be a bit confusing given it will be compared to a non-flexbox-specific name in inlineStartEdge. As a result I landed on flexStart/flexEnd similar to what values are used with alignment attributes (justify-content, align-content). I chose to get rid of the "leading" and "trailing" descriptors to be more in line with what terminology the spec uses. Next diff will be to rename the functions in Node.cpp to adhere to the above patterns. Reviewed By: NickGerleman Differential Revision: D50342254
…ok#1424) Summary: X-link: facebook/react-native#41018 See D50344874 Reviewed By: NickGerleman Differential Revision: D50344874
98cc7c6
to
94fe535
Compare
…ok#41018) Summary: X-link: facebook/yoga#1424 See D50344874 Reviewed By: NickGerleman Differential Revision: D50344874
This pull request was exported from Phabricator. Differential Revision: D50344874 |
…ok#1424) Summary: X-link: facebook/react-native#41018 See D50344874 Reviewed By: NickGerleman Differential Revision: D50344874
…ok#41018) Summary: X-link: facebook/yoga#1424 See D50344874 Reviewed By: NickGerleman Differential Revision: D50344874
Summary: X-link: facebook/react-native#41018 X-link: facebook/yoga#1424 See D50344874 Reviewed By: NickGerleman Differential Revision: D50344874 fbshipit-source-id: 32fc35df674eb854c682a5e387c031a94c1c4f68
This pull request has been merged in e170059. |
Summary: Pull Request resolved: #41018 X-link: facebook/yoga#1424 See D50344874 Reviewed By: NickGerleman Differential Revision: D50344874 fbshipit-source-id: 32fc35df674eb854c682a5e387c031a94c1c4f68
…ok#41018) Summary: Pull Request resolved: facebook#41018 X-link: facebook/yoga#1424 See D50344874 Reviewed By: NickGerleman Differential Revision: D50344874 fbshipit-source-id: 32fc35df674eb854c682a5e387c031a94c1c4f68
Summary: See D50344874
Differential Revision: D50344874