People Picker: long people card overflows in narrow people picker
Bug Report
- Package version(s): latest
- Browser and OS versions: any
Describe the issue:
In some scenarios, people resolved from people picker will have a long name. Sometimes the people picker can be narrow (small width). Then the people card will overflow the people picker container which looks bad.
Actual behavior:
The people card overflows outside the people picker container.
Expected behavior:
The people card is totally inside people picker, the text should somehow truncated.
If applicable, please provide a codepen repro:
http://codepen.io/ipip2005/pen/WRmEbb
Repro steps:
- Type anything in the people picker.
- Select the only people "Annie Lindqvist Dough Linda Steel"
- See the people card is wider than people picker which looks bad.
.ms-PeoplePicker-Persona is min width of 180px, and with the button padding of 20px on each side, the min width of the people picker suggestion will be 220px.
The question is, what is the minimum width we can expect the people picker to be? Then update documentation to specify that. Is 220px too wide? If so, then what number should we go with?

@ipip2005 It looks like the codepen does not have the latest version of fabric-react. I'll see if I can't get it updated.
Hi, @joschect The codepen is always using the latest version of fabric-react from
http://spoppe-a.akamaihd.net/files/fabric/office-ui-fabric-react/latest/office-ui-fabric-react.min.js
I slightly change the code to make it easier to understand the issue: http://codepen.io/lijunle/pen/OpLzPm
Repro steps are the same as mention in https://github.com/OfficeDev/office-ui-fabric-react/issues/1006#issue-207782521
- Type anything in the people picker.
- Select the only people "Annie Lindqvist Dough Linda Steel"
- See the people card is wider than people picker which looks bad.
I think this issue is duplicated with https://github.com/OfficeDev/office-ui-fabric-react/issues/1024
.ms-PeoplePicker-Persona is min width of 180px, and with the button padding of 20px on each side, the min width of the people picker suggestion will be 220px.
@micahgodbolt I could prefer no limit about the width here. It is in BasePicker file. It makes more reasonable that, each subclass has its own width limitation.
@lijunle We can remove the limit on the ms-peoplepicker-persona.
The codepen is not always using the latest version. I built the latest locally and created a codepen with the office-ui-fabric-react.min.js content and then linked that to a fork of your codpen. As you can see it behaves as expected.
http://codepen.io/slimemold/pen/WpQMOd
Solution has been merged so updating the status.