material-components / material-components/material-components-android

[ChipGroup] Chip overflow indicator

Open
#696 4 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request Widget: Chip
Dominant language
Java
Stars
17.4k
Forks
3.2k
PR merge metrics
No merged PRs in 30d

Description

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:
![](https://i.ibb.co/CMDWsDJ/Screenshot-2019-10-22-at-11.jpg)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting ChipGroup's singleLine behavior and its use of HorizontalScrollView. Define the overflow attribute and indicator behavior so chips stop at the available width while indicating additional filters; done means the requested single-line overflow presentation works without relying on manual width calculations.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.