Entry tags:
Code Tour, December 20, 2010-January 02, 2011
I'm a newbie to the Dreamwidth community and answered the call when volunteers were being sought for this here code tour thing :) So... here goes!
Bug 2931: Don't suggest adding an interest to profile if user already has that interest
Category: Misc UI/Frontend
Patch by:
kareila
Description: Searching for interests at http://www.dreamwidth.org/interests creates a list of communities and users. Under the user list, labeled "Results for people interested in (interest)", there used to be a suggestion to add that interest to your own list of interests even if you already had it in there. This bug makes Dreamwidth an iota smarter and actually checks if you actually posess this interest before suggesting you add it.
Bug 3328: more undefined warnings in s2 repo
Category: Misc Backend
Patch by:
kareila
Description: When defining an Object Oriented class module in Perl, it won't stop you from being able to call functions without actually following the rules of Object Orientation. Perl is a pretty smart language, so it figures out whether you've followed the rules of OO or if you're just being a cow[boy|girl]. The point of this bug was to quiet some of the warnings that occur when cow[boy|girl] code tries to use the Tokenizer or NodeTerm modules. FYI, maybe TMI, but you can tell the difference between if something is being called as a method (using OO) or if it's being called as a function (cow[boy|girl]) by the Perl operator used to do the calling. If you see :: or just a function name followed by parens (), then it's being called as a function. If you see the -> operator, it's being called as a method. The thing on the left of the -> is a class instance, aka your very own local version of that library in the form of a variable.
Bug 3350: hush warnings when loading S2 entry preview
Category: Misc Backend
Patch by:
kareila
Description: This bug addresses a function that converts the timestamp for journal entry previews using S2 templates from the format stored in Dreamwidth's database to the S2 template format. Unfortunately it was setting a bunch of values even when no value was defined in the database. When the code tried to perform additional operations on these values, it was complaining that they weren't set. This change sets any unset values to 0 rather than just leaving them unset, thus appeasing the warning gods.
Bug 3345: move LJ::user_search_display to weblib.pl
Category: Misc Backend
Patch by:
kareila
Description: The user_search_display function was moved from User.pm to improve future compatibility with the BML to TT conversion. The sorting of found users was modified to suppress some warnings that cropped up as a result of the move.
Bug 1109: directory search results: short/missing userpics misaligned
Category: Search
Patch by:
kareila
Description: When performing a user search, results including users that have shorter user pics (including no user pic) now line up correctly!
Bug 3351: hush warnings in DayPage.pm
Category: Misc Backend
Patch by:
kareila
Description: The date formatting was issuing warnings when the match conditions were being run on undefined values. The fix was to check that the value the match is performed on is defined. No user impact here, just less noisy logs.
Bug 3352: t/00-compile.t fails with LJ/UserSearch.pm installed
Category: Misc Backend
Patch by:
kareila
Description: *.t files are part of Perl unit testing modules. These are used in the Dreamwidth codebase to make sure all the required libraries load properly and report any errors. LJ/UserSearch.pm contained a library path with "-" characters that was conflicting with the require statement that drove the unit test. The fix was to trick the require by disambiguating the module name.
Bug 2839: Display tags on the post comment page
Category: Journal contents
Suggested by:
aithine
Patch by:
kareila
Description: The post comment page wasn't showing tags for the entry because the tag data was being explicitly removed from the
page content. The fix was to remove the code that explicitly deleted the tag data.
Bug 3360: Custom colors not showing up on manage/circle/add
Category: Circle/Relationships
Patch by:
sophie
Description: A bug to remove tables in layouts unintentionally broke the feature that lets you assign custom colors when adding friends to your Reading page. The cause was an unescaped ' that broke Javascript; the fix was to properly escape it.
Bug 3353: hush warnings in AtomAPI.pm
Category: APIs: RPC/XML/Flat
Patch by:
kareila
Description: Fix for a couple of noisy warnings. Check if a version is assigned because doing the comparison on it was throwing an error when it wasn't set. Also explicitly assign a 0 value to a flag if it's false for determining how to handle line breaks in the formatting.
Bug 3358: hush warnings when editing profile
Category: Misc Backend
Patch by:
kareila
Description: This fix did a few things, again mainly backend. First off, when passing arguments to functions in Perl, as a style note it's generally better and more maintainable to group the assignments in one line rather than assign them individually with "shift". When looking up the provider for the text message feature, certain values are not passed in to the subroutines, the sub just returns nothing rather than attempting to match on an undefined variable.
Bug 3364: Non-ASCII characters in official theme names may not be loaded properly
Category: S2 Backend
Patch by:
afuna
Description: Theme names using non-ascii characters weren't displaying properly, the fix was to provide the encoding to the text editor.
Bug 3285: Funky Circles: 5 new themes by ninetydegrees
Category: Style System
Patch by:
ninetydegrees
Description: Moar themes! Whee!
Bug 3349: refactor logic for $u->should_show_in_search_results
Category: Misc Backend
Patch by:
kareila
Description: OK nothing was actually broken here but the way things like if a user should be visible in the search or if the content is only appropriate for 13+ were being determined were munged into the user list creation. This refactor just moves them into their own space so it's clearer to other folks looking at the code what's happening.
Bug 3233: Custom values not possible for dropdowns
Category: S2 Backend
Patch by:
fu
Description: Adds custom properties template designers may have specified to the pop up menu of available properties in the advanced editing page of the S2 templates. These are only available if "allow others" is enabled on the property.
Bug 3355: change DW address on site
Category: General/Unknown
Patch by:
fu
Description: The billing address on the payments page now is correct!
Bug 168: New implementation to overriding other users style choices.
Category: Misc UI/Frontend
Patch by:
foxfirefey
Description: Style choices are now stored in user preferences! Previously style information was handled through the URL which meant if you shared a link, they would be forced to view the page in whatever your style was. This feature hasn't changed and a URL with a style specified takes precedence over any other settings. What HAS changed is the style information isn't automatically tacked onto the URL and is properly tracked in your display preferences.
Bug 3291: HTML on the Latest Things page
Category: Misc UI/Frontend
Suggested by:
alexseanchai
Patch by:
fu
Description: Funky HTML code on one entry was affecting entries below. The fix for this was actually part of another bug which was focused on cleaning up html handling in general.
Bug 3338: Previous Entry and Next Entry arrows don't work on admin-only entries
Category: Misc UI/Frontend
Patch by:
fu
Description: When managing entries for a community, the permissions checking was only checking that the user matched the current journal. The journal wasn't showing entries that were public to community members. This was fixed by checking that the user has admin access to the community.
Bug 2875: Your Layers page: sort by name instead of number
Category: S2 Backend
Suggested by:
ninetydegrees
Patch by:
fu
Description: When viewing layers in the advanced customization page, they were being sorted by an id number. In an effort to make this page user friendly, the layers are now sorted by name.
Bug 3211: Instant Poll Reply doesn't work in inbox notifications
Category: Inbox/Notifications
Patch by:
fu
Description: Voting on a poll from an Inbox message wasn't working because of an issue with nested forms. The workaround for this was to add an outer form to the poll forrm, which solved the form rendering problem.
Bug 3005: Merge BMAX_GRPNAME and BMAX_GRPNAME2, and ditto for CMAX_GRPNAME and CMAX_GRPNAME2
Category: Modernization
Patch by:
fu
Description: Remove/consolidate some constant variables on the backend that aren't currently being used.
Bug 3022: Autoformatting shows in Inbox when it shouldn't
Category: Inbox/Notifications
Patch by:
fu
Description: Entries from users that had autoformatting enabled were still showing up with line breaks for users that had disabled autoformatting. To fix this, the functionality that renders the entries is passed a formatting option. The result? Line breaks won't show up if you don't want them there.
Bug 2359: Community polls should not be affected by personal journal bannings
Category: Communities
Suggested by:
zvi
Patch by:
fu
Description: If you've banned a user from your journal, when you post a poll in a community to which you both belong and have full rights, that user can now respond to the poll. Basically the banning is only being checked against journals now, not users.
Bug 3366: Update the copyright footer to include 2011
Category: General/Unknown
Patch by:
fu
Description: Hey everyone, it's not 2010 anymore! Finally someone bothered to tell the DW copyright footer :)
Bug 2865: style=mine in Inbox
Category: Inbox/Notifications
Suggested by:
cheyinka
Patch by:
foxfirefey
Description: See the description for bug#168, same thing applies here.
Thanks to the folks in #dreamwidth for answering my nitpicky questions! I look forward to contributing some backend codez to the project and hopefully doing more code tours!
Bug 2931: Don't suggest adding an interest to profile if user already has that interest
Category: Misc UI/Frontend
Patch by:
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Description: Searching for interests at http://www.dreamwidth.org/interests creates a list of communities and users. Under the user list, labeled "Results for people interested in (interest)", there used to be a suggestion to add that interest to your own list of interests even if you already had it in there. This bug makes Dreamwidth an iota smarter and actually checks if you actually posess this interest before suggesting you add it.
Bug 3328: more undefined warnings in s2 repo
Category: Misc Backend
Patch by:
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Description: When defining an Object Oriented class module in Perl, it won't stop you from being able to call functions without actually following the rules of Object Orientation. Perl is a pretty smart language, so it figures out whether you've followed the rules of OO or if you're just being a cow[boy|girl]. The point of this bug was to quiet some of the warnings that occur when cow[boy|girl] code tries to use the Tokenizer or NodeTerm modules. FYI, maybe TMI, but you can tell the difference between if something is being called as a method (using OO) or if it's being called as a function (cow[boy|girl]) by the Perl operator used to do the calling. If you see :: or just a function name followed by parens (), then it's being called as a function. If you see the -> operator, it's being called as a method. The thing on the left of the -> is a class instance, aka your very own local version of that library in the form of a variable.
Bug 3350: hush warnings when loading S2 entry preview
Category: Misc Backend
Patch by:
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Description: This bug addresses a function that converts the timestamp for journal entry previews using S2 templates from the format stored in Dreamwidth's database to the S2 template format. Unfortunately it was setting a bunch of values even when no value was defined in the database. When the code tried to perform additional operations on these values, it was complaining that they weren't set. This change sets any unset values to 0 rather than just leaving them unset, thus appeasing the warning gods.
Bug 3345: move LJ::user_search_display to weblib.pl
Category: Misc Backend
Patch by:
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Description: The user_search_display function was moved from User.pm to improve future compatibility with the BML to TT conversion. The sorting of found users was modified to suppress some warnings that cropped up as a result of the move.
Bug 1109: directory search results: short/missing userpics misaligned
Category: Search
Patch by:
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Description: When performing a user search, results including users that have shorter user pics (including no user pic) now line up correctly!
Bug 3351: hush warnings in DayPage.pm
Category: Misc Backend
Patch by:
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Description: The date formatting was issuing warnings when the match conditions were being run on undefined values. The fix was to check that the value the match is performed on is defined. No user impact here, just less noisy logs.
Bug 3352: t/00-compile.t fails with LJ/UserSearch.pm installed
Category: Misc Backend
Patch by:
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Description: *.t files are part of Perl unit testing modules. These are used in the Dreamwidth codebase to make sure all the required libraries load properly and report any errors. LJ/UserSearch.pm contained a library path with "-" characters that was conflicting with the require statement that drove the unit test. The fix was to trick the require by disambiguating the module name.
Bug 2839: Display tags on the post comment page
Category: Journal contents
Suggested by:
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Patch by:
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Description: The post comment page wasn't showing tags for the entry because the tag data was being explicitly removed from the
page content. The fix was to remove the code that explicitly deleted the tag data.
Bug 3360: Custom colors not showing up on manage/circle/add
Category: Circle/Relationships
Patch by:
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Description: A bug to remove tables in layouts unintentionally broke the feature that lets you assign custom colors when adding friends to your Reading page. The cause was an unescaped ' that broke Javascript; the fix was to properly escape it.
Bug 3353: hush warnings in AtomAPI.pm
Category: APIs: RPC/XML/Flat
Patch by:
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Description: Fix for a couple of noisy warnings. Check if a version is assigned because doing the comparison on it was throwing an error when it wasn't set. Also explicitly assign a 0 value to a flag if it's false for determining how to handle line breaks in the formatting.
Bug 3358: hush warnings when editing profile
Category: Misc Backend
Patch by:
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Description: This fix did a few things, again mainly backend. First off, when passing arguments to functions in Perl, as a style note it's generally better and more maintainable to group the assignments in one line rather than assign them individually with "shift". When looking up the provider for the text message feature, certain values are not passed in to the subroutines, the sub just returns nothing rather than attempting to match on an undefined variable.
Bug 3364: Non-ASCII characters in official theme names may not be loaded properly
Category: S2 Backend
Patch by:
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Description: Theme names using non-ascii characters weren't displaying properly, the fix was to provide the encoding to the text editor.
Bug 3285: Funky Circles: 5 new themes by ninetydegrees
Category: Style System
Patch by:
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Description: Moar themes! Whee!
Bug 3349: refactor logic for $u->should_show_in_search_results
Category: Misc Backend
Patch by:
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Description: OK nothing was actually broken here but the way things like if a user should be visible in the search or if the content is only appropriate for 13+ were being determined were munged into the user list creation. This refactor just moves them into their own space so it's clearer to other folks looking at the code what's happening.
Bug 3233: Custom values not possible for dropdowns
Category: S2 Backend
Patch by:
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Description: Adds custom properties template designers may have specified to the pop up menu of available properties in the advanced editing page of the S2 templates. These are only available if "allow others" is enabled on the property.
Bug 3355: change DW address on site
Category: General/Unknown
Patch by:
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Description: The billing address on the payments page now is correct!
Bug 168: New implementation to overriding other users style choices.
Category: Misc UI/Frontend
Patch by:
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Description: Style choices are now stored in user preferences! Previously style information was handled through the URL which meant if you shared a link, they would be forced to view the page in whatever your style was. This feature hasn't changed and a URL with a style specified takes precedence over any other settings. What HAS changed is the style information isn't automatically tacked onto the URL and is properly tracked in your display preferences.
Bug 3291: HTML on the Latest Things page
Category: Misc UI/Frontend
Suggested by:
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Patch by:
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Description: Funky HTML code on one entry was affecting entries below. The fix for this was actually part of another bug which was focused on cleaning up html handling in general.
Bug 3338: Previous Entry and Next Entry arrows don't work on admin-only entries
Category: Misc UI/Frontend
Patch by:
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Description: When managing entries for a community, the permissions checking was only checking that the user matched the current journal. The journal wasn't showing entries that were public to community members. This was fixed by checking that the user has admin access to the community.
Bug 2875: Your Layers page: sort by name instead of number
Category: S2 Backend
Suggested by:
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Patch by:
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Description: When viewing layers in the advanced customization page, they were being sorted by an id number. In an effort to make this page user friendly, the layers are now sorted by name.
Bug 3211: Instant Poll Reply doesn't work in inbox notifications
Category: Inbox/Notifications
Patch by:
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Description: Voting on a poll from an Inbox message wasn't working because of an issue with nested forms. The workaround for this was to add an outer form to the poll forrm, which solved the form rendering problem.
Bug 3005: Merge BMAX_GRPNAME and BMAX_GRPNAME2, and ditto for CMAX_GRPNAME and CMAX_GRPNAME2
Category: Modernization
Patch by:
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Description: Remove/consolidate some constant variables on the backend that aren't currently being used.
Bug 3022: Autoformatting shows in Inbox when it shouldn't
Category: Inbox/Notifications
Patch by:
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Description: Entries from users that had autoformatting enabled were still showing up with line breaks for users that had disabled autoformatting. To fix this, the functionality that renders the entries is passed a formatting option. The result? Line breaks won't show up if you don't want them there.
Bug 2359: Community polls should not be affected by personal journal bannings
Category: Communities
Suggested by:
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Patch by:
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Description: If you've banned a user from your journal, when you post a poll in a community to which you both belong and have full rights, that user can now respond to the poll. Basically the banning is only being checked against journals now, not users.
Bug 3366: Update the copyright footer to include 2011
Category: General/Unknown
Patch by:
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Description: Hey everyone, it's not 2010 anymore! Finally someone bothered to tell the DW copyright footer :)
Bug 2865: style=mine in Inbox
Category: Inbox/Notifications
Suggested by:
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Patch by:
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Description: See the description for bug#168, same thing applies here.
Thanks to the folks in #dreamwidth for answering my nitpicky questions! I look forward to contributing some backend codez to the project and hopefully doing more code tours!
no subject
no subject
To be fair, it was updated on January 1st - you can't get any earlier than that. :)
no subject
no subject
This is an awesome code tour. Welcome to DW work! (Dear God I can't wait until my internet is fixed and I can get into irc again.)
no subject
no subject
no subject