facebook / react-native

A framework for building native applications using React
https://reactnative.dev
MIT License
118.2k stars 24.21k forks source link

【Android】There is a delay in calculating the height of Modal content #46029

Open peaktangf opened 1 month ago

peaktangf commented 1 month ago

Description

When the new architecture is opened and the bridge mode is closed, the Modal content height calculation has a problem, it is 0 at the beginning, and then it is normal

https://github.com/user-attachments/assets/9aa99389-a774-458a-8491-d1456ffbbebe

Steps to reproduce

1、install the application with yarn android 2、load(true, true, false) 3、Modal show

React Native Version

0.74.1

Affected Platforms

Runtime - Android

Output of npx react-native info

System:
  OS: macOS 13.4
  CPU: (10) arm64 Apple M2 Pro
  Memory: 90.53 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 18.0.0
    path: /usr/local/bin/node
  Yarn:
    version: 1.22.19
    path: /usr/local/bin/yarn
  npm:
    version: 8.6.0
    path: /usr/local/bin/npm
  Watchman:
    version: 2024.01.22.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.12.1
    path: /Users/01400926/.rbenv/shims/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 22.4
      - iOS 16.4
      - macOS 13.3
      - tvOS 16.4
      - watchOS 9.4
  Android SDK: Not Found
IDEs:
  Android Studio: 2022.3 AI-223.8836.35.2231.10671973
  Xcode:
    version: 14.3/14E222b
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 20.0.2
    path: /usr/bin/javac
  Ruby:
    version: 3.2.2
    path: /Users/01400926/.rbenv/shims/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.74.1
    wanted: 0.74.1
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: true
  newArchEnabled: true

Stacktrace or Logs

not

Reproducer

not

Screenshots and Videos

No response

react-native-bot commented 1 month ago
:warning: Newer Version of React Native is Available!
:information_source: You are on a supported minor version, but it looks like there's a newer patch available - 0.74.5. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.
react-native-bot commented 1 month ago
:warning: Missing Reproducible Example
:information_source: We could not detect a reproducible example in your issue report. Please provide either:
  • If your bug is UI related: a Snack
  • If your bug is build/update related: use our Reproducer Template. A reproducer needs to be in a GitHub repository under your username.
react-native-bot commented 1 month ago
:warning: Newer Version of React Native is Available!
:information_source: You are on a supported minor version, but it looks like there's a newer patch available - undefined. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.
react-native-bot commented 1 month ago
:warning: Missing Reproducible Example
:information_source: We could not detect a reproducible example in your issue report. Please provide either:
shubhamguptadream11 commented 1 month ago

@peaktangf It will be great if you provide a repro using this template. Also is this android specific?

peaktangf commented 1 month ago

@peaktangf如果您能提供使用此模板的复制版本就太好了。这也是 Android 独有的吗?

yes

cipolleschi commented 3 weeks ago

the configuration load(true, true, false) means that you are running with the bridge, not in bridgless mode. That configuration is not supported anymore.

Please try with load(true, true true) - or just load() given that when the New Architecture is turned on, true, true, true is the default - and report back if the problem persists.

react-native-bot commented 2 days ago

This issue is waiting for author's feedback since 24 days. Please provide the requested feedback or this will be closed in 7 days.