[Android] Tab screens stay clipped at a transient startup height for the whole session (onNativeLayout guard/report size mismatch)
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 74/100
Línea de trabajo
Comienza en RCTTabView.kt siguiendo el listener de cambios de layout, su comprobación de tamaño y las dimensiones de layoutHolder notificadas a JS. Reproduce el escenario de altura transitoria descrito en el issue e inspecciona los trazados de Logcat o la reproducción del PR enlazado. Se considera terminado cuando se notifica un cambio posterior del tamaño de layoutHolder y las pantallas de las pestañas dejan de permanecer recortadas durante la sesión.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Description
On Android, tab screens can get stuck clipped to a fraction of the window for the entire session: content renders in the top ~half of the screen with dead space below, while the tab bar, absolutely-positioned siblings, and pushed stack screens render normally. A force-close sometimes clears it; the race is per cold start. We observed this persistently in production on a Pixel 6a / Android 16.
Root cause
In RCTTabView.kt, the layout-change listener guards re-reporting on the outer view's size but reports the inner layoutHolder's size to JS:
val newWidth = right - left // outer view (guard)
val newHeight = bottom - top
...
val dpHeight = Utils.convertPixelsToDp(context, layoutHolder.height) // inner view (report)
...
lastReportedSize = Size(newWidth, newHeight) // stores outer size
During startup the outer frame can settle at its final size while layoutHolder is still mid-layout at a transient height. If the listener fires in that window, the transient height is reported to JS and the outer size is latched into lastReportedSize. When layoutHolder finishes laying out, the outer size hasn't changed, so the guard never allows a re-report — the transient height is styled onto every tab screen for the rest of the session.
Regression from #283, which switched the reported size to layoutHolder without switching the guard.
Reproduction
Timing-dependent in the wild, but deterministic if you simulate the transient: force layoutHolder to a non-final height when the listener first fires, then restore it (snippet in the linked PR). On current main this latches the transient height with no further report; screens stay clipped. Logcat traces for both before and after the fix are in the PR.
Fix
Key the guard on layoutHolder's own dimensions — the same view whose size is reported — so any later correct layout is detected and re-reported (self-heals in a single frame; 5 ms measured in our repro). PR incoming.
🤖 Generated with Claude Code
- Lenguaje dominante
- TypeScript
- Estrellas
- 1.5k
- Forks
- 108
- Merge medio
- 22 h 36 min
- PR fusionados (30 d)
- 10
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de callstack/react-native-bottom-tabs
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
callstack/react-native-bottom-tabs#593 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
callstack/react-native-bottom-tabs#560 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
callstack/react-native-bottom-tabs#592 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 68/100
callstack/react-native-bottom-tabs#591 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 58/100
callstack/react-native-bottom-tabs#590 ·
Los mantenedores suelen responder en 1 día
Todos los issues de callstack/react-native-bottom-tabs
Issues similares
-
refactor
Dificultad 2/5 Medio día Aptitud para principiantes 84/100
Los mantenedores suelen responder en 5 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
OHDSI/Data2Evidence#3450 ·
Los mantenedores suelen responder en 2 días
-
e2e-failure ready-to-code
Dificultad 2/5 1-3 horas Aptitud para principiantes 90/100
redhat-developer/rhdh-plugin-export-overlays#4011 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
automation missing-model model-sync provider:ofox
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
anomalyco/models.dev#8421 ·
Los mantenedores suelen responder en 1 día
-
SlackAdapter and TelegramAdapter are not assignable to Adapter under exactOptionalPropertyTypesAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día