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 #39403

Closed
wants to merge 1 commit 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 facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner labels Sep 12, 2023
@facebook-github-bot
Copy link
Contributor

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

NickGerleman added a commit to NickGerleman/yoga that referenced this pull request Sep 12, 2023
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
@analysis-bot
Copy link

analysis-bot commented Sep 12, 2023

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 8,970,245 -46
android hermes armeabi-v7a n/a --
android hermes x86 n/a --
android hermes x86_64 n/a --
android jsc arm64-v8a 9,562,719 -12
android jsc armeabi-v7a n/a --
android jsc x86 n/a --
android jsc x86_64 n/a --

Base commit: 5a926c5
Branch: main

@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
@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: a7c1f08b56933bcd805262298f149708c8e537fa
@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: 548fea20739f08feb3e61e4c3d831c0ac688b168
@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: d8b4e48c1e890bf5feff58f3077c53b25a5afa68
@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: cf43de362ea1338ceb7679276f87123ee5db8136
@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: 1cd9e5f9fa3f8430d1d453830c0b8cf296dd9ee6
@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 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 NickGerleman force-pushed the export-D49181131 branch 2 times, most recently from d24a013 to 4bac95e Compare September 13, 2023 19:10
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 was exported from Phabricator. Differential Revision: D49181131

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 was exported from Phabricator. Differential Revision: D49181131

facebook-github-bot pushed a commit to facebook/yoga that referenced this pull request Sep 13, 2023
Summary:
Pull Request resolved: #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/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
@github-actions
Copy link

This pull request was successfully merged by @NickGerleman in dce7242.

When will my fix make it into a release? | Upcoming Releases

@github-actions github-actions bot added the Merged This PR has been merged. label Sep 13, 2023
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in dce7242.

adamaveray added a commit to adamaveray/react-native that referenced this pull request Sep 13, 2023
* main: (1012 commits)
  Add simple constructor for JSError (facebook#39415)
  Breaking: per-node pointScaleFactor (facebook#39403)
  Implement "tickleJS" for Hermes (facebook#39289)
  Add thread idle indicator (facebook#39206)
  Unblock `yarn android` on main (facebook#39413)
  Remove Codegen buck-oss scripts as they're unused (facebook#39422)
  Immediately dispatch events to the shared C++ infrastructure to support interruptability (facebook#39380)
  Fix race condition in Binding::reportMount (facebook#39420)
  Clone free state progression (facebook#39357)
  fix: return the correct default trait collection (facebook#38214)
  Read the React Native version and set the new arch flag properly (facebook#39388)
  Deprecate default_flags in Podfile (facebook#39389)
  Create Helper to read the package.json from Cocoapods (facebook#39390)
  Create helper to enforce the New Arch enabled for double released (facebook#39387)
  Remove layoutContext Drilling (facebook#39401)
  Remove JNI Binding usage of layoutContext (facebook#39402)
  Extract isBaselineLayout() (facebook#39400)
  Refactor and separate layout affected nodes react marker (facebook#39249)
  Bump AGP to 8.1.1 (facebook#39392)
  Fix broken Gradle Sync when opening the project with Android Studio (facebook#39412)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants