ampproject / ampproject/amp-react-prototype

Components and AMP layout rules

オープン
#35 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
TBD
主要言語
JavaScript
スター
36
フォーク
6
PR マージ指標
30日以内にマージされた PR はありません

説明

Currently AMP elements are structured like this:

```
<- AmpElement (custom element wrapper)
<- defines layout/size
<- BaseElement (implementation)
<- adheres to the layout defined by AmpElement
```

Some of the most critical layout styles are:
- `display: block|etc` (but not "inline");
- proxies for width and height;
- `position: relative|absolute|etc` (but not "static");
- `overflow: hidden`.

React components follow AMP's `BaseElement` layer which means that they accept layout, but normally do not define their own static layout.

Besides layout, `AmpElement` is also responsible for showing placeholder and loading indicator. This is especially important since the placeholder and loading indicator are shown this way even before the `BaseElement` implementation script has been downloaded.

To still allow static layout in the React/AMP layer, we could provide `AmpLayout` component that could implement layout/placeholder/loading-indicator features via composition.

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

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

調査の方向性

Issue に記載されている既存の React/AMP コンポーネント構造と BaseElement/AmpElement の責務を確認します。AMP のレイアウト規則を維持しながら、AmpLayout のコンポジション層で静的レイアウト、プレースホルダー、ローディングインジケーターを提供できるか判断します。完了条件は、コンポーネント設計と実装範囲について合意することです。

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

評価

技術スタック
javascript
領域
frontend
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
30/100

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

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