-
Notifications
You must be signed in to change notification settings - Fork 24.9k
Fix Switch layout with iOS26 #53326
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 Switch layout with iOS26 #53326
Conversation
|
This pull request was exported from Phabricator. Differential Revision: D80454350 |
|
This pull request was exported from Phabricator. Differential Revision: D80454350 |
Summary: Pull Request resolved: facebook#53326 Apple changed the sizes of the UISwitchComponent and now, if you build an iOs app using the <Switch> component, the layout of the app will be broken because of wrong layout measurements. This has been reported also by [https://github.com/facebook/react-native/issues/52823](https://github.com/facebook/react-native/issues/52823). The `<Switch>` component was using hardcoded values for its size. This change fixes the problem by: - Using codegen for interface only - Implementing a custom Sadow Node to ask the platform for the Switch measurements - Updating the JS layout to wrap the size around the native component. ## Changelog: [iOS][Fixed] - Fix Switch layout to work with iOS26 Differential Revision: D80454350
f987d1c to
e198297
Compare
|
This pull request was exported from Phabricator. Differential Revision: D80454350 |
e198297 to
cb890fc
Compare
Summary: Pull Request resolved: facebook#53326 Apple changed the sizes of the UISwitchComponent and now, if you build an iOs app using the <Switch> component, the layout of the app will be broken because of wrong layout measurements. This has been reported also by [https://github.com/facebook/react-native/issues/52823](https://github.com/facebook/react-native/issues/52823). The `<Switch>` component was using hardcoded values for its size. This change fixes the problem by: - Using codegen for interface only - Implementing a custom Sadow Node to ask the platform for the Switch measurements - Updating the JS layout to wrap the size around the native component. ## Changelog: [iOS][Fixed] - Fix Switch layout to work with iOS26 Differential Revision: D80454350
|
This pull request was exported from Phabricator. Differential Revision: D80454350 |
cb890fc to
9b47a5e
Compare
Summary: Pull Request resolved: facebook#53326 Apple changed the sizes of the UISwitchComponent and now, if you build an iOs app using the <Switch> component, the layout of the app will be broken because of wrong layout measurements. This has been reported also by [https://github.com/facebook/react-native/issues/52823](https://github.com/facebook/react-native/issues/52823). The `<Switch>` component was using hardcoded values for its size. This change fixes the problem by: - Using codegen for interface only - Implementing a custom Sadow Node to ask the platform for the Switch measurements - Updating the JS layout to wrap the size around the native component. ## Changelog: [iOS][Fixed] - Fix Switch layout to work with iOS26 Differential Revision: D80454350
9b47a5e to
24f1d71
Compare
Summary: Apple changed the sizes of the UISwitchComponent and now, if you build an iOs app using the <Switch> component, the layout of the app will be broken because of wrong layout measurements. This has been reported also by [https://github.com/facebook/react-native/issues/52823](https://github.com/facebook/react-native/issues/52823). The `<Switch>` component was using hardcoded values for its size. This change fixes the problem by: - Using codegen for interface only - Implementing a custom Sadow Node to ask the platform for the Switch measurements - Updating the JS layout to wrap the size around the native component. ## Changelog: [iOS][Fixed] - Fix Switch layout to work with iOS26 Reviewed By: sammy-SC Differential Revision: D80454350
|
This pull request was exported from Phabricator. Differential Revision: D80454350 |
Summary: Apple changed the sizes of the UISwitchComponent and now, if you build an iOs app using the <Switch> component, the layout of the app will be broken because of wrong layout measurements. This has been reported also by [https://github.com/facebook/react-native/issues/52823](https://github.com/facebook/react-native/issues/52823). The `<Switch>` component was using hardcoded values for its size. This change fixes the problem by: - Using codegen for interface only - Implementing a custom Sadow Node to ask the platform for the Switch measurements - Updating the JS layout to wrap the size around the native component. ## Changelog: [iOS][Fixed] - Fix Switch layout to work with iOS26 Reviewed By: sammy-SC Differential Revision: D80454350
24f1d71 to
1913ca7
Compare
|
@cipolleschi has exported this pull request. If you are a Meta employee, you can view the originating diff in D80454350. |
|
This pull request has been merged in 91d427f. |
|
This pull request was successfully merged by @cipolleschi in 91d427f When will my fix make it into a release? | How to file a pick request? |
Summary: Pull Request resolved: #53326 Apple changed the sizes of the UISwitchComponent and now, if you build an iOs app using the <Switch> component, the layout of the app will be broken because of wrong layout measurements. This has been reported also by [https://github.com/facebook/react-native/issues/52823](https://github.com/facebook/react-native/issues/52823). The `<Switch>` component was using hardcoded values for its size. This change fixes the problem by: - Using codegen for interface only - Implementing a custom Sadow Node to ask the platform for the Switch measurements - Updating the JS layout to wrap the size around the native component. ## Changelog: [iOS][Fixed] - Fix Switch layout to work with iOS26 Reviewed By: sammy-SC Differential Revision: D80454350 fbshipit-source-id: 1d468910276f7fde4559d2ae87cf60c8494caceb
Summary:
Apple changed the sizes of the UISwitchComponent and now, if you build an iOs app using the component, the layout of the app will be broken because of wrong layout measurements.
This has been reported also by #52823.
The
<Switch>component was using hardcoded values for its size.This change fixes the problem by:
Changelog:
[iOS][Fixed] - Fix Switch layout to work with iOS26
Differential Revision: D80454350
Test Plan