Margins on Page affects UI and breaks it on iOS

オープン
#6,318 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
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、サイズが測定にどのように関与するかを追跡し、その後、これらのプロパティがレイアウトに影響しなくなっていること、および設定された場合にユーザーが警告を受け取ることを確認します。

索引モデルが issue の本文から書いたものです。

説明

os: ios
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時間
マージ済み PR(30日)
35

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

NativeScript/NativeScript のほかの issue

NativeScript/NativeScript の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。