ampproject / ampproject/amp-react-prototype
Lightbox, back button, and vetoable closing
- 主要言語
- JavaScript
- スター
- 36
- フォーク
- 6
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Context: https://github.com/ampproject/amp-react-prototype/pull/8/files#diff-c554b9bd31408e663cff269f69a1c567R51
Issues:
1. Some component libraries take a stand that “back button” support has to be arranged by the caller outside the lightbox (controlled). But that causes numerous issues, including inability to make closing vetoable.
2. Back button support is HARD. Standard doesn’t exist.
Supporting back button involves the following considerations:
- Rollback of history pop for vetoable close is especially hard and requires in-depth knowledge of the stack to re-push the popped states. Some routers (e.g. ReactRouter) allow history-stack blocking for this. But it’s rare and usually buggy.
- A naive `history.pushState` can break a React router and can never be fully featured.
See also #43 on the discussion about controlled-vs-uncontrolled lightbox API.
コントリビューションガイド
調査の方向性
PR #8 で参照されている lightbox の変更から始め、issue #43 の議論を読んでください。ブラウザー履歴、拒否可能な閉じる操作、React Router との相互作用が、提案されている controlled または uncontrolled API にどのような影響を与えるかを調査してください。戻るボタンの動作と拒否可能な閉じる操作について、方針が決定され文書化されていれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript, react
- 領域
- frontend
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100