Closed Bug 440583 Opened 17 years ago Closed 16 years ago

We should wrap long search strings when we return results

Categories

(support.mozilla.org :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: stephend, Assigned: ecooper)

References

()

Details

(Keywords: ue, Whiteboard: sumo_only)

Attachments

(2 files)

URL: https://sumo-reskin.authstage.mozilla.com/tiki-searchresults.php?locale=en-US&q=ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789345&sa= I entered a 255-character long string and performed a Knowledge Base search; the resulting UI printed the raw string without wrapping, thus creating horizontal scrollbars. See screenshot; notice also that the search parameter runs into the page-results numbers...
There's really no way to easily wrap that, if there were spaces in it it would auto-wrap. Will fix spacing issue though...that is legit.
Spacing issue: only happens when searching for strings > ~65chars with no spaces length issue is a general Sumo bug[1], reassigning. I'm going to fix the search results layout now anyway so it looks better with the theme. [1] http://support.mozilla.com/tiki-searchresults.php?locale=en-US&q=ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789345&sa
Assignee: bkrausz → nobody
Target Milestone: 1.1 → ---
It works for IE apparently, with: word-wrap: break-word; But this is not supported in Firefox, prior to 3.1, see: https://developer.mozilla.org/web-tech/2008/08/20/word-wrap-break-word/ Here's a way to make it work in Firefox that I think is too complicated: http://blog.stchur.com/2007/03/01/word-wrap-for-mozilla-take-2/ I've added a simple smarty truncate at 60 characters. I think this should be satisfying, as most people don't search >60 char words and *not showing* that is not a problem. r22936 / r22937
Assignee: nobody → paul.craciunoiu
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.0
Woops, on second thought... The search *could* be longer than 60, but the last word shouldn't be. Sorry about that. I'll redo with the longest word in a sec :)
Target Milestone: 1.0 → 1.1
Actually, I'd rather wait on Eric's solution before choosing to go this way. Sorry about this. See bug 450342. I've undone the changes.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Keywords: common-issue+
Whiteboard: longtext
Depends on: 450342
Eric: If you get to the text wrapping bugs, can you take care of this bug too?
Assignee: paul.craciunoiu → smirkingsisyphus
Target Milestone: 1.1 → 1.0
Target Milestone: 1.0 → 1.0.2
Keywords: common-issue+
Depends on: 405028
Are we fixing this if we're using tiki-newsearch.php?
Attached patch v1Splinter Review
Simple patch. Paul if you can't look at this before tomorrow night, reassign to Laura.
Attachment #373977 - Flags: review?(paul.craciunoiu)
Comment on attachment 373977 [details] [diff] [review] v1 Looks good. I like it, it's simple. We should see if this fixes the other bugs about long strings (there were others, I think?)
Attachment #373977 - Flags: review?(paul.craciunoiu) → review+
This is in r24917/r24918 with a small modification to ignore short strings. For verifying, plug in some long strings with no spaces, and also make sure rendering problems don't occur in normal searches (i.e. simple searches, quoted searches, multibyte language searches, etc.).
Status: REOPENED → RESOLVED
Closed: 16 years ago16 years ago
Resolution: --- → FIXED
Whiteboard: longtext → sumo_only
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: