I was working on a project that used a lot acronyms and terminology that I didn’t know yet. It was making me crazy, so eventually I created a Terminology extension for media wiki.
Twisties, otherwise known as “Disclosure Triangles” are little triangles (►) that twist (▼) when clicked to hide or show content on the page. I’m working on a web page that has a lot of content, but didn’t want it all displayed all the time. I searched around for a little while trying to find a nice example written by someone else, but came up empty. Probably other people thought this was too simple, or my searching skills failed me. Either way, I ended up writing this myself. These were my requirements:
Cross-platform: It should work on my cell phone, on IE6, and real web browsers
Robust: If things go wrong, it shouldn’t break. If the user doesn’t have JavaScript enabled, it should work. No CSS? It should still work. A user script which hides or shows nodes out from under us? It should still work
Understandable: It should be easy for web developers to understand and add to their existing pages
Small: If this adds lots of code to a web site, it won’t be used and will slow downloads down
Attractive: It should “feel” nice. Lots of feedback to the user, and maybe some animation if appropriate. It shouldn’t seem different from twisties the user has seen before
Accessible: Should work with the keyboard and with the mouse; printed pages should do the right thing
or: making your file uploads work over HTTPS when you are using a self-signed certificate or an authority Flash decides it doesn’t like.
Flash is a popular way to upload files to web sites. This is because you can have multiple files upload at once, give pretty progress bars, and can control the file upload UI. There are some alternatives that don’t appear to be cross-platform, but that seems self-defeating.
But there is a problem; if you are using a certificate that Flash doesn’t like, it doesn’t work at all. And you don’t get an error message. In Windows this is solved pretty well. If Internet Explorer trusts a certificate, so does Flash. But on Linux, flash only checks the system certificate store. And on Fedora, it doesn’t even do that.