diff --git a/static/js/emailLibrary.js b/static/js/emailLibrary.js index a976516e1..8603f2b09 100644 --- a/static/js/emailLibrary.js +++ b/static/js/emailLibrary.js @@ -1868,16 +1868,18 @@ function _renderSearchPills() { const pills = state._libSearchPills || []; const esc = s => String(s || '').replace(/&/g, '&').replace(/ { - let label = ''; - let leadingIcon = ''; - if (p.type === 'contact') label = p.name || p.email || '?'; - else if (p.type === 'filter') { - label = p.label || p.value; - leadingIcon = `${_libFilterIconFor(p.value)}`; + // Filter pills render as icon-only (the icon is the affordance); + // contact + text pills carry their label as text. + if (p.type === 'filter') { + const titleAttr = `${(p.label || p.value).replace(/"/g, '"')}`; + return ` + ${_libFilterIconFor(p.value)} + + `; } - else label = p.text || ''; + const label = p.type === 'contact' ? (p.name || p.email || '?') : (p.text || ''); return ` - ${leadingIcon}${esc(label)} + ${esc(label)} `; }).join('');