callstack / callstack/react-native-bottom-tabs

Fullscreen modal buggy (flickering) when using CustomTabBar

未关闭
#371 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

bug
主要语言
TypeScript
星标
1.5k
派生
108
平均合并
11 小时 44 分钟
30 天内合并 PR
8

描述

Bug summary

When using a custom tab bar as by your example, full-screen modals behave inconsistently when no animation is used (animation: "none"). Upon navigation, the new screen’s height is initially calculated as SCREEN_HEIGHT - TABBAR_HEIGHT, and shortly after, it adjusts to include the height of the tabbar, causing noticeable flickering.
In other cases, the new screen ends up with a black area at the bottom, matching the height of the tab bar.

Navigating to the modal shortly still shows the tabbar sometimes (for a frame):

Then shortly after renders the full screen as supposed to:

It also happens that it just shows a black area at the bottom part all the time:

Library version

0.9.2

Environment info
⚠️ react-native depends on @react-native-community/cli for cli commands. To fix update your package.json to include:


  "devDependencies": {
    "@react-native-community/cli": "latest",
  }
Steps to reproduce

Navigate to a screen that has the following options:

options={{
          title: "Modal",
          presentation: "fullScreenModal",
          animation: "none",
}}
Reproducible sample code
https://github.com/dylancom/native-tabs-modal-bug

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先运行 https://github.com/dylancom/native-tabs-modal-bug 中可复现的示例,并在将 presentation 设置为 fullScreenModal、将 animation 设置为 none 的情况下进行导航。跟踪产生初始标签栏高度的 CustomTabBar 和模态布局过渡,然后验证导航是否始终一致地渲染全屏模态,而不会出现闪烁或底部黑色区域。

由索引模型根据 Issue 内容生成。

评估

技术栈
react-native, typescript
领域
mobile
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。