Refactor SVG inlining from md-icon into cdk-svg
- 主要言語
- TypeScript
- スター
- 25k
- フォーク
- 6.8k
- 平均マージ
- 1日 8時間
- マージ済み PR(30日)
- 91
説明
The SVG inlining features of md-icon are more generally useful than for just displaying icons. We should refactor the code such that:
* The SVG portions of `MdIconRegistry` are moved to `IconRegistry` in the cdk, with `MdIconRegistry` then extending `IconRegistry`
* The SVG inlining code in `md-icon` is moved into `cdk-svg` with `md-icon` then consuming `cdk-svg`.
This will enable us to add additional APIs to `cdk-svg` around customizing `viewBox` and `preserveAspectRatio` (see https://css-tricks.com/scale-svg)
Notes:
* Part of this should be moving SVG parsing (i.e. `string` -> `SVGElement`) into its own utility that can be mocked. This will be useful when ensuring that parsing only happens when expected (since it can have performance impacts if overdone).
コントリビューションガイド
調査の方向性
MdIconRegistry の現在の SVG 部分と、md-icon が使用する SVG インライン化コードを特定し、それらを cdk IconRegistry および cdk-svg のエントリーポイントと比較します。SVG レジストリの動作とインライン化が CDK によって提供され、MdIconRegistry が IconRegistry を拡張し、md-icon が cdk-svg を使用し、SVG の解析がモック可能なユーティリティに分離された時点で、リファクタリングは完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- angular, typescript
- 領域
- frontend
- issue の種類
- リファクタリング
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100