feat(button): add `expanded` state to extended FAB for smooth collapse/expand transitions
- 主要言語
- TypeScript
- スター
- 25k
- フォーク
- 6.8k
- 平均マージ
- 1日 8時間
- マージ済み PR(30日)
- 91
説明
### Feature Description
According to the [Material Design 3 specs](https://m3.material.io/components/extended-fab/guidelines), an extended FAB should be able to smoothly transition between an extended state (capsule shape with text) and a collapsed state (circular shape with icon only) depending on scroll interactions or limited screen space.
I propose adding a new `[expanded]="boolean"` (default `true`) property specifically for the Extended FAB.
* The `extended` property defines the `mat-fab` as an Extended FAB rather than a standard FAB.
* The `expanded` property defines its visual **state** (expanded capsule vs. collapsed circle).
This would apply the necessary CSS transitions when the text label visually disappears in the collapsed state.
### Use Case
I want to implement an expandable/collapsible [Navigation Rail](https://m3.material.io/components/navigation-rail/overview).
When a user interacts with a Navigation Rail to expand/collapse it, the top FAB within that rail should smoothly animate between a collapsed regular FAB and an extended FAB with a text label. Currently, because `mat-fab` lacks an animatable `expanded` state, developers cannot easily recreate this fluid interaction without writing complex custom CSS overrides to hack the fab-label.
Having a native `[expanded]` property would allow developers to seamlessly bind the FAB's state to the Navigation Rail's drawer state, providing a polished and spec-compliant Material 3 experience out of the box.
コントリビューションガイド
調査の方向性
Angular Material の拡張 FAB (`mat-fab`) の実装と、既存の `extended` プロパティから始めます。現在の extended と collapsed のレンダリング動作を確認し、Material Design 3 の issue に記載された動作に従って、テキストを含むカプセルと円形のアイコンのみの FAB の間を遷移する、デフォルトで true の `expanded` 状態を完了条件として定義します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- angular, typescript
- 領域
- frontend
- issue の種類
- 機能追加
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 68/100