[Dialog] Add a directive to simplify dialog interaction
まだ誰も着手していません。
- 主要言語
- TypeScript
- スター
- 25k
- フォーク
- 6.8k
- 平均マージ
- 1日 8時間
- マージ済み PR(30日)
- 91
説明
Please describe the feature you would like to request.
A directive that accepts a TemplateRef and a dialog configuration object
When the button this directive is placed on is clicked a dialog containing that Template is created
What is the use-case or motivation for this proposal?
Allows users to interact with dialogs like other components - through their markup bindings. No need to use poorly understood entry components. Dialog templates are part of the component template; input and output bindings are fully accessible (as are pipes.)
The existing programmatic only approach feels like there is a lot of ceremony over creating dialogs - many of which would otherwise be simple components.
Is there anything else we should know?
I've stubbed out what the implementation might look like here. I've used a version of this in production for over a year now. I've also included 2 examples of usage.
https://github.com/adammedford/material2/blob/open-dialog-directive/src/lib/dialog/dialog-open-directive.ts
I will submit a PR if there is interest in this; this version is to just convey what I'm talking about. I didn't want to go through the effort of a full implementation and docs if nobody cares to use it.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず src/lib/dialog/dialog-open-directive.ts の実装案を読み、リンクされている 2 つの使用例を確認します。そのアプローチを既存の dialog API と比較し、必要な directive、設定、template、binding、ドキュメントの範囲を判断します。実装方針への合意とドキュメント化された例が揃えば完了としますが、この issue ではテストも確定した設計も特定されていません。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- angular, typescript
- 領域
- frontend
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 25/100