kaberett: Overlaid Mars & Venus symbols, with Swiss Army knife tools at other positions around the central circle. (Default)
kaberett ([personal profile] kaberett) wrote in [site community profile] dw_dev2016-05-25 05:43 pm
Entry tags:

Code tour: 12th April--25th May

This is a big one, due in no small part to [github.com profile] pinterface, new to Dreamwidth volunteering and coding up a storm. I've gotta say. A very warm welcome also to [github.com profile] dfabulich, who I am pretty sure is also featured in a code tour for the first time!

Issue 110: Moves DW::BusinessRules::InviteCodes::DWS to -free (pull request) (nonfree pull request)
Category:
Patch by: [github.com profile] kaberett
Description: So one of the things I do is, I run the Bugs for Beginners masterpost over at [site community profile] dw_dev_training. About three weeks ago I got abruptly very bored of having a long, long list of bugs that had been filed back in the days of Bugzilla, and started, um, fixing some of them. For neatness' sake. This was one of those: there was something in the dw-nonfree repository (which isn't available for anyone to use, unlike code in dw-free; mostly -nonfree contains things like the logos and site branding), namely the module handling invite codes, that didn't need to be. So I moved it over and, um, promptly broke everyone's Dreamhacks. (This half of the pull fix was removing the code from the dw-nonfree repository.)

Issue 113: Convert pages in htdocs/site to Foundation (pull request) (nonfree pull request)
Category:
Patch by: [github.com profile] kareila
Description: The ongoing attempt to get rid of BML and make every page that's ever presented in the sitescheme be using the same code to generate the sitescheme!

Issue 1287: make community moderated entry accept/reject message box auto-scale (pull request)
Category:
Patch by: [github.com profile] chrisboyle
Description: If you're a community admin or moderator for a community with moderated posting, you'll need to accept or reject submissions. When you do this, you've got the option of including a message about why the post was rejected -- for example, to say what would need changing before the post could be approved -- and sometimes (particularly if you're [staff profile] denise and the moderated community in question is [site community profile] dw_suggestions) the reason can be pretty lengthy. This fix makes the rejection box auto-scale so you can see all of your draft message at once, subject to having a large enough screen, instead of having to scroll up and down inside the compose pane.

Issue 1501: Unicode characters in plaintext email notifications coming through as WTF-8 (pull request)
Category:
Patch by: [github.com profile] pinterface
Description: OKAY SO. You know the way a few months ago (or was it closer to a year, ulp) e-mailed comment notifications started including clearly incorrect characters. In Highly Technical Terms, text encoded was getting delivered as WTF-8 since Dreamwidth switched to sending notifs via Amazon SES. Dev volunteers had been staring at this in confusion ever since it started happening, and then [github.com profile] pinterface showed up and fixed it. Told you I was a fan. (Turns out, it wasn't a problem with HTML e-mails because those were already encoded as quoted-printable, where plaintext e-mails were sending raw, unencoded 8-bit data... that SES might well have been trying to convert to 7-bit, with Bad Results.)

Issue 1528: Unclear or absent error/success messages relating to tag removal permissions (pull request)
Category:
Patch by: [github.com profile] chrisboyle
Description: If you're me, one of the things that gives you great joy is Putting Things In Their Appropriate Boxes, be those boxes figurative or literal. Sometimes this means that you end up, e.g., responsible for tagging all the posts in [site community profile] dw_suggestions appropriately -- which is great, right up until you want to remove tags, and it turns out that you can't, because you're not a community admin, but everything cheerfully sort of carries on as though you have removed them up until you go to look and... the wretched... tag's... still... there. So, like, (a) I redesigned how community controls should work (but it's a big enough job no-one's started on it yet, understandably) and (b) I asked really nicely and someone wrote me error messages.

Issue 1604: Error in log when posting a comment with a CAPTCHA
Category:
Patch by: [github.com profile] cesy
Description: Ideally, you don't get error messages when nothing's actually wrong! Cesy tidied this one up.

Issue 1660: .bmp in multiple icon uploads returns human-unfriendly error message (pull request)
Category:
Patch by: [github.com profile] kareila
Description: ... whereas in this case you got an error message when something did go wrong, it just wasn't a useful error message, which is to say, error messages exist to tell people why the computer is sad, and this one did not adequately communicate Computer: Why It Is Sad. This led to a lot of Support requests. Now if you try to upload an icon that's been saved as a bitmap, you'll be told that you can only upload GIF, PNG or JPG files, which is rather more comprehensible than "Hook: 'enddata' returned false".

Issue 1702: List "Other Services" in columns on profile pages (pull request)
Category:
Patch by: [github.com profile] me-and
Description: Two nice things about this one! The first is that there's one less place on the site that uses tables for formatting, which is -- how do you say -- a terribly... Web 1.0 approach. The other is that if you've got a lot of accounts elsewhere on the internet, and you want people to be able to find you, the Other Sites list on your profile will shortly dynamically sort itself out into multiple columns depending on your screen width, instead of being perpetually and sulkily one very long column. (The third nice thing is that [personal profile] me_and, while working on this, called me over to ask what I thought of it. "Wouldn't it be nicer," I said, "if column widths weren't determined by one ridiculously long username?" So he dug out the CSS property that would make ridiculously long usernames be elegantly truncated with an ellipsis, which personally I hold up as a victory for good taste all around.)

Issue 1705: Facebook image specifier (pull request)
Category:
Patch by: [github.com profile] chrisboyle
Description: Uh. So. You may or may not have noticed that if you link to a DW post on Facebook, and let Facebook decide which image to use as a preview, it tends to default to the icon of the first commenter (particularly in cases where the journal has no default icon set). This is suboptimal for many reasons, including (a) the first commenter's icon does not necessarily have anything to do with the actual post, and (b) icons are a maximum of 100x100 pixels on DW, which looks kiiiiiiiiinda ugly when blown up to 200x200 for Facebook's purposes. It will shortly be the case (and there's a dw-nonfree pull request coming to neaten up the edges on this one) that instead the preview image is by default the Dreamwidth swirly D.

Issue 1709: [#1709] warn for xmlrpc errors without faultcodes (pull request)
Category:
Patch by: [github.com profile] kareila
Description: ... uh. So. There's the thing where it's nice not to get error messages when there isn't a problem? And it's nice to get error messages that are human-readable? Well, um, sometimes it is also necessary to get error messages that are computer-readable, so the computer can take the error and do something sensible instead of falling over in a heap of I Was Expecting A Number But You Inexplicably Gave Me Letters And I Don't Know What To Do With Myself So I'll Have A Cry Instead. It's... not actually immediately clear why the error messages in question are sometimes not computer-readable. This pull request introduces some logging to help work out what's going on.

Issue 1718: nonexistent link anchor "iminfo" used on profile page (pull request)
Category:
Patch by: [github.com profile] pinterface
Description: Imagine that you are logged in. Imagine that you are looking at your own profile page. Imagine, for the sake of argument, that you spot something you want to edit -- a typo, say, or you've signed up for Ravelry and want to tell the world, via your Dreamwidth profile, that people can find you on Other Sites including Ravelry at, for the sake of example, [ravelry.com profile] kaberett. So you click the "Edit" button next to "Other Sites"! ... and get dumped at the top of the Edit Profile page, rather than at the subsection dedicated to listing your presence on Other Sites, because the extra bit of URL that tells the Edit Profile page to go straight to the Other Sites section... didn't exist. As far as Edit Profile was concerned. ... well SOON IT WILL, and the link will work exactly as intended, thus saving you some scrolling.

Issue 1719: add email comparison function (pull request)
Category:
Patch by: [github.com profile] chrisboyle
Description: A general principle of coding is that if you've got to do the same thing more than once, you should write it out once, as a function, and then use that function anywhere you want to do the thing, rather than writing out the thing two (or seventeen, or forty-two) times and then having to change it in every single one of them when you (inevitably) decide that you want to do the thing... differently. In this instance, what you want to do is make sure that two accounts have the same confirmed e-mail address -- which matters when you're swapping the username of two journals (you gotta control both of them!) and if you're wanting to swap bonus icon slots between two accounts you control. So! This does that.

Issue 1722: Add url_full method to LJ::Faq (pull request)
Category:
Patch by: [github.com profile] pinterface
Description: ... i.e. now there's a function that will, when asked nicely, return a pleasingly linkified version of the full title of a FAQ when given that FAQ's number. So that you don't end up writing out the code to do so in five (or twenty-five or one hundred and twenty-five) different places, and have to change it in every single one of them if you change your mind about the best way to do it.

Issue 1742: [#1742] don't lowercase all get_args keys in LJ::create_url (pull request)
Category:
Patch by: [github.com profile] kareila
Description: Site Search is an abomination. A many-tentacled abomination. Sometimes things go wrong if the search terms are lower-case; sometimes they go wrong if they aren't. This is a Dark Art and if you want more details about how much of a creeping shambling horror this is then you can read all about it but to be honest I have and I don't particularly advise it. (Or ask in comments! People will doubtless be very happy to explain if you ask in comments. Or at least will take a certain grim delight in explaining the monstrosity.) (Turns out I totally explained this one wrong, sorry!)

Issue 1743: Cleanup 2015q4 (pull request)
Category:
Patch by: [github.com profile] kareila
Description: Kareila is great! Kareila finds untended corners of the code and tidies them up to make them a little more presentable. Largely more of what we saw back in 1604. (1604 was a leap year; Kepler's Supernova was first observed; the first known alphabetically-organised English-language dictionary was published.)

Issue 1745: Disable hotlinking and searching (pull request)
Category:
Patch by: [github.com profile] zorkian
Description: If you're browsing Dreamwidth using HTTPS rather than HTTP, you may have noticed that images all have source URLS of the form https://p.dreamwidth.org/..., because they're being served by a proxy precisely in order that you can browse over HTTPS and not get served less secure content. However, images being proxied doesn't mean that it's a good idea to let people hotlink to the proxied version of the image, or to let robots index the proxied image so it shows up in search results, so this addresses both of those concerns to at least some degree.

Issue 1746: Add more journal/ditemid (pull request)
Category:
Patch by: [github.com profile] zorkian
Description: ... and some more related work!

Issue 1747: our https OpenID URLs can't be used to log in to other services (pull request)
Category:
Patch by: [github.com profile] kareila
Description: So you know the way I keep going on about how HTTPS is more secure? And you know the way OpenID is a thing? Well. Er. It's sort of a pity if Dreamwidth only lets you log into your OpenID on other sites if you use the HTTP version (so that'd be http://kaberett.dreamwidth.org for me), and not the HTTPS. ... that's been fixed, or will be when the next code push goes live, this is a lot of bugs okay and I'm slightly losing track.

Issue 1749: don't test $LJ::HTTPS_UPGRADE_REGEX unless it is defined (pull request)
Category:
Patch by: [github.com profile] kareila
Description: If a thing doesn't exist, and isn't supposed to exist, and you test how it works, then your test will fail. Irrelevantly failing tests are bad. Don't test things unless they exist (or aren't supposed to not exist), kids.

Issue 1750: Remove customview from codebase (pull request)
Category:
Patch by: [github.com profile] kaberett
Description: Nobody uses customview. It has never been possible to use customview on Dreamwidth. Nobody has ever asked for it to be possible to use customview on Dreamawidth. There was no conceivable purpose to keeping this code around. I chucked it onto the metaphorical bonfire to reduce the number of Bugzilla bugs on the beginners' bugs masterlist.

Issue 1751: Move DW::BusinessRules::InviteCodes::DWS to -free (pull request)
Category:
Patch by: [github.com profile] kaberett
Description: Yep, this is the companion to 110, way up top.

Issue 1752: Specify color_page_text for all Basic Boxes themes (pull request)
Category:
Patch by: [github.com profile] kaberett
Description: ... moooooooooore Bugzilla bugs. I... had a moment. I also still don't really understand how the style system works, but it's now the case that color_page_text is actually specified for all these themes, which reduces the risk of ending up with unfortunate black-on-black incidents.

Issue 1753: Tidy up CSS credit for Leftovers and Patsy (pull request)
Category:
Patch by: [github.com profile] kaberett
Description: There was Too Much Information (and too many Bugzilla bugs). Now there is less information, and fewer Bugzilla bugs. (Something was being listed in credits for these styles -- is that even the right term, WHO KNOWS, NOT ME -- that wasn't actually being used. At all. Anywhere. It was clutter. As someone about to move house for the second time in four months, I have a lot of feelings right now about unnecessary clutter, alright, which is why I felt the need to tell you about dictionaries and supernovae.)

Issue 1756: Make light/lynx mode render better on mobile devices (pull request)
Category:
Patch by: [github.com profile] dfabulich
Description: There are many good reasons to want to use an uncluttered (ha) image-light version of the website. They announce themselves genteely but unavoidably when you're on mobile with a limited data plan. As such, it would be nice if the light version rendered at a sensible width on mobile devices -- and SOON IT WILL.

Issue 1757: remove domain forwarding feature (pull request)
Category:
Patch by: [github.com profile] kareila
Description: Unfortunately, when Dreamwidth recently increased the site's protection with the service CloudFlare, which works to prevent or mitigate DDoS attacks, domain forwarding -- having a URL of your own load your Dreamwidth account -- was affected, in the sense of "it stopped working". Domain forwarding was a paid account feature, but it was used by so few people that paying CloudFlare enough to unbreak it wasn't feasible. The feature's therefore being retired.

Issue 1759: Mood themes: Teeny Tinies variant (pull request)
Category:
Patch by: [github.com profile] pinterface
Description: Seven new colour variations on a mood theme, to give better contrast against a wider range of backgrounds!

Issue 1762: get_maintainer console command needs more error checking (pull request)
Category:
Patch by: [github.com profile] kaberett
Description: Admin Console commands are supposed to return a success message or an error message, not leave you staring into the void with no idea if it even heard you, let alone whether it'll call you maybe. Under some circumstances, like for example if you asked which communities someone who maintained no communities maintained, get_maintainer would stare blankly and impassively back at you, or maybe not, you can't be sure, since it does not as far as we know have any form of visual sensing organ, so the extent to which it can be claimed to "stare"-- you get the idea. Uh. Error messages! Error messages are good, except in the sense that they're not. Now there are error messages.

Issue 1768: dw-free shouldn't default to using en_DW for translation (pull request)
Category:
Patch by: [github.com profile] pinterface
Description: ... because en_DW lives in dw-nonfree, which sometimes breaks dev environments, especially if you're setting up an install all of your very own. It's nice if that doesn't happen, and if new installations of the DW code base do something in the general vicinity of Just Working. This... gets us a few steps closer to that idyllic utopian vision.

Issue 1769: bring dw-nonfree config-local.pl up to date (pull request) (nonfree pull request)
Category:
Patch by: [github.com profile] kareila
Description: Config files! They're awful! They're being made incrementally less awful in advance of being made entirely less awful!


Issue 1772: Possible precedence issues (complaints by Perl 5.20) (pull request)
Category:
Patch by: [github.com profile] pinterface
Description: ... yeah, there were some slightly concerning warnings. Perl didn't like a thing Dreamwidth was doing. Now Perl likes Dreamwidth better, and fusses less.

Issue 1774: t/console-suspend.t is failing (pull request)
Category:
Patch by: [github.com profile] kareila
Description: Tests shouldn't fail (unless they're intended to)! (The test "is this broken" will, for example, be one you normally want to fail, because in general it is nice if things work.) The test has now been adjusted so it doesn't worry about something not existing if it isn't... actually supposed to exist.

Issue 1777: Mood theme editor: incorrect message when one didn't set width and height (pull request)
Category:
Patch by: [github.com profile] pinterface
Description: Error messages should, again, be human-friendly, in the general case (and should ideally be accurate, too). This message was actually an inaccurate success message, which is the opposite of anything that you actually want to happen. Going live in the next push, you won't get straight-up wrong success messages under these circumstances when using the mood theme editor. (Thiiiiiiiiiiiiis was also on the pile of Bugzilla Bugs I Wanted Gone; thanks, pinterface!)

Issue 1779: Comment on config file to update username as well as password (pull request)
Category:
Patch by: [github.com profile] cesy
Description: As you might have seen go by, there is a bit of an issue with a confusing proliferation of config files. While a permanent solution is worked on, some comments have been added to clarify what you need to change where in order to have a working Dreamhack.

Issue 1780: Language around resetting passwords is inconsistent about what actually happens (pull request)
Category:
Patch by: [github.com profile] pinterface
Description: This had actually been fixed in production, i.e. on Dreamwidth proper! It just... hadn't been fixed on Dreamhacks. Now it has, so that language is (a) less confusing and (b) more accurate.

Issue 1786: Clean up move of autogrow after dw-free #1786 (pull request) (nonfree pull request)
Category:
Patch by: [github.com profile] chrisboyle
Description: I mentioned that a thing needed to happen in dw-nonfree because of DW logo usage? Yeah. This is that.

Issue 1787: Some ML item codes are over-long (pull request)
Category:
Patch by: [github.com profile] pinterface
Description: Every bit of official Dreamwidth text that isn't in a journal or a community (or, basically, isn't user-generated) is referred to using an ML item code (which in theory means that Dreamwidth is easier to translate, and in practice means the code base is deceptively harder to wrangle than you'd expect, but does mean that, again, you've only got to change things in one place, usually). Some of these codes were, um, longer than the database that stored them could cope with, so the... ends... were... getting... chopped... off...? HAPPILY they were all still unique, so nothing broke, exactly, but this is still Bad Practice and has been Remedied.

Issue 1789: remove backend support for unique-email polls (pull request)
Category:
Patch by: [github.com profile] kareila
Description: ... because these were only ever used for official polls on LiveJournal, where LJ wanted to make sure each person who voted in the poll had a unique e-mail (rather than one person with lots of accounts, all registered to the same address, skewing results unduly), so it's been pulled up and put on the code bonfire because Dreamwidth has never used it and will never use it.

Issue 1789: more code machete in poll code (pull request)
Category:
Patch by: [github.com profile] kareila
Description: That bit of poll code is not used. It has never been used. It does not need to be here. Soon it will have passed emphatically on to the great big code bonfire in the tubes.

Issue 1795: Cleanup 2016q2 (pull request)
Category:
Patch by: [github.com profile] kareila
Description: More tidying!

Issue 1796: copyright dates in footer need updating
Category:
Patch by: [github.com profile] rahaeli
Description: ... to actually include 2016, being as we're getting on for halfway through it.


40 total issues resolved
Contributors: [github.com profile] cesy, [github.com profile] chrisboyle, [github.com profile] dfabulich, [github.com profile] kaberett, [github.com profile] kareila, [github.com profile] me-and, [github.com profile] pinterface, [github.com profile] rahaeli, [github.com profile] zorkian

(... I swear I am never going six weeks between code tours again, I am NICE and DON'T DESERVE THIS...)
azurelunatic: A glittery black pin badge with a blue holographic star in the middle. (Default)

[personal profile] azurelunatic 2016-05-25 07:13 pm (UTC)(link)
SO MUCH COD
musyc: Text: Serpents upon my dirigible (Text: Serpents on dirigible)

[personal profile] musyc 2016-05-25 07:40 pm (UTC)(link)
I only ever understand a quarter of what goes into code tours and bug fixes, but I love reading them. This was a wild ride! XD
musyc: Slytherin text icon: We're all mad here (Slytherin: All mad here)

[personal profile] musyc 2016-05-25 08:06 pm (UTC)(link)
Oh, it's not the explanations! It's my brain. :) The technicalities go past me, but I get the gist in most cases - a Thing was broken and now it is Unbroken. That's good enough for me to say Yay!
kareila: (Default)

[personal profile] kareila 2016-05-26 05:49 am (UTC)(link)
Thank you for the unexpected history lesson :D

[personal profile] pinterface 2016-05-26 05:55 am (UTC)(link)

Oh man, I'm really gonna have egg on my face if that doesn't fix 1501 once it goes live. But assuming it does, I couldn't have done it without the prior debugging efforts of [github.com profile] rahaeli and company, who managed to figure out it was some difference between the plain-text and HTML e-mails. I just happened to be unlucky enough to know entirely too much about e-mail and its failure modes.

Also, you are hilarious and I wish more changelogs were written in this totes awesome style.

[personal profile] pinterface 2016-05-27 03:21 am (UTC)(link)

Multiple times! But all I ever seem to remember from it is "people make mistakes". Which, well, done that a-plenty. :)

denise: Image: Me, facing away from camera, on top of the Castel Sant'Angelo in Rome (Default)

[staff profile] denise 2016-05-26 12:04 pm (UTC)(link)
Point of order! #1742 is actually about the directory, not site search. Site search is fairly well behaved and not at all an eldritch horror.

(Very easy mistake to make, given that we have eighteen billion different ways to search the site, sigh. Relevant XKCD.)

The description for #1762 had me cackling. (I have always thought of the admin console as a very well-dressed butler.)

PS I forgot to say thank you for doing this: thank you for doing this!
Edited 2016-05-26 12:04 (UTC)
woggy: (Hanging Frog)

[personal profile] woggy 2016-05-26 01:36 pm (UTC)(link)
i am gently amused that you can claim anything in this site's codebase to not be an eldritch horror, and keep a straight face while doing so.

(though certainly some parts are more involved than others)
denise: Image: Me, facing away from camera, on top of the Castel Sant'Angelo in Rome (Default)

[staff profile] denise 2016-05-26 01:55 pm (UTC)(link)

No seriously, site search is a fairly straightforward and reasonably understandable thing! Don't give people an unreasonable impression of things -- we have bad spots but it's not ALL that bad. :P

woggy: (Small Frog)

[personal profile] woggy 2016-05-26 01:57 pm (UTC)(link)
i stand (sheepishly) corrected, then.
denise: Image: Me, facing away from camera, on top of the Castel Sant'Angelo in Rome (Default)

[staff profile] denise 2016-05-26 04:17 pm (UTC)(link)

You can mock the translation system instead, that's just fucked. ;)

(Although I keep telling people there were very good reasons for each of the decisions. It's just taken collectively that it gets weird...)

zaluzianskya: shion tsuchiya looking like a nerd (10-4!)

[personal profile] zaluzianskya 2016-05-27 12:03 am (UTC)(link)
:D My Teeny Tinies variants, yay!
denise: Image: Me, facing away from camera, on top of the Castel Sant'Angelo in Rome (Default)

[staff profile] denise 2016-05-27 12:05 am (UTC)(link)

Thank you for reminding me about them! I'm sorry again that they got et in the Bugzilla crash. :)

zaluzianskya: (Default)

[personal profile] zaluzianskya 2016-05-27 12:07 am (UTC)(link)
It's no problem. You and everyone else here work so hard and have so much on your plates, it's no wonder some things slip through the cracks.
Edited 2016-05-27 00:07 (UTC)
denise: Image: Me, facing away from camera, on top of the Castel Sant'Angelo in Rome (Default)

[staff profile] denise 2016-05-27 12:10 am (UTC)(link)

oh god let's not talk about how my inbox is the place where things go to DIE

brainwane: The last page of the zine (cat)

HTTPS & search

[personal profile] brainwane 2016-05-27 11:47 am (UTC)(link)
Thank you all, as always, for your work. Thank you especially for your HTTPS work -- you have fixed all the HTTPS bugs I have filed and it is so helpful to me. I'm in a hotel right now on its wifi and I can use Dreamwidth with way less security worry because of your work!

I'd be interested in hearing more about Site Search....
denise: Image: Me, facing away from camera, on top of the Castel Sant'Angelo in Rome (Default)

Re: HTTPS & search

[staff profile] denise 2016-05-27 04:02 pm (UTC)(link)

Site search runs on Sphinx!