Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
update.module
Priority:
Minor
Category:
Task
Assigned:
Reporter:
Created:
4 Feb 2008 at 19:04 UTC
Updated:
20 Feb 2008 at 20:13 UTC
Jump to comment: Most recent file
If the available updates report is viewed in a narrow window, the release dates tend to wrap in somewhat confusing ways. Simple patch attached to fix it, along with before/after screenies. Any objections?
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | update_no_date_wrapping_use_entity.d6.patch | 1.24 KB | zeta ζ |
| #4 | update_no_date_wrapping_use_slash.d6.patch | 1.21 KB | dww |
| #4 | update_no_date_wrapping_use_slash.after_.png | 169.4 KB | dww |
| #4 | update_no_date_wrapping_use_slash.before.png | 168.39 KB | dww |
| #1 | update_no_date_wrapping.d6.patch | 1.78 KB | dww |
Comments
Comment #1
dwwmerlinofchaos said in IRC this was RTBC (with a minor code-style issue in the .css file -- which I corrected). Committed to DRUPAL-5--2: http://drupal.org/cvs?commit=99307
Here's a re-roll for D6 core, in the hopes it will be included upstream. Totally minor patch -- cosmetic change only. Doesn't break any strings, etc. ;)
Comment #2
webernet commentedSeems to be fine.
Comment #3
zeta ζ commentedPatch looks good – but is this specific to safari? I can’t see it in firefox. Doesn’t seem to wrap on hyphens.
Seems there are several formats in core that use either - or /. Does this happen in safari with /? I can’t find a &non-breaking-hyphen; entity, so is this a browser specific issue?
If it is only -’s that cause this, should we use
<span class="date">(Y-M-d)</span>for any format containing -’s?Comment #4
dww@zeta-zoo:
- Hrm, I can't reproduce this in FF either. Given the browsers I have access to, yes, I guess that makes this Safari-specifc. ;)
- No, Safari doesn't wrap if the format it 'Y/M/d', so I guess we could solve this problem that way, too. Not sure I like it. Somehow it makes the screenshot look more cluttered. Anyway, patch and before/after screenies provided for consideration.
Comment #5
zeta ζ commentedYes I agree about look of Y/M/d, so are any other characters non-breaking for all browsers? what about
–(2008–Jan–22) ? or ? (2008 Jan 22)I think finding an appropriate character is preferable to all that markup just for one browser (& konqueror?)
BTW my code in #3 lost its escaping …
<'\sp\a\n \c\l\a\s\s="\d\a\t\e">(Y-M-d)</\sp\a\n'>This would allow us to achieve effect of patch in #1, but only for formats that need it.Comment #6
dwwre: escaping: uhh, i don't understand what you're trying to escape your comment for. if you wrap something in
<code>tags, you don't need to escape anything... I edited your comment #3 so I could read it. I'll leave #5 alone, since I guess you're trying to explain something, but it's lost on me. The output of the available updates report is not being passed through admin-defined input filters, it's just directly being check_plain()'ed as needed and sent to the browser from a theme function. Can you clarify what you're talking about?re: other chars -- you can't use fancy HTML chars like that inside format_date(). So, either we have to use a space, a dash, or a slash. space obviously wraps. dash wraps on safari but not FF. slash appears not to wrap anywhere, but looks ugly. I don't see how these extra spans are doing much harm -- i'd hardly consider it "all that markup". or, we call format_date() 3 times ('Y', 'M' and 'd') and then cat them all together with one of your funky HTML chars or something. that's even worse than these extra spans, IMHO.
So, I'm still leaving this with #1 as RTBC. If someone wants to propose a viable alternative with a patch, go for it, but we're seriously splitting hairs here. We've all got vastly more important things to spend time on. ;)
Comment #7
zeta ζ commentedIt’s a format string. The escaping is to stop the characters being interpreted as special by the formatter. That’s why you cant use
–in a format string – tryformat_date($date, 'custom', '(Y&\n\d\a\s\h;M&\n\b\sp;d)');gives (2008–Jan 22) that doesn’t wrap.Just narrows down the solution to what is actually causing the problem.
Supplying a patch if any one wants to try it, but I’m happy to go with #1.
Comment #8
dwwSadly, no, that wraps in Safari, too. :(
I think the only viable options here are '/' chars from #4 which look ugly, or the spans from #1, which is _slightly_ more markup to send to the browsers. This isn't a high traffic page, anyway, so I'm not too worried about the "bloat". Hence, #1 is still RTBC. ;)
Comment #9
gábor hojtsy#1 looks fine, committed to 6.x, still needs to be committed to 7.x
Comment #10
dries commentedCommitted to CVS HEAD. Thanks.
Comment #11
dries commentedCommitted to CVS HEAD. Thanks.
Comment #12
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.