angular / angular/components

One syntax for all types of mat-icon

オープン
#12,484 コメント 3 件 リアクション 5 件 担当者 0 名 GitHub で見る
area: material/icon feature P3
主要言語
TypeScript
スター
25k
フォーク
6.8k
平均マージ
1日 8時間
マージ済み PR(30日)
91

説明

#### Bug, feature request, or proposal:

Feature request

#### What is the expected behavior?

Changing between ligature-based and class-based icon specification shouldn't be a huge chore.

#### What is the current behavior?

To use ligature-based icons, I write `home`. If I want to change from an icon font to a font set that uses CSS classes to pick a glyph, I'd have to change each component by hand to something like ``.

#### What is the use-case or motivation for changing an existing behavior?

I've created a large application that uses dozens of `mat-icon` components, and would like a simple method of changing how they're rendered. Ideally, I'd be able to call something like `setDefaultFontSetClass` once and have all icons (that don't explicitly set a `fontSet` attribute) change their source.

#### Which versions of Angular, Material, OS, TypeScript, browsers are affected?

N/A, mat-icon has always behaved like this

#### Is there anything else we should know?

It would be great if either the `fontIcon` attribute or the component content could be used to select a glyph regardless of how the font set is provided, but I'd be happy to be told to just always use one or the other, as long as switching between types of font set using the icon registry is straightforward.

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

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

調査の方向性

まず、issueで説明されているmat-iconコンポーネントの動作とアイコンレジストリAPIを読み、リガチャコンテンツ、fontIcon、fontSetがどのように選択されるかに注目します。大規模な既存アプリケーションが、各mat-iconの使用箇所を編集せずに、1つのデフォルト設定によってリガチャベースのアイコンソースとクラスベースのアイコンソースを切り替えられるようになれば完了です。

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

評価

技術スタック
angular, typescript
領域
frontend
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

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

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