Entry tags:
Code tour, 23 Jan - 1 Feb 2012
Hello, all! I realized today that our code tour generator had missed a bunch of bugs being resolved, and there had been a few resolved since the last code tour, so I kicked Bugzilla until it turned up all the ones that the code tour generator wasn't picking up.
Behind the cut: 16 bugs for you to peruse. None of these will be live until the next code push.
Bug 4302: Form for editing entry shows up even when you don't own the journal in question
Category: Making things make sense
Patch by:
fu
Description: If you manually construct the URL to edit a public entry that isn't yours, you'll be shown the entry editing page with all the buttons greyed out. (You can't see locked entries this way -- only entries that you were already able to see -- but still.) This patch doublechecks that you own the entry (or can manage it somehow) and doesn't show you the form if you can't actually make any changes.
Bug 4262: Add Tumblr to Other Sites in Profile
Category: One-Stop InternetShopping Identity
Patch by:
ninetydegrees
Suggested by:
faye
Description: This will add Tumblr to the list of sites you can link to on your profile.
Bug 4262: Add Plurk to Other Sites in Profile
Category: One-Stop InternetShopping Identity
Patch by:
ninetydegrees
Suggested by:
stormy
Description: Same as above, only with Plurk.
Bug 4262: Add Pinboard to Other Sites in Profile
Category: One-Stop InternetShopping Identity
Patch by:
ninetydegrees
Suggested by:
helens78
Description: Same as above, only with Pinboard. (Sensing a theme here?)
Bug 4258: linking to pinboard accounts using the <user name> tag
Category: One Big Happy Internet
Patch by:
ninetydegrees
Suggested by:
damalur
Description: This adds Pinboard to the services that can be used in the <user name=foo site=bar> tag.
Bug 4234: Linking to usernames on fanfiction.net
Category: One Big Happy Internet
Patch by:
ninetydegrees
Suggested by:
xwingace
Description: And this does the same for fanfiction.net! (And as
fu said when committing it, it looks so weird to see the site referred to as just 'fanfiction' without the '.net' in the backend code. Heh.)
Bug 4246: Manage Circle success page: separate links to access filters and subscription filters
Category: Making things make sense
Patch by:
ninetydegrees
Suggested by:
ninetydegrees
Description: This adds a link to managing reading filters onto the success page you get after making changes on your Manage Circle page. (Previously it was just a link to the posting filters.)
Bug 4230: Fix various my/if constructions
Category: Backend, avoiding future bugs
Patch by:
sophie
Description: The short version of this bug: we fixed some code syntax to hopefully prevent glitches and weird bugs in the future.
The short version of this bug for coders: this caught a few of the other cases where variables were being declared with a postfix conditional, which is bad (perl assigns that a global scope and bad things happen).
The long version of this bug, for non-coders: Before you use a variable in your code, you have to define it (in order to tell the computer that this isn't just a random word you're throwing in there, it's intended to be a variable). In Perl, you usually do this by declaring it with a "my" statement, and you can combine declaring the variable with assigning it an initial value: for instance, if I wanted to tell the computer I wanted to use the $community variable, and I wanted it to initially have the value of "dw-dev", the code might look something like
Sometimes, though, you want to only give a variable a certain value if something else is true -- let's say we only want $community to be "dw-dev" if another variable, $created, is true. The temptation is to write the variable definition and the truth check in the same line, like such:
So, instead of declaring the variable and operating on it in the same line, you split it up into two lines:
*insert "The more you know!" placard here*
Bug 4227: Dusty Foot: new themes
Category: The Pretty
Patch by:
delladea
Themes by:
nornoriel
Description: This adds six new themes for the Dusty Foot style.
Bug 4226: Practicality: new themes
Category: The Pretty
Patch by:
delladea
Themes by:
inoru_no_hoshi and
nornoriel
Description: This adds five new themes for the Practicality style.
Bug 4212: Crisped: new themes
Category: The Pretty
Patch by:
delladea
Themes by:
timeasmymeasure and
nornoriel
Description: Ten new themes for the Crisped style.
Bug 4188: Deleting Layers: use pop-up confirmation instead of loading a new page
Category: Usability
Patch by:
ninetydegrees
Description: This switches the behavior when deleting a layer (in the customization area) to match the behavior when deleting a style, for consistency.
Bug 3996: add explicit comment hierarchy to S2
Category: Accessibility
Patch by:
allen
Description: A while back, we added comment hierarchy indicators -- a numbered outline of which comment is a reply to which other comment, allowing screenreader users to have access to information that was previously only conveyed visually (by using indents). The first step was to add those outline indicators to comments when viewed in the site skin; this bug adds that information into custom comment pages as well. (You can turn on the comment hierarchy indicators on the Display tab of Manage Settings.)
Bug 3286: Style Comments Page with Outline Indicators in Place of Indents
Category: Accessibility
Patch by:
allen
Description: And this is the bug for the comment indicators in general, which we'd previously resolved but which got reopened to add the indicators to collapsed comments also.
Bug 3719: Style custom /icons pages
Category: The Pretty
Patch by:
ninetydegrees
Description: And with this patch,
ninetydegrees gets the "annoying and tedious tons-of-work" award for this month! This is part of the effort to let you display your icons page in your journal style rather than the site skin (if you want; it'll be a setting). We needed to add in styling for that new page into every single style we have. Phew.
Bug 3581: jQuerify cut expander
Category: Modernization
Patch by:
exor674
Description: This bug was actually patched a while ago, but we hadn't gotten around to resolving it! This updates the cut tag expander to use jQuery, a more modern javascript library.
Behind the cut: 16 bugs for you to peruse. None of these will be live until the next code push.
Bug 4302: Form for editing entry shows up even when you don't own the journal in question
Category: Making things make sense
Patch by:
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Description: If you manually construct the URL to edit a public entry that isn't yours, you'll be shown the entry editing page with all the buttons greyed out. (You can't see locked entries this way -- only entries that you were already able to see -- but still.) This patch doublechecks that you own the entry (or can manage it somehow) and doesn't show you the form if you can't actually make any changes.
Bug 4262: Add Tumblr to Other Sites in Profile
Category: One-Stop Internet
Patch by:
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Suggested by:
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Description: This will add Tumblr to the list of sites you can link to on your profile.
Bug 4262: Add Plurk to Other Sites in Profile
Category: One-Stop Internet
Patch by:
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Suggested by:
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Description: Same as above, only with Plurk.
Bug 4262: Add Pinboard to Other Sites in Profile
Category: One-Stop Internet
Patch by:
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Suggested by:
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Description: Same as above, only with Pinboard. (Sensing a theme here?)
Bug 4258: linking to pinboard accounts using the <user name> tag
Category: One Big Happy Internet
Patch by:
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Suggested by:
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Description: This adds Pinboard to the services that can be used in the <user name=foo site=bar> tag.
Bug 4234: Linking to usernames on fanfiction.net
Category: One Big Happy Internet
Patch by:
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Suggested by:
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Description: And this does the same for fanfiction.net! (And as
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Bug 4246: Manage Circle success page: separate links to access filters and subscription filters
Category: Making things make sense
Patch by:
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Suggested by:
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Description: This adds a link to managing reading filters onto the success page you get after making changes on your Manage Circle page. (Previously it was just a link to the posting filters.)
Bug 4230: Fix various my/if constructions
Category: Backend, avoiding future bugs
Patch by:
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Description: The short version of this bug: we fixed some code syntax to hopefully prevent glitches and weird bugs in the future.
The short version of this bug for coders: this caught a few of the other cases where variables were being declared with a postfix conditional, which is bad (perl assigns that a global scope and bad things happen).
The long version of this bug, for non-coders: Before you use a variable in your code, you have to define it (in order to tell the computer that this isn't just a random word you're throwing in there, it's intended to be a variable). In Perl, you usually do this by declaring it with a "my" statement, and you can combine declaring the variable with assigning it an initial value: for instance, if I wanted to tell the computer I wanted to use the $community variable, and I wanted it to initially have the value of "dw-dev", the code might look something like
my $community = "dw-dev";
.Sometimes, though, you want to only give a variable a certain value if something else is true -- let's say we only want $community to be "dw-dev" if another variable, $created, is true. The temptation is to write the variable definition and the truth check in the same line, like such:
my $community = "dw-dev" if $created;
If you do it that way, though, you run into a quirk in Perl where the variable is created with the wrong scope (scope is totally outside my capability to explain this in a simple way, heh) and doesn't get properly cleared when that section of code stops running. This can result in very weird things happening elsewhere in the code: if you tried to declare another local $community variable elsewhere, the code freaks out because it thinks it's already got a $community variable (with the wrong thing in it).So, instead of declaring the variable and operating on it in the same line, you split it up into two lines:
my $community; $community = "dw-dev" if $created;
We'd previously fixed a lot of those my/if constructions when we first realized they were causing problems, but we missed a few; this catches the rest of them.*insert "The more you know!" placard here*
Bug 4227: Dusty Foot: new themes
Category: The Pretty
Patch by:
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Themes by:
![[profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Description: This adds six new themes for the Dusty Foot style.
Bug 4226: Practicality: new themes
Category: The Pretty
Patch by:
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Themes by:
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
![[profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Description: This adds five new themes for the Practicality style.
Bug 4212: Crisped: new themes
Category: The Pretty
Patch by:
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Themes by:
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
![[profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Description: Ten new themes for the Crisped style.
Bug 4188: Deleting Layers: use pop-up confirmation instead of loading a new page
Category: Usability
Patch by:
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Description: This switches the behavior when deleting a layer (in the customization area) to match the behavior when deleting a style, for consistency.
Bug 3996: add explicit comment hierarchy to S2
Category: Accessibility
Patch by:
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Description: A while back, we added comment hierarchy indicators -- a numbered outline of which comment is a reply to which other comment, allowing screenreader users to have access to information that was previously only conveyed visually (by using indents). The first step was to add those outline indicators to comments when viewed in the site skin; this bug adds that information into custom comment pages as well. (You can turn on the comment hierarchy indicators on the Display tab of Manage Settings.)
Bug 3286: Style Comments Page with Outline Indicators in Place of Indents
Category: Accessibility
Patch by:
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Description: And this is the bug for the comment indicators in general, which we'd previously resolved but which got reopened to add the indicators to collapsed comments also.
Bug 3719: Style custom /icons pages
Category: The Pretty
Patch by:
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Description: And with this patch,
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Bug 3581: jQuerify cut expander
Category: Modernization
Patch by:
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Description: This bug was actually patched a while ago, but we hadn't gotten around to resolving it! This updates the cut tag expander to use jQuery, a more modern javascript library.
no subject
Wait, isn't the problem that if the "if" statement isn't true, you just never declare the variable and thus if you later check for its value the code goes all "What do you mean, $community? I have no idea what that means!"
no subject
no subject
In pure Perl, it seems fine and is treated as undef... in *BML*, it gets an old value.
no subject
no subject
(A lot of our BML pages don't have use strict)
no subject
no subject
no subject
no subject