Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

chips: placeholder is truncated even though there is room for it in the component #10630

Closed
AI3Zakir opened this issue Apr 28, 2017 · 8 comments · Fixed by #11991
Closed

chips: placeholder is truncated even though there is room for it in the component #10630

AI3Zakir opened this issue Apr 28, 2017 · 8 comments · Fixed by #11991
Assignees
Labels
has: Pull Request A PR has been created to address this issue P2: required Issues that must be fixed. resolution: fixed severity: regression This issue is related to a regression type: bug ux: polish
Milestone

Comments

@AI3Zakir
Copy link

Actual Behavior:

  • What is the issue?*
    Long placeholder on md-autocomplete is cut
  • What is the expected behavior?
    Full placeholder should be seen

CodePen (or steps to reproduce the issue): *

AngularJS Versions: *

  • AngularJS Version: v1.5.5
  • AngularJS Material Version:v1.1.1

Additional Information:

  • Browser Type: *Chrome
  • Browser Version:* 58.0.3029.81 (64-bit)
  • OS:* Ubuntu 16.04
  • Stack Traces:
@Splaktar
Copy link
Member

Splaktar commented Mar 1, 2018

This is related to #10344, but not a duplicate.

Here's a CodePen that demonstrates the issue when using chips without autocomplete.

@Splaktar Splaktar changed the title Long placeholder caption on md-autocomplete with md-chips is cut. chips: placeholder is truncated even though there is room for it in the component Mar 1, 2018
@Splaktar Splaktar self-assigned this Mar 1, 2018
@Splaktar Splaktar added this to the 1.1.9 milestone Mar 1, 2018
@Splaktar Splaktar added type: bug severity: regression This issue is related to a regression needs: investigation The cause of this issue is not well understood and needs to be investigated by the team or community severity: inconvenient ux: polish P3: important Important issues that really should be fixed when possible. labels Mar 1, 2018
@janacm
Copy link

janacm commented Apr 12, 2018

Hi has there been any progress on this issue?

@Splaktar Splaktar modified the milestones: 1.1.9, 1.2.0, 1.1.10 Apr 12, 2018
@Splaktar
Copy link
Member

There has been progress, but no solution is available yet. I submitted PR #11098 which is needed before this issue can be solved, but it ran into some presubmit failures (breaking changes). I need to re-visit that PR, fix the issues, and re-submit. I don't have an ETA, but both chips and autocomplete are due for some fairly significant bug and a11y fixes in 1.1.10+.

@oliversalzburg
Copy link
Contributor

I was pretty confident in my approach in #11276 and we're testing it now internally. If you want me to get involved, let me know. Otherwise I'll patiently wait for the official fix :)

@Splaktar
Copy link
Member

@oliversalzburg thank you very much. I will review your suggestion and see if it can be used in the existing PR. I'll let you know how it goes.

@Splaktar Splaktar modified the milestones: 1.1.10, 1.1.11 Jun 19, 2018
@Splaktar Splaktar modified the milestones: 1.1.11, 1.1.12 Sep 10, 2018
@Splaktar Splaktar modified the milestones: 1.1.12, 1.1.13 Jan 3, 2019
@Splaktar Splaktar modified the milestones: 1.1.13, 1.1.14 Feb 10, 2019
@Splaktar Splaktar modified the milestones: 1.1.14, g3: sync Feb 15, 2019
@jelbourn jelbourn added P4: minor Minor issues. May not be fixed without community contributions. and removed P3: important Important issues that really should be fixed when possible. labels Feb 22, 2019
@Splaktar Splaktar modified the milestones: g3: sync, 1.1.23 Apr 30, 2020
@marosoft
Copy link
Contributor

@Splaktar the fix suggested by @oliversalzburg works fine. There is a problem when the window is too small to fit the chips and the placeholder text. The placeholder text is not moved into a new line unless the window is small enough to show a substring containing only "Very Long Placeholder For".

image

image

CodePen

@Splaktar Splaktar added P2: required Issues that must be fixed. and removed P4: minor Minor issues. May not be fixed without community contributions. severity: inconvenient labels May 26, 2020
@Splaktar
Copy link
Member

I recall that there were some keyboard/focus/a11y issues that needed to be solved beyond just those suggested changes. I need to dig into this again for sure. I've bumped the priority back up.

@Splaktar Splaktar modified the milestones: 1.1.23, 1.2.0 Jun 19, 2020
@Splaktar
Copy link
Member

Yeah, I think that fix mostly works now that the other fixes have landed. But the last issue is the one you mention here, if you add a long chip, or multiple chips, there are cases where the input gets shrunk too small to show the placeholder.

It seems like we need a min-width, but it also seems like it would vary depending upon the placeholder used.

I think that our best approach for solving this is to add an md-input-class like <md-autocomplete> has. Then the developer can add a min-width that works for their app and placeholder.

@Splaktar Splaktar added has: Pull Request A PR has been created to address this issue and removed needs: investigation The cause of this issue is not well understood and needs to be investigated by the team or community labels Jul 31, 2020
Splaktar added a commit that referenced this issue Jul 31, 2020
- 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 added a commit that referenced this issue Jul 31, 2020
- 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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
has: Pull Request A PR has been created to address this issue P2: required Issues that must be fixed. resolution: fixed severity: regression This issue is related to a regression type: bug ux: polish
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants