In a blizzard she was lost February 15, 2011 4:06 PM   Subscribe

What happened to the pony we named "Wildfire" -- i mean, the "x new" feature? Gone already?
posted by evilcolonel to Bugs at 4:06 PM (51 comments total) 2 users marked this as a favorite

It's still there. Are you not seeing it? If not, are you sure that

- javascript hasn't been disabled
- you don't have another greasemonkey script blocking it
- you didn't turn it off [did we set up a preference for that yet?]
- there have actually been new comments?
- you're not expecting in somewhere where it's not working yet [currently just in MeFi]

Could you give us more details?
posted by jessamyn (staff) at 4:08 PM on February 15, 2011


It's still there on MetaFilter, not working for you?
posted by pb (staff) at 4:08 PM on February 15, 2011


Still works for me?
posted by boo_radley at 4:08 PM on February 15, 2011


It appeared to have stopped working... but I may have been hasty in posting this, because it's there now. But I was finding myself having to refresh threads to see new comments, and it was odd because I haven't made any changes. (I use Chrome.)

never mind
posted by evilcolonel at 4:14 PM on February 15, 2011


I really love this feature. This is my statement to that effect. My gratitude radiates from these words. The radiance is the color of sunlight falling through green glass onto the pages of an old book. I now feel heard.
posted by prefpara at 4:16 PM on February 15, 2011 [20 favorites]


It's sort of coming and going for me as well today.
posted by elizardbits at 4:42 PM on February 15, 2011


We be ridin' Wiiiiiiildfire
We be ridin' Wiiiiiiildfire
We be ridin' Wiiiiiiiiiiiiildfiiiiiiiiiiiiiiire


(it hasn't been working for me today either)
posted by 2bucksplus at 4:48 PM on February 15, 2011


I haven't been sitting in threads long enough to notice a problem with the comment updates, but I've been having intermittent delays and timeouts when reloading pages across the site this evening.
posted by des at 4:56 PM on February 15, 2011


I noticed it was sort of coming and going for me yesterday (in Firefox and IE), today it seems to be there (on IE, haven't tried FFox yet since I'm at work). Javascript enabled, no weird greasemonkey things running.

I was noticing it yesterday in the Hello, I'm Fat thread the most -- when I would reload the page new comments would appear. So comments were being posted, but the "x new" thing wasn't appearing. I'll submit more info if I can.
posted by palomar at 4:57 PM on February 15, 2011


Is there a plan to implement it on AskMe or MeTa any time soon?
posted by ThePinkSuperhero at 5:05 PM on February 15, 2011 [1 favorite]


Wiiiiiiiiiiildfiiiiiiiire, where are you?!

I've got sugar taters!
posted by Brandon Blatcher at 5:08 PM on February 15, 2011


if that song gets stuck in my head, I'm gonna be pretty darn cra... wiiiiiiiildfiiiiire. Hope me. Won't anyone hope wiiiiiiiiildfiiiiirrrrrrre
posted by theora55 at 5:47 PM on February 15, 2011 [4 favorites]


Is there a plan to implement it on AskMe or MeTa any time soon?

Yes! Very soon. We're still ironing out a few bugs.

Keep in mind that if a thread doesn't have activity for an hour and a half or so, you'll need to reload the page. You can't leave a thread open and have it check for new posts forever. We aren't trying to eliminate the need for the browser's refresh button, just help notify of new comments in fast moving threads.
posted by pb (staff) at 6:03 PM on February 15, 2011


I hate that song.

To paraphrase Arthur's butler, I thought I'd alert the Mefia.

(Do we have a MeFia? In Chicago, there is no cabal, but it's possible that there is a MeFia.)
posted by tzikeh at 6:18 PM on February 15, 2011 [1 favorite]


pb, if the script has reached its 90min threshold and is no longer checking for updates, could you add a piece of text that says something like

"Update checking expired. Reload page for updates."

I thought the fact that one thread said 7 and when I reloaded it was actually dozens was a bug, but I realize now it probably just stopped checking.

Not that this is important but I think displaying a notice is a valid response to the use case if it stops updating because of an expiry.
posted by chimaera at 6:21 PM on February 15, 2011 [6 favorites]


It got wonky every now and then in the Egypt threads, with either double comments or sometimes comments loaded out of order. But I cared more about reading those threads than documenting the bugs.
posted by klangklangston at 6:26 PM on February 15, 2011


Gosh, really sorry about the Wildfire earworm. Here, take this.
posted by maudlin at 6:41 PM on February 15, 2011


chimaera, yeah, we've been talking about adding that. It seems a bit like overkill, but I can understand that if you leave a tab open overnight and expect it to poll the server the whole time you'd be frustrated with no message. This is a new feature for us and we're sill learning what people's expectations are.

Keep in mind that it's 90 minutes of inactivity on a thread, not 90 minutes total. It should take a thread going for two hours or more without a new comment for the poller to time out. And in that case, a reload seems reasonable. But if the expectation is that the poller handles any amount of time the message might be required.

Let me know if you see that frequently, klangklangston. Comments should never be out of order, I'm not sure how that would happen. But I did see double comments occasionally in the early days of the feature. I haven't been able to reproduce them with more recent code, though.
posted by pb (staff) at 6:46 PM on February 15, 2011


I still intend to figure out what the hell to do about Greasemonkey scripts. JQuery was already problematic enough (Chrome and Opera don't adequately support @require), and now I wish I could use $.live() in all of my scripts. Anyone out there know if they both support DOM Level 3 events like DOMSubtreeModified? CanIUse.com doesn't say.
posted by Plutor at 6:50 PM on February 15, 2011


Plutor, in the original thread Rhomboid mentioned adding an arbitrary jQuery event on our end to notify Greasemonkey scripts that we've updated the page. Would something like that work better than watching the DOM for an update?
posted by pb (staff) at 6:58 PM on February 15, 2011


Ah OK. I think I follow. Some sort of indicator that the script is no longer updating may decrease confusion, but yeah, totally minor request. Cheers on the implementation, though. It's dead useful for the likes of me.
posted by chimaera at 7:14 PM on February 15, 2011


I feel the need to repeat what Dave Barry once wrote about "Wildfire." I'll be paraphrasing, but:

A "killing frost" refers to a specific temperature which is low enough to kill plants, and occurs on cloudless nights. Nothing would get "lost" in a killing frost that wouldn't get lost in July as well.

Wildfire was a stupid horse, is what I'm trying to say here.

This here particular pony is just aces, though.
posted by Navelgazer at 7:54 PM on February 15, 2011 [3 favorites]


Gosh, really sorry about the Wildfire earworm. Here, take this .

TRIGGER WARNING
posted by Devils Rancher at 8:18 PM on February 15, 2011


I'd really like it if the js checked for more posts on mouse motion or something like that after returning to the thread left open overnight and timing out--this way it wouldn't automatically keep going if nobody was paying attention, as well as keep the expectation "the js will tell me when there are new posts" true.
posted by tjenks at 8:40 PM on February 15, 2011


I actually went to college with Micheal Martin Murphy's son. He's a techno musician who goes by the handle Planewalker Epsilon. Dad's shadow is long and hard to crawl out from under, but he's a good fellow, and as a matter of fact he's got quite a subtle hand with dubstep.

True story.
posted by koeselitz at 9:56 PM on February 15, 2011


Also, for anyone who still has that awful song stuck in their heads:

Here's your antidote.
posted by Navelgazer at 9:59 PM on February 15, 2011


pb: "Plutor, in the original thread Rhomboid mentioned adding an arbitrary jQuery event on our end to notify Greasemonkey scripts that we've updated the page."

I'm no plutor, but I think yes: If you have the rhino nearby, look at section 17.7.
posted by boo_radley at 10:03 PM on February 15, 2011


A quirk I've noticed: If I click to load new comments, then navigate away from the page, then come back to the page using my browser's back button, the 'new comments' I'd loaded before will have disappeared, and I have to wait for the notifier to reappear.
posted by jon1270 at 3:51 AM on February 16, 2011 [1 favorite]


Wildfire? This is a Solidworks shop, son. Anything else is inferior.
posted by backseatpilot at 5:28 AM on February 16, 2011


A "killing frost" refers to a specific temperature which is low enough to kill plants, and occurs on cloudless nights. Nothing would get "lost" in a killing frost that wouldn't get lost in July as well.

But Baby, it's cold outside.
posted by Smart Dalek at 5:34 AM on February 16, 2011


pb: "Would something like that work better than watching the DOM for an update?"

Yesss yes yes yes so much yes.

Wait, can I pick up those with a script that doesn't use JQuery? Would addEventListener('mefi-ajaxcomment', blah) work?

Wait wait, you guys switched to JQuery a couple months back. I wonder if I can just use that object. Can I steal unsafeWindow.jQuery?
posted by Plutor at 5:34 AM on February 16, 2011


Greasemonkey scripters: You can steal MetaFilter's jQuery object with this snippet of code:
function jquery_wait() {
    if (typeof unsafeWindow.$ == 'undefined') {
        window.setTimeout(GM_wait, 100);
    } else {
        $ = unsafeWindow.$.noConflict(true);
        your_init_function();
    }
}
And then call jquery_wait() instead of your_init_function(). It'll call your_init_function() when jQuery is loaded and ready to use.

I haven't tested this code in Chrome or Opera. I've updated Mefiquote to use this instead of @require.
posted by Plutor at 5:53 AM on February 16, 2011 [3 favorites]


Wildcat.
Wiiiiiiildcat.



I have to go.
posted by Potomac Avenue at 5:56 AM on February 16, 2011


It's actually not a good idea to use unsafeWindow. There are better ways. For example the content scope runner which essentially re-injects the script into the page. If you stick that at the top of your script you can use Metafilter's jQuery as $() in a greasemonkey script instead of having to @require a whole separate copy of it in the sandbox. Using that I was able to update Mefi navigator to refresh on new comments using something like this:
$('#newcomments').bind('DOMNodeInserted', function() { if(refresh_triggerable) { refresh_triggerable = false; window.setTimeout(mfn_refresh, 0); } });
...
function mfn_refresh() {
  // alert ('mfn_refresh');
  $('.mfndecor').remove();
  mfn_main();
}
(.mfndecor is a style added to all the decorations so that they can all be removed first before being regenerated.)

The problems to overcome are thus:
  1. You get a firing of DOMNodeInserted for every element inserted into #newcomments. Each comment has something like 5 elements, so that means this fires 50 times if 5 new comments were inserted. So that's why I use setTimeout instead of directly calling mfn_refresh, with the assumption being that due to the single-threaded nature of javascript, a timeout function can't interrupt other code that's executing, it will only be called once that code is finished, so this results in only one call to mfn_refresh() after all the comments have been inserted into #newcomments.
  2. In adding the navigation helpers, the DOMNodeInserted event is also triggered, which would cause an infinite loop. So you have to have this refresh_triggerable which is held false while inside of those functions and then set true again at the end.
This seems to work fine without requiring any special events.
posted by Rhomboid at 5:59 AM on February 16, 2011 [2 favorites]


Nice. How does it work with Opera and Chrome?
posted by boo_radley at 8:30 AM on February 16, 2011


I'd like the ability to buy extra favorites so I could give them to Navelgazer, but I have to buy a new keyboard instead and go make some more coffee.
posted by catlet at 8:40 AM on February 16, 2011


what happened to wildfire? - billy tried to save him, but he made the mistake of being a hero on the night chicago died - no more seasons in the sun for him - before he took the last train to clarksville, he told his girlfriend sharona, "you're having my baby - what a wonderful way to say i love you" - she suffered a total eclipse of the heart and moped around singing, "honey, i miss you" - then a magic man came, said, "come on down to my boat baby" and "gimme gimme good lovin" - with love in her tummy, she was the happiest girl in the whole u s a

you SO asked for that
posted by pyramid termite at 10:13 AM on February 16, 2011 [3 favorites]


oh, i never said what happened to wildfire, did i? - he joined the crazy horses on the osmonds' ranch

bwa ha ha ha ha ha ha!
posted by pyramid termite at 10:16 AM on February 16, 2011


So, yeah, closing the browser and leaving it closed isn't working. I open up Metafilter today at 2pm to check some threads, having not been on the site or had a browser session still open that went to the site, since 10pm last night. Threads that are saying they have 50 new comments on the front page are showing the correct number of total comments but showing me no count of new comments in the My Comments page.
posted by kafziel at 11:06 AM on February 16, 2011


I think I found the problem, kafziel. The next time you see new comment counts change on the MetaFilter front page, try the My Comments tab and see if they match up.
posted by pb (staff) at 11:47 AM on February 16, 2011


A quirk I've noticed...

Yeah, we've had a few complaints about breaking the back button. It's a tricky problem to solve. The most common solution involves putting something about the current state of the page in the URL after the hash (#) so the page knows where to pick up when you come back to it. We already use the hash to reference individual comments on the page. If you've ever linked to someone else's comments, you've seen this in the form of: [thread url]#[comment id].

I just pushed out a new version of the code that uses the hash if you're not already using it to reference a specific comment. So when you click the 'show' link, the URL will change slightly to [thread url]#inline-[comment id]. When you return to the page via the back button, the page should pick up where you left off.

Like I mentioned, we'll only replace the hash content if you aren't already using the hash to refer to a specific comment. So the back button will still be "broken" if you happened to navigate to a page that includes a comment reference or if you click a specific comment permalink after you have updated the page. (A page reload will take care of unloaded comments—or you can wait for the poller to kick in based on your last full page load.) We aren't going to completely solve the back button issue, but this should help some of the time. For the rest, reload!

Oh, and if you want a low-tech solution to the back button problem, check "Open links in new windows?" in your site preferences. That way you'll open external links in a new tab and preserve your spot on the page. No back button required.

The other change in the latest version is a note when it times out. If the poller runs for around 90 minutes or so without seeing new comments, you'll get this message: "No recent updates. Reload to check for new comments." Reload the page and the process begins again.

Let me know if you have problems with either of these additions.
posted by pb (staff) at 3:00 PM on February 16, 2011 [1 favorite]


You can also turn off inline comment updates in your site preferences now. Uncheck the box next to "Inline comment updates?" to completely turn this feature off. That way if the new comment count in page titles is driving you crazy you can disable it.

Standard Disclaimer: this preference is cookie-based like all of our display-related preferences so you can have different settings for different browsers. But it means you need to re-save your preferences or log in/out in each browser for the new setting to be active.
posted by pb (staff) at 3:08 PM on February 16, 2011


This is great and all, but I feel like we're just scratching the surface of jQuery. Could we use it to have in-line popups defining big words and previewing image links? Also, blink tag?
posted by mccarty.tim at 4:13 PM on February 16, 2011


I'm pretty sure the blink tag still works fine.
posted by 256 at 5:50 PM on February 16, 2011


Thanks
posted by mccarty.tim at 7:10 PM on February 16, 2011


Rhomboid: "It's actually not a good idea to use unsafeWindow. There are better ways. For example the content scope runner which essentially re-injects the script into the page."

Why is unsafeWindow now a good idea? What is bad about it? The content scope runner dealie is nice and all, but you lose access to GM_log, GM_*value, and the cross-domain-happy GM_xhr. Granted, all of those have alternatives (especially GM_*value, for which I could finally use localstorage to make Chrome and Opera happy), but that's going to be more work to get these to be compliant. If I can use unsafeWindow, that's going to be way easier.
posted by Plutor at 5:21 AM on February 17, 2011


s/now/not/
posted by Plutor at 5:21 AM on February 17, 2011


As its name implies, it is unsafe. As you know, GM scripts execute in a context that can bypass AJAX same-origin policies through GM_xmlhttpRequest, and this includes reading local files on the computer with file:// urls. A malicious site could exploit a GM script that tries to call a method or access an object in unsafeWindow to gain access to those privileged operations and do evil. For example, suppose a GM script had a line

unsafeWindow.foo();

A malicious site could then do something like

function foo() { foo.caller.__parent__.GM_log('rut-roh'); }

...where foo could be $.noConflict in your example. As written this wouldn't actually work for GM_xmlhttpRequest() because the browser would detect that the call was from unsafeWindow, but since you can get the context of the GM script I'm sure there are evil ways to inject code so that it executes in that context, perhaps Object.prototype or Object.watch; I don't have enough evil JS experience to say for sure. The point is, doing anything with unsafeWindow opens this kind of hole because it bypasses the sandbox protections.

Now, certainly you could make the argument that we trust pb and mathowie and company to not exploit their own users, and so for a script that only runs on Metafilter I concede that it's probably okay to use unsafeWindow. The problem comes when you write a GM script that runs on a site whose administrators you don't personally know and trust, or which has a wildcard @include to make it run on every site.
posted by Rhomboid at 9:56 AM on February 17, 2011 [1 favorite]


The pony is not working for me today either.

Also, when I try to favorite something, I get an error "The page is still loading, please wait to add favorites".

Running FF 3.6.13 on WinXP, with Greasemonkey scripts Usernote and MefiQuote enabled

Plutor: "I've updated Mefiquote to use this instead of @require."

This seems to be the culprit. When I disable Greasemonkey, it works.
posted by I am the Walrus at 10:31 AM on February 18, 2011


You're right, I broke things with that version. I've reverted the version available on userscripts.org. A different fix is pending, once I rewrite the way I store config values.
posted by Plutor at 5:24 AM on February 21, 2011


I've now upgraded Mefiquote to handle new ajax comments. pb created a custom event, as discussed, and it looks to be working fine. To handle it (this is a little different than initially proposed), all you need is:
$("#newcomments").bind('mefi-comments',
    function() {
        // ...
    } );
Note that you don't need a live event, since #newcomments contains all of the new comments, it doesn't get created for each new comment. Sure, live() would work, but this is a little more efficient.

Pretty sure this means you could use:
    addEventListener('mefi-comments', ...)
also.
posted by Plutor at 11:48 AM on February 23, 2011


« Older Duck George, it's my shoe!   |   I can't think of a title Newer »

You are not logged in, either login or create an account to post comments