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

Per-node pointScaleFactor #1379

Closed
wants to merge 4 commits into from

Conversation

NickGerleman
Copy link
Contributor

Summary:
Right now we have a pointScaleFactor per-node, but only ever read the one of the root node. In most cases where config is global, these will be the same, but it is possible for these to differ.

This... doesn't make much sense from an API perspective, and there are edge cases where we may want to allow laying out a subtree with a different DPI then the rest of the tree (though I think there might be other solutions to that).

We should rethink some of what is currently on config being allowed per-node (do we really need each node to be able to have a separate logger?), but this makes the model consistent in the meantime.

Differential Revision: D49181131

@facebook-github-bot
Copy link
Contributor

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

NickGerleman and others added 4 commits September 12, 2023 01:38
Summary: Moves `isBaselineLayout` out of `CalculateLayout` into `Baseline.h`. This function is called by flex line justification code, which I have been looking at extracting.

Differential Revision: D49177937

fbshipit-source-id: 1033d929eee98a7a52983f3b8027f8043e3eba99
Summary:
To avoid keeping a per-node mapping on native Yoga nodes to Java nodes, a per-layout context was added, to be able to pass information from the start of the layout, to measure functions, log functions, etc.

The way this was done was super invasive, and added quite a few private APIs used only by the JNI functions.

This change removes the context-using functions from the JNI bindings in favor of it managing its own context. Next diff removes all the cruft.

Differential Revision: D49179243

fbshipit-source-id: bbd6a9099af092a61699d70ebaf7d582c5c56aa6
Summary: kill_with_fire_flamethrower

Differential Revision: D49179244

fbshipit-source-id: 127a98aca5f5147631dcc98ce253e85d4cebeaed
Summary:
Pull Request resolved: facebook#1379

X-link: facebook/react-native#39403

Right now we have a `pointScaleFactor` per-node, but only ever read the one of the root node. In most cases where config is global, these will be the same, but it is possible for these to differ.

This... doesn't make much sense from an API perspective, and there are edge cases where we may want to allow laying out a subtree with a different DPI then the rest of the tree (though I think there might be other solutions to that).

We should rethink some of what is currently on config being allowed per-node (do we really need each node to be able to have a separate logger?), but this makes the model consistent in the meantime.

Differential Revision: D49181131

fbshipit-source-id: 49b561c00b166357834842ad8aed0ceca7427458
@facebook-github-bot
Copy link
Contributor

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

NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Sep 12, 2023
Summary:
X-link: facebook/yoga#1379

Pull Request resolved: facebook#39403

Right now we have a `pointScaleFactor` per-node, but only ever read the one off the root node. In most cases where config is global, these will be the same, but it is possible for these to differ.

This... doesn't make much sense from an API perspective, and there are edge cases where we may want to allow laying out a subtree with a different DPI then the rest of the tree (though I think there might be other solutions to that).

We should rethink some of what is currently on config being allowed per-node (do we really need each node to be able to have a separate logger?), but this makes the model consistent in the meantime.

Reviewed By: yungsters

Differential Revision: D49181131

fbshipit-source-id: 0045f65674e503c93dc54d136a1c1e69ed9365ed
NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Sep 12, 2023
Summary:
X-link: facebook/yoga#1379

Pull Request resolved: facebook#39403

Right now we have a `pointScaleFactor` per-node, but only ever read the one off the root node. In most cases where config is global, these will be the same, but it is possible for these to differ.

This... doesn't make much sense from an API perspective, and there are edge cases where we may want to allow laying out a subtree with a different DPI then the rest of the tree (though I think there might be other solutions to that).

We should rethink some of what is currently on config being allowed per-node (do we really need each node to be able to have a separate logger?), but this makes the model consistent in the meantime.

Reviewed By: yungsters

Differential Revision: D49181131

fbshipit-source-id: a7c1f08b56933bcd805262298f149708c8e537fa
NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Sep 12, 2023
Summary:
X-link: facebook/yoga#1379

Pull Request resolved: facebook#39403

Right now we have a `pointScaleFactor` per-node, but only ever read the one off the root node. In most cases where config is global, these will be the same, but it is possible for these to differ.

This... doesn't make much sense from an API perspective, and there are edge cases where we may want to allow laying out a subtree with a different DPI then the rest of the tree (though I think there might be other solutions to that).

We should rethink some of what is currently on config being allowed per-node (do we really need each node to be able to have a separate logger?), but this makes the model consistent in the meantime.

Reviewed By: yungsters

Differential Revision: D49181131

fbshipit-source-id: 548fea20739f08feb3e61e4c3d831c0ac688b168
NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Sep 12, 2023
Summary:
X-link: facebook/yoga#1379

Pull Request resolved: facebook#39403

Right now we have a `pointScaleFactor` per-node, but only ever read the one off the root node. In most cases where config is global, these will be the same, but it is possible for these to differ.

This... doesn't make much sense from an API perspective, and there are edge cases where we may want to allow laying out a subtree with a different DPI then the rest of the tree (though I think there might be other solutions to that).

We should rethink some of what is currently on config being allowed per-node (do we really need each node to be able to have a separate logger?), but this makes the model consistent in the meantime.

Reviewed By: yungsters

Differential Revision: D49181131

fbshipit-source-id: d8b4e48c1e890bf5feff58f3077c53b25a5afa68
NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Sep 12, 2023
Summary:
X-link: facebook/yoga#1379

Pull Request resolved: facebook#39403

Right now we have a `pointScaleFactor` per-node, but only ever read the one off the root node. In most cases where config is global, these will be the same, but it is possible for these to differ.

This... doesn't make much sense from an API perspective, and there are edge cases where we may want to allow laying out a subtree with a different DPI then the rest of the tree (though I think there might be other solutions to that).

We should rethink some of what is currently on config being allowed per-node (do we really need each node to be able to have a separate logger?), but this makes the model consistent in the meantime.

Reviewed By: yungsters

Differential Revision: D49181131

fbshipit-source-id: cf43de362ea1338ceb7679276f87123ee5db8136
NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Sep 12, 2023
Summary:
X-link: facebook/yoga#1379

Pull Request resolved: facebook#39403

Right now we have a `pointScaleFactor` per-node, but only ever read the one off the root node. In most cases where config is global, these will be the same, but it is possible for these to differ.

This... doesn't make much sense from an API perspective, and there are edge cases where we may want to allow laying out a subtree with a different DPI then the rest of the tree (though I think there might be other solutions to that).

We should rethink some of what is currently on config being allowed per-node (do we really need each node to be able to have a separate logger?), but this makes the model consistent in the meantime.

Reviewed By: yungsters

Differential Revision: D49181131

fbshipit-source-id: 1cd9e5f9fa3f8430d1d453830c0b8cf296dd9ee6
NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Sep 13, 2023
Summary:
X-link: facebook/yoga#1379


Right now we have a `pointScaleFactor` per-node, but only ever read the one off the root node. In most cases where config is global, these will be the same, but it is possible for these to differ.

This... doesn't make much sense from an API perspective, and there are edge cases where we may want to allow laying out a subtree with a different DPI then the rest of the tree (though I think there might be other solutions to that).

We should rethink some of what is currently on config being allowed per-node (do we really need each node to be able to have a separate logger?), but this makes the model consistent in the meantime.

This change is breaking to any users relying on setting `pointScaleFactor` on the config of the root node, but not other nodes.

Reviewed By: yungsters

Differential Revision: D49181131
NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Sep 13, 2023
Summary:
X-link: facebook/yoga#1379


Right now we have a `pointScaleFactor` per-node, but only ever read the one off the root node. In most cases where config is global, these will be the same, but it is possible for these to differ.

This... doesn't make much sense from an API perspective, and there are edge cases where we may want to allow laying out a subtree with a different DPI then the rest of the tree (though I think there might be other solutions to that).

We should rethink some of what is currently on config being allowed per-node (do we really need each node to be able to have a separate logger?), but this makes the model consistent in the meantime.

This change is breaking to any users relying on setting `pointScaleFactor` on the config of the root node, but not other nodes.

Reviewed By: yungsters

Differential Revision: D49181131
NickGerleman added a commit to NickGerleman/react-native that referenced this pull request Sep 13, 2023
Summary:
X-link: facebook/yoga#1379


Right now we have a `pointScaleFactor` per-node, but only ever read the one off the root node. In most cases where config is global, these will be the same, but it is possible for these to differ.

This... doesn't make much sense from an API perspective, and there are edge cases where we may want to allow laying out a subtree with a different DPI then the rest of the tree (though I think there might be other solutions to that).

We should rethink some of what is currently on config being allowed per-node (do we really need each node to be able to have a separate logger?), but this makes the model consistent in the meantime.

This change is breaking to any users relying on setting `pointScaleFactor` on the config of the root node, but not other nodes.

Reviewed By: yungsters

Differential Revision: D49181131
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 66cc95f.

facebook-github-bot pushed a commit to facebook/litho that referenced this pull request Sep 13, 2023
Summary:
X-link: facebook/yoga#1379

X-link: facebook/react-native#39403

Right now we have a `pointScaleFactor` per-node, but only ever read the one off the root node. In most cases where config is global, these will be the same, but it is possible for these to differ.

This... doesn't make much sense from an API perspective, and there are edge cases where we may want to allow laying out a subtree with a different DPI then the rest of the tree (though I think there might be other solutions to that).

We should rethink some of what is currently on config being allowed per-node (do we really need each node to be able to have a separate logger?), but this makes the model consistent in the meantime.

This change is breaking to any users relying on setting `pointScaleFactor` on the config of the root node, but not other nodes.

Reviewed By: yungsters

Differential Revision: D49181131

fbshipit-source-id: f1363ca242094f04b995fd50c1e56834d5003425
facebook-github-bot pushed a commit to facebook/react-native that referenced this pull request Sep 13, 2023
Summary:
X-link: facebook/yoga#1379

Pull Request resolved: #39403

Right now we have a `pointScaleFactor` per-node, but only ever read the one off the root node. In most cases where config is global, these will be the same, but it is possible for these to differ.

This... doesn't make much sense from an API perspective, and there are edge cases where we may want to allow laying out a subtree with a different DPI then the rest of the tree (though I think there might be other solutions to that).

We should rethink some of what is currently on config being allowed per-node (do we really need each node to be able to have a separate logger?), but this makes the model consistent in the meantime.

This change is breaking to any users relying on setting `pointScaleFactor` on the config of the root node, but not other nodes.

Reviewed By: yungsters

Differential Revision: D49181131

fbshipit-source-id: f1363ca242094f04b995fd50c1e56834d5003425
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