Just sharing a link to TRWTF for customer service
-
When handling bugs, typically you should work through some type of group that is 'good' at handling customer service. I'll let you decide which side of the fence people are on in this thread.
https://meta.discourse.org/t/logs-page-now-404s-take-2/17542
-
The overall question I have: Is anyone surprised by how that was handled by the devs?
-
I feel there's a good example, and bad example in that thread - where I will give a tip of the hat to @sam.
-
Not even remotely surprised. It's 100% consistent with the asshattery we've seen from Jeff and generally good behaviour we've seen from @sam.
-
Seriously though, it shows in the status bar the wrong URL and he still argues about it? He'd probably argue with you if you told him that Ice Cream tastes good.
-
These are the kinds of bugs you can expect when you try to subvert the browser's implementation of fundamental features, such as
<a href="">
elements.Dear web developers: Stop using JavaScript to handle clicks to open links. The browser already does it, and does it better than you will.
-
Modern IDEs should mutiny for anyone that does that.
-
subvert the browser's implementation of fundamental features, such as <a href=""> elements ... The browser already does it, and does it better than you will.
It used to be required to get native hover effects in IE. But that stopped being true when IE6 died.
And since they're very specifically not targetting IE6, it's either the leftover habits of an older dev
orand just bad coding practice.
-
Dear web developers: Stop using JavaScript to handle clicks to open links. The browser already does it, and does it better than you will.
In my app, all links are regular
http://domain.com/controller/method
deals. Javascript, if enabled, parses all links that are ondomain.com
(and not otherwise excluded by data attributes) intohttp://domain.com/#!/controller/method
.There are no
onclick
handlers for links, it listens forhashchange
event and acts accordingly (it can handle multiple#
characters to support anchors). It all works (within limits) with Javascript off.Where am I on the evil scale? :P
-
-
On a scale of 1 to Discourse, I give you a 7.
-
There are no onclick handlers for links, it listens for hashchange event and acts accordingly (it can handle multiple # characters to support anchors). It all works (within limits) with Javascript off.
Where am I on the evil scale?
I hope you check that hashchange actually works before changing the URLs... I’m also under the impression that hash changes are not always recorded in the browser history (or maybe the websites where I’ve seen this behavior were doing it wrong)
The best solution for this is probably to use an onclick handler and change the URL withhistory.pushState
. If that fails, just let the browser follow the link.
-
Modern IDEs should mutiny for anyone that does that.
But DC is built on Ruby and JS, so what good would that do?
-
On a scale of 1 to Discourse, I give you a 7.
Assuming that Discourse is at ∞ on the WTF scale, 7 is pretty non-WTFy.
-
It's something between a linear and a logarithmic scale. 7 is still pretty WTFy but accepts that it's modestly sane at the same time.
-
It's something between a linear and a logarithmic scale.
I like that the WTF scale is itself WTFy. +1.
-
I hope you check that hashchange actually works before changing the URLs...
If by "work" you mean browser support, then yes. I also use a plugin that works on all browsers I've tested it on and support. Since some other stuff I need just isn't available on certain older browsers (*cough*IEcough), and it works even on those, I'd think it's pretty safe to say that I'm fine in that regard.
I’m also under the impression that hash changes are not always recorded in the browser history (or maybe the websites where I’ve seen this behavior were doing it wrong)
Never had that happen. Maybe they muck around with history API or something. Which I'm trying to avoid TBQH. See: Discourse.
-
There is nothing wrong with using the history API. If you follow sane development practices (meaning each link when opened directly will go to the correct page) a script error from a missing history API won't really do any harm. It will error out, prevent you from preventing the event from bubbling up and just navigate to the page.
It's really not all that difficult.
-
There is nothing wrong with using the history API. If you follow sane development practices (meaning each link when opened directly will go to the correct page) a script error from a missing history API won't really do any harm. It will error out, prevent you from preventing the event from bubbling up and just navigate to the page.
Indeed. In general, I write code that works with standard page requests, then add JavaScript code to improve the experience.
There are occasional times that I write pages that require JavaScript, but only in administrative sections of the site where I know that the environment can be controlled. An example might be allowing an administrator to drag and drop items to reorder them. I could write a fall back that would allow reordering using regular requests, but the interface would be so different to the JavaScript enabled version that it wouldn't be worth the extra effort.
-
There is nothing wrong with using the history API.
There was a reason I avoided it initially, but I can't remember what it was now. Most likely support, but since browsers updated in the meantime, and some of the requirements shifted it's likely viable now.
Thinking about it, there is one edge case it will help with. I might poke around it and see how hard would it be to implement, but from memory I think it should be relatively simple. Will have to wait a week or so though.
-
Is this considered grading on a curve?
-
It's a rather wibbly sort of curve
-
When handling bugs, typically you should work through some type of group that is 'good' at handling customer service. I'll let you decide which side of the fence people are on in this thread.
https://meta.discourse.org/t/logs-page-now-404s-take-2/17542
Just Dicsourse as usual: Jeff is an ass, and @sam does his best to make it work.
-
Dear web developers: Stop using JavaScript to handle clicks to open links.
The kicker in this instance? They aren't using JS for those links. It's plain HTML as View Source would have shown, had I the opportunity to post again before that topic was closed.
-
The kicker in this instance? They aren't using JS for those links. It's plain HTML as View Source would have shown, had I the opportunity to post again before that topic was closed.
Well, on your side, yes. But this is Discourse so I pretty much guarantee you there's some weird pg/JavaScriptOnRails somewhere in the backend.
-
The kicker in this instance? They aren't using JS for those links. It's plain HTML as View Source would have shown, had I the opportunity to post again before that topic was closed.
The jQuery Fairy flits down from the ceiling, tipping from side to side as the breeze blows past her wings. Her landing on your shoulder is so soft you can only barely feel it. Leaning into your ear, she whispers, in a soothing yet chastising voice,
"Late-attached event handlers using
on()
?"
Filed Under we need a new tag cloud to attack
-
Oh, I fully understand that - The point here, though, is that clicking on the link is just the regular html stuff, not a JS handler dicking around with onclick.
-
Visit http://readwrite.com/ some time and check the source code and weep.
-
My EYES! :(
-
THE GOGGLES THEY DO NOTHING!
-
The jQuery Fairy flits down from the ceiling, tipping from side to side as the breeze blows past her wings. Her landing on your shoulder is so soft you can only barely feel it. Leaning into your ear, she whispers, in a soothing yet chastising voice,
[size=40]LATE-ATTACHED EVENT HANDLERS USING
on()
?[/size]Fixed for readability
-
-
It's more curved than spacetime.
-
Looks on on mobile! ...!
-
It's something between a linear and a logarithmic scale. 7 is still pretty WTFy but accepts that it's modestly sane at the same time.
I need more information. Where is Lotus Notes on this scale?
-
That's a tough one.
I have not actually, personally, used Lotus Notes so I can't actually give you a figure. I gather from TDWTF discussions that it's somewhere high up on the scale. Say, 0.973 Discourses?
-
Put it this way: I'd rather use Dicksores for my bugtracker than anything in Notes.
-
Do you mean that the scale actually needs to run 1 to Lotus Notes??????????
-
Discourse jokes aside, I can't think of a better candidate for a WTF Gold Standard.
-
As I said I've never had the misfortune to use it, only going by the comments here, but it seems like it's the gold standard indeed.
-
Well, I never worked with Lotus Notes, ever.
However, my father seems to like it! He isn't in IT, though.
-
Some background. One thing @blakeyrat is good at is ranting at Lotus Notes:
Another thing @blakeyrat is good at is trolling Lotus Notes supporters:
However, my father seems to like it! He isn't in IT, though.
What does he do with it?