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.

{advertisement}
Attempting to fix comment preview bug

17 thoughts on “Attempting to fix comment preview bug

  1. 5

    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.

  2. 7

    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.

  3. 9

    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!

  4. 10

    @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.

  5. blf
    11

    (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.

  6. 12

    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.

  7. 13

    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…)

  8. 14

    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.

  9. 15

    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).

  10. 16

    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. πŸ™‚

  11. 17

    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!

Leave a Reply

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