Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

fix(chips): placeholder is truncated even though there is room #11991

Merged
merged 1 commit into from
Jul 31, 2020

Conversation

Splaktar
Copy link
Contributor

PR Checklist

Please check that your PR fulfills the following requirements:

  • The commit message follows our guidelines
  • Tests for the changes have been added or this is not a bug fix / enhancement
  • Docs have been added, updated, or were not required

PR Type

What kind of change does this PR introduce?

[x] Bugfix
[ ] Enhancement
[ ] Documentation content changes
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Infrastructure changes
[ ] Other... Please describe:

What is the current behavior?

Long placeholders get truncated, even when there is room for them to be displayed:
Screen Shot 2020-07-31 at 16 18 08

Issue Number:
Fixes #10630

What is the new behavior?

  • add a new md-input-class to md-chips
    to md-chips and md-contact-chips
    • allows custom styling like adding a min-width for supporting
      very long placeholders
    • this is the same API as <md-autocomplete> already has
    • add demo of long placeholder and md-input-class

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

After

Screen Shot 2020-07-31 at 16 18 21

Custom min-width for input and wrapping with long placeholder

Screen Shot 2020-07-31 at 16 19 15
Screen Shot 2020-07-31 at 16 18 50

- add a new `md-input-class` to `<md-chips>`
  to `md-chips` and `md-contact-chips`
  - allows custom styling like adding a `min-width` for supporting
    very long placeholders
  - this is the same API as `<md-autocomplete>` already has
  - add demo of long `placeholder` and `md-input-class`

Fixes #10630
@Splaktar Splaktar added this to the 1.2.0 milestone Jul 31, 2020
@Splaktar Splaktar self-assigned this Jul 31, 2020
@googlebot googlebot added the cla: yes PR author has signed Google's CLA: https://opensource.google.com/docs/cla/ label Jul 31, 2020
@Splaktar Splaktar added severity: regression This issue is related to a regression type: bug g3: sync P2: required Issues that must be fixed. labels Jul 31, 2020
@Splaktar Splaktar requested a review from jelbourn July 31, 2020 20:35
Copy link
Contributor

@mmalerba mmalerba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Splaktar Splaktar added the pr: lgtm This PR has been approved by the reviewer label Jul 31, 2020
@Splaktar Splaktar merged commit 6699ae6 into master Jul 31, 2020
@Splaktar Splaktar deleted the chips-fix-placeholder branch July 31, 2020 21:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes PR author has signed Google's CLA: https://opensource.google.com/docs/cla/ P2: required Issues that must be fixed. pr: lgtm This PR has been approved by the reviewer severity: regression This issue is related to a regression type: bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

chips: placeholder is truncated even though there is room for it in the component
3 participants