Attempting to fix comment preview bug


Just so everyone’s aware, I just made a small change to the comment preview plugin to wrap the comment preview in the correct CSS div class. As I made this edit within the plugin itself, it’s not going to be future proof — if we update that plugin, my change will be reverted.

The correct solution is to edit our stylesheet to honor both div classes, or change the class we use for our comments, but either of those might have ripple effects, and I was in a rush this morning so I did the least intrusive change to potentially fix the problem. Worst that can happen here is the preview is still broken.

Can you folks kindly test and let me know if it’s better now? If so, I’ll see about making a more permanent change ASAP.

Comments

  1. Aliasalpha says

    If this doesn’t work then you’re worse than Hitler!!!

    Yeah looks okay. You had a lucky escape my friend…

  2. Aliasalpha says

    You could at least spell colour correctly… You may live in america now but that’s no reason to let standards slip.

  3. says

    You make a good point.

    Amusingly, it’s because of autocorrect on Google Keyboard on my phone. Yes, seriously. I can’t get the bloody thing to recognize UK English as my default.

  4. says

    OK, I announced it on my blog, and of course the commenters are all complaining to me that it is NOT FIXED. NOT FIXED AT ALL. IT IS STILL FUCKED UP.

  5. Onamission5 says

    I still am having troubles with the entire page scrolling down to the bottom when trying to type in a comment box and I hit my space bar. Am having to c&p all my comments after typing them elsewhere, lesttheyalllooklikethis.

    Frustrating? Why, yes!

  6. CompulsoryAccount7746, Sky Captain says

    @lousycanuck #3:

    anchors still go weird and offset

    Interestingly, anchor tags look fine if they have href=”” or no href at all, but href=”.” breaks them again.
    The absence, presence, or content of an anchor’s title attribute doesn’t cause that problem.
     
    Whoa, =”” previews with quotes of two different sizes.

  7. blf says

    (Cross-posted from poopyhead’s thread…)

    Back in February, commentator “richardh” offered a diagnosis of the apparent causes (plural) of the problem:

    Previewed hyperlinks are Big and Blue and float to the left instead of staying inline with the body of the text, but they look OK in the final comment.

    It seems to be coming from style.css, which contains

    a {
    color: #1772AF;
    text-decoration: none;
    }

    which is the Blue,

    .comment-link a, .comment-link a:visited {
    font: 18px arial;
    }

    which sets the Bigness, and

    #div-comment-preview span.comment-link {
    float: left;
    }
    .comment-link {
    float: right;
    margin-left: 20px;
    padding-top: 5px;
    text-align: right;
    }

    which explains the floating.

    Someone might want to think again about those float: and margin-left: settings, at a minimum.
    Setting fonts to absolute pixel sizes is also rarely a good idea; better to do it relative to other text using em units.

    Whilst I haven’t studied the css (or, for that matter, CSS) that closely, I broadly concur with the above analysis.

  8. says

    Agreed BLF — that’s what I’m facing now. I’m trying to set explicit CSS to override some of the stuff that’s trickling down into the preview, but I don’t have a lot of time to tinker right at the moment where I’m at work.

  9. says

    Actually, I’ve managed to get most of the stuff into the CSS but it’s not overriding properly. Either that, or memcache is caching an old version of the CSS. (Having all these layers of caching is irritating for troubleshooting this sort of problem…)

  10. says

    How’s it all looking now? It’s not going to be perfect, with multiple stylesheets interacting and with the option to override some styles on a per-blog basis (like mine and Pharyngula). But it seems better-ish now.

  11. F [is for failure to emerge] says

    As I made this edit within the plugin itself, it’s not going to be future proof — if we update that plugin, my change will be reverted.

    lolwut? Choose to update → communicate decision → patch plugin → install & test. The FTB PTB can’t do better, srsly?

    In the larger view, FTB is not bad at all for technical considerations. I’ve seen well-funded, IT-orientated sites do far worse for extended periods (years).

  12. says

    I actually ended up fixing it via overriding some CSS that was trickling down into the preview layer, which I couldn’t just change because I would have broken some other component of the site. But at least this way I was able to revert the change to the plugin! So now it’s future proof. Unless our REAL web master reverts that on me. :)

  13. =8)-DX says

    Helloas dfsad;l falskd lasjdflkjas;ldkfa;sdf;lkasd;kads;lkf;askdf;kasd;fl kasdlf kaskd;flksad;fkas;df k;asdlkf;askdf;l kas;dlf a;sdklf

    This is my PREVIEW TEST with the link in the right place.

    Yippee it works!

Trackbacks

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>