-
Notifications
You must be signed in to change notification settings - Fork 24.2k
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
revise updateState logic for ReactModalHostView (v2) #46359
Conversation
This pull request was exported from Phabricator. Differential Revision: D62286026 |
This pull request was exported from Phabricator. Differential Revision: D62286026 |
386661e
to
ff2b5b0
Compare
Summary: Pull Request resolved: facebook#46359 Remove unneeded code around size calculation and old arch support - updateState was getting called unnecessarily in multiple places --> only call from onSizeChanged() - this is a reliable source for getting the content size area of the dialog used for Modal - remove code checking duplicated update - Old architecture cleanup - Remove Java implementation of ShadowNode - we already have logic to set the node size via UIManagerModule::updateNodeSize(). This code is now group together in updateState() for both new and old architecture This fixes issues with resulting from wrong size calculation: - having gaps at bottom when we set `statusBarTranslucent` to `true` - Modal cut off at bottom on Android 15 (drawn under bottom nav bar) Changelog: [Android][Fixed] - Modal statusBarTranslucent bug, Modal at bottom being cut off in Android 15 (without forced edge-to-edge) Differential Revision: D62286026
Summary: Pull Request resolved: facebook#46326 - renaming variabled to make intent more clear - `dialog` -> `dialogWindow` to distinguish with `activity.window` - `hostView` -> `dialogRootViewGroup` as name was confusing. - `ReactModalHostView` creates and manages `DialogRootViewGroup` but it used as contentView for the Dialog. - bug fixes Changelog: [Internal] Differential Revision: D62177564 Reviewed By: mdvacca
This pull request was exported from Phabricator. Differential Revision: D62286026 |
…6359) Summary: Pull Request resolved: facebook#46359 Remove unneeded code around size calculation and old arch support - updateState was getting called unnecessarily in multiple places --> only call from onSizeChanged() - this is a reliable source for getting the content size area of the dialog used for Modal - remove code checking duplicated update - Old architecture cleanup - Remove Java implementation of ShadowNode - we already have logic to set the node size via UIManagerModule::updateNodeSize(). This code is now group together in updateState() for both new and old architecture This fixes issues with resulting from wrong size calculation: - having gaps at bottom when we set `statusBarTranslucent` to `true` - Modal cut off at bottom on Android 15 (drawn under bottom nav bar) Changelog: [Android][Fixed] - Modal statusBarTranslucent bug, Modal at bottom being cut off in Android 15 (without forced edge-to-edge) [Android][Deprecation] - Deprecating ModalHostShadowNode Reviewed By: mdvacca Differential Revision: D62286026
ff2b5b0
to
59caa3d
Compare
This pull request was exported from Phabricator. Differential Revision: D62286026 |
59caa3d
to
5cf2874
Compare
…6359) Summary: Pull Request resolved: facebook#46359 Remove unneeded code around size calculation and old arch support - updateState was getting called unnecessarily in multiple places --> only call from onSizeChanged() - this is a reliable source for getting the content size area of the dialog used for Modal - remove code checking duplicated update - Old architecture cleanup - Remove Java implementation of ShadowNode - we already have logic to set the node size via UIManagerModule::updateNodeSize(). This code is now group together in updateState() for both new and old architecture This fixes issues with resulting from wrong size calculation: - having gaps at bottom when we set `statusBarTranslucent` to `true` - Modal cut off at bottom on Android 15 (drawn under bottom nav bar) Changelog: [Android][Fixed] - Modal statusBarTranslucent bug, Modal at bottom being cut off in Android 15 (without forced edge-to-edge) [Android][Deprecation] - Deprecating ModalHostShadowNode Reviewed By: mdvacca Differential Revision: D62286026
This pull request was exported from Phabricator. Differential Revision: D62286026 |
…6359) Summary: Pull Request resolved: facebook#46359 Remove unneeded code around size calculation and old arch support - updateState was getting called unnecessarily in multiple places --> only call from onSizeChanged() - this is a reliable source for getting the content size area of the dialog used for Modal - remove code checking duplicated update - Old architecture cleanup - Remove Java implementation of ShadowNode - we already have logic to set the node size via UIManagerModule::updateNodeSize(). This code is now group together in updateState() for both new and old architecture This fixes issues with resulting from wrong size calculation: - having gaps at bottom when we set `statusBarTranslucent` to `true` - Modal cut off at bottom on Android 15 (drawn under bottom nav bar) Changelog: [Android][Fixed] - Modal statusBarTranslucent bug, Modal at bottom being cut off in Android 15 (without forced edge-to-edge) [Android][Deprecation] - Deprecating ModalHostShadowNode and ModalHostHelper classes Reviewed By: mdvacca Differential Revision: D62286026
5cf2874
to
b8fc691
Compare
…6359) Summary: Pull Request resolved: facebook#46359 Remove unneeded code around size calculation and old arch support - updateState was getting called unnecessarily in multiple places --> only call from onSizeChanged() - this is a reliable source for getting the content size area of the dialog used for Modal - remove code checking duplicated update - Old architecture cleanup - Remove Java implementation of ShadowNode - we already have logic to set the node size via UIManagerModule::updateNodeSize(). This code is now group together in updateState() for both new and old architecture This fixes issues with resulting from wrong size calculation: - having gaps at bottom when we set `statusBarTranslucent` to `true` - Modal cut off at bottom on Android 15 (drawn under bottom nav bar) Changelog: [Android][Fixed] - Modal statusBarTranslucent bug, Modal at bottom being cut off in Android 15 (without forced edge-to-edge) [Android][Deprecation] - Deprecating ModalHostShadowNode and ModalHostHelper classes Reviewed By: mdvacca Differential Revision: D62286026
This pull request was exported from Phabricator. Differential Revision: D62286026 |
b8fc691
to
4eaa215
Compare
This pull request has been merged in 77b3a8b. |
This pull request was successfully merged by @alanleedev in 77b3a8b When will my fix make it into a release? | How to file a pick request? |
Summary:
Remove unneeded code around size calculation and old arch support
This fixes issues with resulting from wrong size calculation:
statusBarTranslucent
totrue
Changelog:
[Android][Fixed] - Modal statusBarTranslucent bug, Modal at bottom being cut off in Android 15 (without forced edge-to-edge)
[Android][Deprecation] - Deprecating ModalHostShadowNode and ModalHostHelper classes
Differential Revision: D62286026