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

[MaterialTextField] Less coupled boxBackgroundMode and error-state background color

Open
#2,623 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

1. Currently `boxBackgroundMode` overwrites the control of everything. Say, if it is `filled` mode, there will be fixed top padding which is not able to be completely removed by playing with the XML file. In `Outlined` mode, all non-default color states set in `boxBackgroundColor` will not be functioning at all without any warning, since all stated colors
are only applied `if (boxBackgroundMode == BOX_BACKGROUND_FILLED)`.
Would it be better if this attribute could be less coupled, making it able to be customized?

2. Would it be better if the `boxBackgroudColor`, like the stroke color or icon color, can have an error state?

Thanks.

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 with MaterialTextField and trace how boxBackgroundMode controls padding and boxBackgroundColor states. Clarify whether the goal is independent customization, an error-state color, or both, then define the expected behavior for filled and outlined modes before implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
design, mobile
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.