ursamajor: Tajel on geeks (geeks: love them)
she of the remarkable biochemical capabilities! ([personal profile] ursamajor) wrote in [site community profile] dw_dev2011-03-10 01:30 am
Entry tags:

Code Tour, February 25 - March 9, 2011

Hi, Dreamwidth Devistas! Got a backend-heavy code tour for you this week, so let's get to it! Also, a welcome back to [personal profile] wyntarvox, who gives us five patches this go-round :)



Bug 3542: some AJAX endpoints can return invalid JSON
Category: Misc UI/Frontend
Patch by: [personal profile] fu
Description: Things like same-page comment deletion are handled by AJAX endpoints. This is really a future-proofing bug - Dreamwidth is starting to use jQuery (a JavaScript code library that makes it easy to use nifty front-end interaction), and jQuery is a bit picky about the format in which it accepts certain code, so some Cleanup Was Done.

Bug 3533: Lots of unused JS files in the js repo
Category: Modernization
Patch by: [personal profile] fu
Description: Doing a back-end tidy up - tossing about six dozen inherited and unused files in the trash.

Bug 3487: improve the workflow while using the poll creator
Category: Misc UI/Frontend
Suggested by: [personal profile] ratcreature
Patch by: [personal profile] yvi
Description: Tweaks to the poll creator. Previously, when adding a new question in the poll creator, inserting a question scrolled you back to the top of the page, requiring you scroll back down to find the question you were trying to enter. Now, inserting a question scrolls you to the right place.

Bug 3343: Poll Creator: unclear error message when answer exceeds 255 characters
Category: User documentation
Patch by: [staff profile] denise
Description: Minor text change for an error message in the Poll Creator; this actually changes it in the repository for anybody running their own Dreamwidth clone.

Bug 3500: User tag should allow Twitter as an option
Category: Misc UI/Frontend
Suggested by: [personal profile] eleanorjane
Patch by: [staff profile] denise
Description: Very soon, as of the next code push, you will be able to type <user name=ursamajor site=twitter.com> and it will create a link to that Twitter, like so: [twitter.com profile] ursamajor, except the userhead that's there right now will actually be a Twitter-userhead. Also, the intrepid [staff profile] denise would like you all to know, "Rockin' robin, tweet, tweetely-tweet."

Bug 3519: Use of uninitialized value in weblib.pl
Category: Misc Backend
Patch by: [staff profile] denise
Description: When an entry lacked a subject, this caused a behind-the-scenes error that spams the server's error logs. Many entries lack subjects intentionally; this condition is not an error, so there will no longer be tantrums thrown in the error logs for lack of a subject.

Bug 3539: Make sure method is GET/POST ( unless the controller handles more )
Category: Routing/TT
Patch by: [personal profile] exor674 and [personal profile] fu
Description:

[personal profile] exor674: okay, i have no idea how to explain that in human
[personal profile] ursamajor: ahahaha, that makes me feel better, honestly :D


Crowdsourced from #dreamwidth: Basically, there are certain protocols for transmitting information across the internet. The major ones used on Dreamwidth are GET and POST. The routing-thing was accepting stuff being sent using not just these two protocols, but pretty much any protocol you could make up out there - "it also accepted BLURG, or HAMSTERS, or GIVEMETHEPAGEDAMNIT." So this bug makes the routing-thing be more picky about through which protocols it will accept stuff.

Bug 3547: Need a way to cleanly call controllers from tests
Category: Unknown
Patch by: [personal profile] exor674
Description: There are many things that have to be done in the process of "calling a controller through routing in a non-web environment." (In a web environment, other code, including the web server, deals with it for you.) So organizing these things into one place is useful.

Bug 3305: More ID at the shop transfer confirmation
Category: Payments
Suggested by: [personal profile] zvi
Patch by: [personal profile] kareila
Description: Adds the default icon and "display name" for a given user on the confirmation page when you are transfering Dreamwidth points to them, as additional information for you to double-check their identity before proceeding.

Bug 3531: Old JS libraries don't play nice with other libraries on the page
Category: Modernization
Patch by: [personal profile] fu
Description: We are making way for jQuery, JavaScript code library of Light. (Then how come you had to cast Magic Missile?)

Bug 3545: Make libfunctions > jquery test complete in IE
Category: Unknown
Patch by: [personal profile] fu
Description: IE thinks it's a special snowflake, and doesn't have to implement a function that's listed in the standard for JavaScript. This patch gets around that.

Bug 3528: jQuerify password hashing JS for login
Category: Modernization
Patch by: [personal profile] fu
Description: Makes the code that keeps your password secure on login compatible with the (previously-mentioned in bug 3542) jQuery JavaScript library.

Bug 3475: More scale options allowed in polls
Category: Journal contents
Suggested by: [personal profile] yvi
Patch by: [personal profile] yvi
Description: Adds one more step to the "scale" option in polls - goes from 20 to 21. So, for example, if you wanted a scale that ran from 0% to 100% in 5% increments, there are now enough "steps" to allow for this.

Bug 3548: t/routing.t is getting quite large, split it up.
Category: Routing/TT
Patch by: [personal profile] exor674
Description: In "QA testing" (quality assurance), Dreamwidth runs what are known as "unit tests." One of these tests, the one that makes sure that routing is working, was getting on the large side, so the test has been split into multiple parts.

Bug 3551: t/wtf.t fails in clustered setups
Category: Circle/Relationships
Patch by: [personal profile] fu
Description: Another "unit test" error - the test was broken; now it's fixed.

Bug 3549: Make automatic /foo/ == /foo/index work on '/index'
Category: Routing/TT
Patch by: [personal profile] exor674
Description: Prep work for when the root index page (the one at http://dreamwidth.org/ ) is ported over to the new templating system, the URL system will behave properly.

Bug 1200: separate interest search results for communities vs. users
Category: Search
Patch by: [personal profile] kareila
Description: Sweet! This splits up interest search results for communities vs. users in a more readable fashion.

Bug 3552: Make /create-url.t report failures on more useful line
Category: Misc Backend
Patch by: [personal profile] exor674
Description: Unit tests report failures - but this unit test was complex enough that the way it was reporting the failure made it hard to see exactly where things went wrong. This patch helps pinpoint where the issues are when a test fails.

Bug 3553: Tests which use convenience methods report failures unhelpfully
Category: Misc Backend
Patch by: [personal profile] fu
Description: Same as Bug 3552, just for a different test.

Bug 3529: Crossposts don't delete
Category: Crossposter
Patch by: [personal profile] allen
Description: Crossposted entries weren't deleting on the remote site, and there wasn't an alert for this. Now they are and there is!

Bug 3556: feed-atom.t fails when SITENAMEABBREV is not DW
Category: Misc Backend
Patch by: [personal profile] kareila
Description: Another unit test error! This affects people running their own Dreamwidth clones - the unit test was failing when the variable SITENAMEABBREV was changed from the default "DW" (for "Dreamwidth") to reflect the desired abbreviation for the name of the clone.

Bug 3554: enforce minimum version for Test::More & HTML::TokeParser
Category: Site Administration
Patch by: [personal profile] kareila
Description: Dreamhacks were running older versions of some backend modules than the ones on the live Dreamwidth site; now updated to match.

Bug 2257: Recognize authors in different formats in the feeds we pull in
Category: Feeds
Patch by: [personal profile] kareila
Description: Adding different standard tags for recognizing post authors on RSS and Atom feeds that we syndicate in, so that credit can be attributed more frequently.

Bug 3378: Too many styles error does not tell you how many styles you have
Category: Misc UI/Frontend
Patch by: [personal profile] wyntarvox
Description: "You have too many styles! But we're not going to tell you how many styles you have or what the limit on the number of styles is inline!" Okay, yes, we will. :)

Bug 2917: Mood becomes alt text for default icon
Category: Journal contents
Patch by: [personal profile] wyntarvox
Description: When the default icon was used on a post by selecting "(default)" from the dropdown menu, the title-text didn't display the icon keyword, but the "mood" associated with the post instead. This patch makes it so that the title-text uses "(default)" (the "keyword" selected) rather than the mood.

Bug 3560: Tests shouldn't need the webserver running to run
Category: Modernization
Patch by: [personal profile] fu
Description: One of the tests was trying to run on the webserver when it doesn't need to; it got told to stop doing that.

Bug 3493: Link between Manage Circle and My Account Settings: Notifications
Category: Site Layout/Navigation
Suggested by: [personal profile] azurelunatic
Patch by: [personal profile] wyntarvox
Description: "Subscription" applies to a couple of different major functions on Dreamwidth - both the behavior that lets you see someone on your reading page, and the behavior that lets you get notifications in your email or inbox when Various Things Happen. There are now crosslinks between http://www.dreamwidth.org/manage/settings/?cat=notifications and http://www.dreamwidth.org/manage/circle/edit to help address this confusion when it happens.

Bug 3557: Auto-discovery when creating a feed should use the first available feed, not the last
Category: Feeds
Patch by: [personal profile] fu
Description: Usual practice on external pages that have corresponding RSS feeds is to list the first feed in a list of available feeds as the "preferred" feed; our code was using the last feed. Switched to use the first feed.

Bug 3532: Cannot gift an unknown random user
Category: Payments
Patch by: [personal profile] wyntarvox
Description: Whoops, we accidentally removed the link to gift an unknown random user awhile back. It's been put it back now!

Bug 3394: "Refresh" link at the bottom of the Inbox
Category: Inbox/Notifications
Suggested by: [personal profile] peoppenheimer
Patch by: [personal profile] wyntarvox
Description: "The "Refresh" link currently exists only at the top of the Inbox. If I had a nickel for every time I have scrolled to the top of the page in order to refresh it ..." Same here, so I'm glad that a "Refresh" link is added to the bottom of the Inbox to save me that scrolling. :)

Bug 3243: Need consistent styling across the site
Category: Misc UI/Frontend
Patch by: [personal profile] fu
Description: Cleaning up the code for the various site skins - making them more consistent with each other for easier future development and maintenance.
azurelunatic: Warning: participating in #dw may result in blacking out and discovering yourself as head of a project team. (#dw warning: department head)

[personal profile] azurelunatic 2011-03-10 07:29 am (UTC)(link)
Oh yay, 3487 was just bothering me the other day! ([staff profile] denise, you can go ahead and reject that from the suggestions queue.)
sophie: A cartoon-like representation of a girl standing on a hill, with brown hair, blue eyes, a flowery top, and blue skirt. ☀ (Default)

[personal profile] sophie 2011-03-10 01:41 pm (UTC)(link)
Just a quick note for anybody wondering - currently the twitter.com link in the post is broken because the code hasn't been pushed yet. When the link gets a blue image of the Twitter bird for a userhead in the near future, that's a sign that the code has been pushed, and it'll start working without any edits.

(and I just realised that I don't think we have any equivalent change to alt text to specify that. But I'm not sure how to designate it in the alt text, because not all such links will be broken.)
allen: (crowley)

[personal profile] allen 2011-03-10 02:28 pm (UTC)(link)
Bug 3531 <3 <3
sporky_rat: Text: Who are you? Have I joined a Cult? (cult?)

[personal profile] sporky_rat 2011-03-10 05:29 pm (UTC)(link)
#2917, oh, <3 you, [personal profile] wyntarvox.
poulpette: Stick-figure of a smiling head, raising heart pompoms. Bottom half says YAY!!! (Misc - devs = awesome)

[personal profile] poulpette 2011-03-10 05:40 pm (UTC)(link)
\o/ Yay for 3487.
Also, I'm awarding you the Best Description Award for bug 3539 :D

Bug 3529 is pretty awesome too.
Edited (fixing ugly sentence to make it better.) 2011-03-10 17:43 (UTC)