Closed
Bug 1178129
Opened 9 years ago
Closed 9 years ago
Long-press dialog should truncate URL
Categories
(Firefox for iOS :: Browser, defect)
Tracking
()
RESOLVED
FIXED
Tracking | Status | |
---|---|---|
fxios | + | --- |
People
(Reporter: rnewman, Assigned: karim, Mentored)
Details
Attachments
(3 files)
See screenshot for the behavior long-pressing a Yahoo image search result.
Reporter | ||
Updated•9 years ago
|
Comment 1•9 years ago
|
||
how would you like this to be done rnewman? (in terms of just capping the url at a specific character count, etc.)
Attachment #8629612 -
Flags: review?(rnewman)
Reporter | ||
Comment 3•9 years ago
|
||
Some widgets will do this automatically. If this alert doesn't, then at least break this functionality out into an extension on String. And use "…" not "...". Over to someone who's not on PTO for the next step, though!
Reporter | ||
Updated•9 years ago
|
Mentor: sleroux, etoop
Reporter | ||
Comment 4•9 years ago
|
||
Comment on attachment 8629612 [details]
Pull request
Thanks for the patch! See comments earlier in the bug.
Attachment #8629612 -
Flags: review?(rnewman) → feedback+
Assignee | ||
Comment 5•9 years ago
|
||
UIAlertController doesn't truncate the title out of the box, so I wrote a String extension for that. I tried "…" instead of "..." first, but for some reason, a line break was appended after the "…" which didn't look nice (*In the UI*, not as a \n or \r character in the string)
Flags: needinfo?(rnewman)
Attachment #8633055 -
Flags: review?(rnewman)
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → kbenhmida
Reporter | ||
Comment 6•9 years ago
|
||
Comment on attachment 8633055 [details] [review] Link to Github pull-request: https://github.com/mozilla/firefox-ios/pull/724 Looking much better. Let's get some tests and fix those off-by-one errors :)
Flags: needinfo?(rnewman)
Attachment #8633055 -
Flags: review?(rnewman) → feedback+
Assignee | ||
Comment 7•9 years ago
|
||
Fixed those errors and added tests. I also left screenshots w/ 3 dots vs ellipsis on Github.
Assignee | ||
Updated•9 years ago
|
Attachment #8633055 -
Flags: review?(rnewman)
Reporter | ||
Comment 8•9 years ago
|
||
If I had to guess, I'd say you want http://www.fileformat.info/info/unicode/char/2060/index.htm to tell UIKit not to break there. That is, the string should be: "\u{2060}…\u{2060}" Give that a shot?
Status: NEW → ASSIGNED
Assignee | ||
Comment 9•9 years ago
|
||
(In reply to Richard Newman [:rnewman] from comment #8) > If I had to guess, I'd say you want > > http://www.fileformat.info/info/unicode/char/2060/index.htm > > to tell UIKit not to break there. > > That is, the string should be: > > "\u{2060}…\u{2060}" > > Give that a shot? Yes that's exactly what I want. Worked like a charm. I pushed the changes on Github.
Reporter | ||
Comment 10•9 years ago
|
||
Comment on attachment 8633055 [details] [review] Link to Github pull-request: https://github.com/mozilla/firefox-ios/pull/724 Merged https://github.com/mozilla/firefox-ios/commit/be8fe25077c18c3e8d39bbc85d62e62a0237088b.
Attachment #8633055 -
Flags: review?(rnewman)
Attachment #8633055 -
Flags: review+
Attachment #8633055 -
Flags: feedback+
Reporter | ||
Updated•9 years ago
|
Mentor: etoop, sleroux → rnewman
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•