Margins on Page affects UI and breaks it on iOS
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- android, ios, typescript
- 领域
- mobile-dev
调研方向
从链接的 NativeScript TypeScript playground 开始,使用报告的 4.2.0 版本,在 iOS 和 Android 上重现 Page 和 ScrollView 的 margin 行为。跟踪 Page 的 margin、padding 和 size 如何参与测量,然后验证这些属性不再影响布局,并且用户在设置这些属性时会收到警告。
由索引模型根据 Issue 内容生成。
描述
Which platform(s) does your issue occur on?
iOS/Android/Both
Please provide the following version numbers that your issue occurs with:
- CLI: 4.2.0
- Cross-platform modules: 4.2.0
- Runtime(s): 4.2.0
Please tell us how to recreate the issue in as much detail as possible.
Since {N} 4.0 setting margins, padding and size to a Page results in undefined/different behavior on both platforms. The reason is that on iOS we let the system lay out pages and these properties are ignored. However, they still take part in measure and affect the nested UI.
Proposed Solution: I think the correct behavior is to ignore these properties on the Page component and warn the user they will not take effect.
Is there code involved? If so, please share the minimal amount of code needed to recreate the problem.
Can be reproduced with this playground:
https://play.nativescript.org/?template=play-tsc&id=l4geyI&v=3
The code that is important is:
Page {
margin: 100;
}
ScrollView {
margin: 10;
}
On Android it looks correct-ish. On iOS the Page margin is applied on the ScrollView and the ScrollView margin is lost.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
- 主要语言
- TypeScript
- 星标
- 25.7k
- 派生
- 1.7k
- 平均合并
- 1 天 5 小时
- 30 天内合并 PR
- 35
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
NativeScript/NativeScript 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 65/100
NativeScript/NativeScript#11068 ·
-
bug-pending-triage
难度 3/5 1-2 天 新手友好度 66/100
NativeScript/NativeScript#11436 ·
-
难度 4/5 3-5 天 新手友好度 45/100
NativeScript/NativeScript#11421 ·
-
bug-pending-triage
难度 3/5 1-2 天 新手友好度 52/100
NativeScript/NativeScript#11415 ·
-
bug-pending-triage
难度 3/5 1-2 天 新手友好度 48/100
NativeScript/NativeScript#11374 ·
查看 NativeScript/NativeScript 的全部 Issue
相似的 Issue
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
难度 2/5 1-3 小时 新手友好度 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
难度 1/5 1 小时以内 新手友好度 76/100
-
code-quality refactoring
难度 2/5 1-3 小时 新手友好度 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
难度 2/5 1-3 小时 新手友好度 74/100
langchain-ai/deepagents#6450 ·
-
难度 1/5 1 小时以内 新手友好度 88/100
vercel/react-tweet#225 ·