Normally, if the search suggestion text is longer than the width of the drop-down area, it will wrap to the next line. However, if there isn't any whitespace in the suggestion (such as when users want suggestions for installation directories or application paths), the suggest text will horizontally overflow the completion pop-up. At the same time, the text will prematurely wrap before the first character of the suggestion, effectively leaving an empty line between suggestion and doubling the height of the suggestion window. The fix would either be to insert wrapping tokens or elide the beginning of the suggestion. Both solutions are described below with example results. Assumptions: the maximum characters a suggestion can contain before wrapping/overflowing as describe in this issue is, say, 30. Suggestion: "name=supercalifragilisticexpialidocious" --Wrapping Tokens-- name=supercalifragilisticexpi\ alidocious --Elided String-- name=...gilisticexpialidocious
Created attachment 430479 [details] screenshot of suggestion overflow/wrapping
An alternate eliding solution could be to elide the center of the string: --Elided String-- name=supercalifr...ialidocious
commit fdef972cd1fdb826536b80e6e2e44f5c07ea2351 Author: Joseph Marques <joseph> Date: Thu Jul 15 23:39:41 2010 -0400 BZ-612739: ensure that search suggestions never overflow drop-down boundaries ----- commit c8d7ffa904e66d92b89ae43df500200e7dbe5440 Author: Joseph Marques <joseph> Date: Thu Jul 15 23:40:26 2010 -0400 BZ-612739: use more sophisticated highlighting mechanism that respects line breaks ----- solution i ended up going with treats more than just white-space as characters upon which lines may break. in this case i also treated back-slash ('\'), slash ('\'), and dash ('-') as additional "line-breakers". this was sufficient to fix the trait[Application.path] as the slash and backslash nicely tokenize longer path identifiers. if we want to treat more characters as line-breakers, it could be added easily as the breaking algorithm is generic and takes an array of break-able characters as its input.
Created attachment 432282 [details] shows basic wrapping solution
Created attachment 432283 [details] shows basic wrapping solution w/first-line highlight matching
Created attachment 432284 [details] shows basic wrapping solution w/other-than-first-line highlight matching
Created attachment 432285 [details] shows basic wrapping solution w/highlight matching across lines
also note from the screen shots that suggestions now properly allow highlight-matching on lines other than the first. prior to this fix, highlight-matching only worked if the string being matched was on the first line of the suggestion; if it were on any other line, the highlighted characters were skewed because of the additional <br/> characters that had to be added to perform the wrapping.
QA Verified: * Suggestion wraps across multiple lines * If suggestion is hovered, the gray "selector" background wraps appropriately * Highlighting works across multiple lines * Highlighting works in all multi-line results in the dropdown Dev can reopen if it is thought that not all cases herein have been appropriately covered.
Mass-closure of verified bugs against JON.