angular / angular/components

[List] support "expand and collapse" from List spec

Ouverte
#14,994 3 commentaires 5 réactions 0 personnes assignées Voir sur GitHub
area: material/expansion area: material/list feature needs: discussion P5
Langage dominant
TypeScript
Étoiles
25k
Forks
6.8k
Merge moyen
1 j 8 h
PR mergées (30 j)
91

Description

#### Please describe the feature you would like to request.
The [List spec](https://material.io/design/components/lists.html#types) includes an "Expand and collapse" control. This functions more or less like an Expansion Panel but with List Item styling: dividers are used instead of a surrounding border / different background color, and the expand/collapse button is placed according to the rules for secondary action buttons.

#### What is the use-case or motivation for this proposal?
Support full capabilities of List as described in the spec

#### Is there anything else we should know?
I put together [a StackBlitz](https://stackblitz.com/edit/angular-material2-issue-list-expand) showing the current behavior when an expansion panel is placed in a list. The behavior is more or less as expected but the styling does not work as a list item, and just "fixing up" the current behavior is a lot to ask of consumers.

In my own project I built a component to implement this behavior, but it's not going to be as robust as it would be if supported directly here. Of course, styling an expansion panel to behave correctly when used as a list item is only one approach, and I don't mean to suggest a specific design. My custom component tracks its own expansion state and handles divider logic, etc, internally.

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez par utiliser le StackBlitz lié pour reproduire le comportement actuel, puis comparez les composants List et Expansion Panel existants avec la spécification List liée. Le travail est terminé lorsque le comportement d’extension/réduction, les séparateurs, le style des éléments de liste et le positionnement du bouton d’action secondaire correspondent au design demandé ; le payload ne nomme pas de fichiers ni de tests spécifiques.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
angular, typescript
Domaine
frontend
Type d'issue
Fonctionnalité
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
35/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.