callstack / callstack/react-native-paper

Why `paddingHorizontal: Math.max(left, right)` in AppbarHeader ?

未关闭
#4,535 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
Appbar question
主要语言
TypeScript
星标
14.5k
派生
2.2k
平均合并
5 天 23 小时
30 天内合并 PR
12

描述

AppBar cannot align with content when screen orientation locked `LANDSCAPE_LEFT`

CleanShot 2024-10-25 at 23 11 27@2x

When orientation locked `LANDSCAPE_RIGHT`, align is ok.

CleanShot 2024-10-25 at 23 11 58@2x

---

Why Math.max ? It seems to be intentional, or may be a bug ?

https://github.com/callstack/react-native-paper/blob/9162a1fdf4e97c0669de8a8fa2057d8cfbe2e728/src/components/Appbar/AppbarHeader.tsx#L140C11-L140C52

贡献指南

打开贡献指南

调研方向

Start at src/components/Appbar/AppbarHeader.tsx around the linked paddingHorizontal: Math.max(left, right) expression. Reproduce the AppBar with orientation locked to LANDSCAPE_LEFT and LANDSCAPE_RIGHT, then determine whether the padding causes the reported alignment difference. Done means the intended behavior is confirmed or the AppBar aligns with its content in both orientations.

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

评估

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

把新 issue 发到你的邮箱

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