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

Fix style resolution functions returning FloatOptional #1404

Closed
wants to merge 4 commits into from

Conversation

NickGerleman
Copy link
Contributor

Summary: These functions all ensure their returns are defined, but return FloatOptional anyway, making their callers have to deal with that possibility. Return float instead of FloatOptional, and do some additional cleanup.

Differential Revision: D49531421

NickGerleman and others added 4 commits September 22, 2023 00:50
Summary:
Replaces all usages of YGDimension with Dimension.

Adds `yoga::to_underlying` to act like `std::to_underlying`, added in C++ 23.

This enum is oddly only used internally, and is never an input to the public API, but it handled as any other public generated enum. Potentially some more cleanup to do there.

Differential Revision: D49475409

fbshipit-source-id: 92cd33e38268f5a3b7a98bbcea0cbc61b87f9360
Summary: I noticed that we weren't clamping negative flex gap values to zero. This fixes that bug.

Differential Revision: D49530494

fbshipit-source-id: 0f1f86a5fbed698f4ab307e3eb5a75f94904989b
Summary:
Similar in vain to D49362819, we want to stop exposing pre-resolved CompactValue, and allow enum class usage without becoming annoying.

This also simplifies gap resolution a bit. I moved this to Style, to make it clear we aren't relying on any node state. I plan to do some similar cleanup for other resolution later.

Differential Revision: D49530923

fbshipit-source-id: 73191aef09d30f8790b9b4d88c582b318b7b8dbc
Summary: These functions all ensure their returns are defined, but return FloatOptional anyway, making their callers have to deal with that possibility. Return `float` instead of `FloatOptional`, and do some additional cleanup.

Differential Revision: D49531421

fbshipit-source-id: 60a7072b811c57298220de3a95c81ab0e666088e
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D49531421

NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Sep 22, 2023
Summary:
Pull Request resolved: facebook#39595

X-link: facebook/yoga#1404

These functions all ensure their returns are defined, but return FloatOptional anyway, making their callers have to deal with that possibility. Return `float` instead of `FloatOptional`, and do some additional cleanup.

Differential Revision: D49531421

fbshipit-source-id: 3057e58cdd112a0cb87b1e920aef9c6010954a31
NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Sep 22, 2023
Summary:
Pull Request resolved: facebook#39595

X-link: facebook/yoga#1404

These functions all ensure their returns are defined, but return FloatOptional anyway, making their callers have to deal with that possibility. Return `float` instead of `FloatOptional`, and do some additional cleanup.

Differential Revision: D49531421

fbshipit-source-id: 6e12f43410ada6b85d57083d4bc690395554367f
NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Sep 26, 2023
Summary:
Pull Request resolved: facebook#39595

X-link: facebook/yoga#1404

These functions all ensure their returns are defined, but return FloatOptional anyway, making their callers have to deal with that possibility. Return `float` instead of `FloatOptional`, and do some additional cleanup.

Differential Revision: D49531421

fbshipit-source-id: 209eb8d7b8f8e9d3479a83e764b4b3d3a964b463
NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Sep 26, 2023
Summary:
Pull Request resolved: facebook#39595

X-link: facebook/yoga#1404

These functions all ensure their returns are defined, but return FloatOptional anyway, making their callers have to deal with that possibility. Return `float` instead of `FloatOptional`, and do some additional cleanup.

Differential Revision: D49531421

fbshipit-source-id: 809ec7c722122074ebdaa689ace52f1dc43048b9
NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Sep 28, 2023
Summary:
Pull Request resolved: facebook#39595

X-link: facebook/yoga#1404

These functions all ensure their returns are defined, but return FloatOptional anyway, making their callers have to deal with that possibility. Return `float` instead of `FloatOptional`, and do some additional cleanup.

Differential Revision: D49531421

fbshipit-source-id: 4f38d5e205d2356faf8bd456667a2f3c520d0728
NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Oct 3, 2023
Summary:
Pull Request resolved: facebook#39595

X-link: facebook/yoga#1404

These functions all ensure their returns are defined, but return FloatOptional anyway, making their callers have to deal with that possibility. Return `float` instead of `FloatOptional`, and do some additional cleanup.

Reviewed By: rshest

Differential Revision: D49531421

fbshipit-source-id: affb992588dbeede66d49cc476049c2d5cc96408
NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Oct 3, 2023
Summary:

X-link: facebook/yoga#1404

These functions all ensure their returns are defined, but return FloatOptional anyway, making their callers have to deal with that possibility. Return `float` instead of `FloatOptional`, and do some additional cleanup.

Reviewed By: rshest

Differential Revision: D49531421
NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Oct 3, 2023
Summary:

X-link: facebook/yoga#1404

These functions all ensure their returns are defined, but return FloatOptional anyway, making their callers have to deal with that possibility. Return `float` instead of `FloatOptional`, and do some additional cleanup.

Reviewed By: rshest

Differential Revision: D49531421
NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Oct 3, 2023
Summary:

X-link: facebook/yoga#1404

These functions all ensure their returns are defined, but return FloatOptional anyway, making their callers have to deal with that possibility. Return `float` instead of `FloatOptional`, and do some additional cleanup.

Reviewed By: rshest

Differential Revision: D49531421
NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Oct 3, 2023
Summary:

X-link: facebook/yoga#1404

These functions all ensure their returns are defined, but return FloatOptional anyway, making their callers have to deal with that possibility. Return `float` instead of `FloatOptional`, and do some additional cleanup.

Reviewed By: rshest

Differential Revision: D49531421
facebook-github-bot pushed a commit to facebook/litho that referenced this pull request Oct 3, 2023
Summary:
X-link: facebook/react-native#39595

X-link: facebook/yoga#1404

These functions all ensure their returns are defined, but return FloatOptional anyway, making their callers have to deal with that possibility. Return `float` instead of `FloatOptional`, and do some additional cleanup.

Reviewed By: rshest

Differential Revision: D49531421

fbshipit-source-id: 95b21cade74e501dd54c7b6ca667c8c3859c5dae
facebook-github-bot pushed a commit to facebook/react-native that referenced this pull request Oct 3, 2023
Summary:
Pull Request resolved: #39595

X-link: facebook/yoga#1404

These functions all ensure their returns are defined, but return FloatOptional anyway, making their callers have to deal with that possibility. Return `float` instead of `FloatOptional`, and do some additional cleanup.

Reviewed By: rshest

Differential Revision: D49531421

fbshipit-source-id: 95b21cade74e501dd54c7b6ca667c8c3859c5dae
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 2734784.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants