material-components / material-components/material-components-android
[ChipGroup] Chip overflow indicator
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Java
- Sterne
- 17.4k
- Forks
- 3.2k
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
Currently the ChipGroup supports the singleLine attribute with a HorizontalScrollView so that the chips will always fit in a scrollable list. Unfortunately for some use cases this behavior is not really nice.
For example if you have a list of filters that can be selected on an extra screen and will be displayed in a single line ChipGroup somewhere on the main screen. The user wouldn't really profit from a scrollable single line that will only support viewing the filters. Instead the ChipGroup should display all items till it reaches its space limit and display an indicator (like "...") that lets the user know that there are more filters set.
I'm trying to get this by calculating the container width and the childrens width to decide which chips to remove but it would be nice to have an overflow behavior attribute as a feature that will automatically do this by itself.
It could look like:

Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit der Untersuchung des singleLine-Verhaltens von ChipGroup und seiner Verwendung von HorizontalScrollView. Definiere das overflow-Attribut und das Verhalten des Indikators so, dass Chips an der verfügbaren Breite stoppen und dabei zusätzliche Filter angezeigt werden; abgeschlossen ist die Aufgabe, wenn die angeforderte einzeilige Darstellung des Überlaufs funktioniert, ohne auf manuelle Breitenberechnungen angewiesen zu sein.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- android, java
- Bereich
- mobile
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 42/100