Page MenuHomePhabricator

SimpleSearch dropdown not wide enough for long titles
Closed, ResolvedPublic

Description

English Wikipedia illustrating the bug in Firefox 3.6.18.

The SimpleSearch dropdown of suggested titles has the nice feature of automatically resizing to fit titles, but it doesn't resize itself enough, cutting off the endmost character. Here is an example.

Visit the English Wikipedia and type in the SimpleSearch box:

federal info

In the dropdown of suggestions, you will see this title:

Federal Information Security Management Act of 2002

However, the last character is cut off, displaying only:

Federal Information Security Management Act of 200

Confirmed in Firefox 3.6.18, Internet Explorer 8, and Chrome 13.0.782.112, all on Windows. I will attach a screenshot.


Version: 1.21.x
Severity: normal

Attached:

Details

Reference
bz30309

Event Timeline

bzimport raised the priority of this task from to Normal.Nov 21 2014, 11:47 PM
bzimport set Reference to bz30309.

The fact that it stops resizing at some point is a feature. However, it's supposed to put dots in the middle so you can see the beginning and end of the title, and that's not happening in your screenshot.

Reproduced this by typing "llanfairpwll" into the search box on English Wikipedia.

Thank you very much.

If you fix this, it would be fantastic if you could also allow the sysadmin to configure the maximum allowable width, whether through a $wg... configuration variable or a hook. Some wikis (like ours) are willing to accept a very wide dropdown as we have many long titles.

SimpleSearch

Whoops, accidentally submitted the form too early.

Still happens, verified on en.wikipedia using Opera 12.10. Looks like the autoellipsis feature assumes there is slightly more space than there actually is.

I think this is because the autoellipsis is calculated before the bolding (to the part you actually typed) is applied.

Change 111180 had a related patch set uploaded by Bartosz Dziewoński:
jquery.suggestions, mediawiki.searchSuggest: Don't use jquery.autoEllipsis

https://gerrit.wikimedia.org/r/111180

Change 111180 merged by jenkins-bot:
jquery.suggestions, mediawiki.searchSuggest: Don't use jquery.autoEllipsis

https://gerrit.wikimedia.org/r/111180

This should no longer happen after the patch above is deployed.