momijizukamori: Grey tabby cat with paws on keyboard and mouse. The text reads 'code cat is on the job', lolcats-style (CODE CAT)
Cocoa ([personal profile] momijizukamori) wrote in [site community profile] dw_dev2021-01-30 03:25 pm
Entry tags:

Code Tour (8/14/20 - 1/29/21)

First new code tour of the year!


Issue 142: Tropos: Limit canvas border positioning hack to screen only (pull request) (nonfree pull request)
Category: Site beautification, bug-squashing
Patch by: [github.com profile] nfagerlund
Description: Tropospherical uses some fancy CSS tricks to be both pleasing to the eye and easily-navigable to screenreaders, and it turns out of one those tricks caused everything after the first page to get cut off if you printed it. This fix limits that tweak to not applying to the view printers (real or virtual) see.

Issue 2801: Make site-schemed comment page links nicer (pull request)
Category: Site beautification
Patch by: [github.com profile] rshatch
Description: When we we pulled the new Foundation-based site scheme pages out of beta, people very quickly pointed out that the list of comment pages on an entry looked 1) different and 2) also messier and harder to see. This adds some new styling to pull in what people liked about the old version, while also bringing it more in line with how we style page links elsewhere in the site.

Issue 2827: get JS test suite working again (pull request)
Category: Bug-squashing, code tidying
Patch by: [github.com profile] kareila
Description: Tests are good! Tests help find bugs in code! They won't help if they don't actually work, though. Now our Javascript test suite functions again.

Issue 2829: Stop "closing" `<br>` tags at the ends of paragraphs (pull request)
Category: HTML parsing is hard
Patch by: [github.com profile] nfagerlund
Description: <br> is a whole tag on it's own, but part of the HTML cleaner didn't know that and kept trying to close them anyway. This has been fixed.

Issue 2831: Two minor reply form tweaks (pull request)
Category: Site beautification
Patch by: [github.com profile] nfagerlund
Description: Some small tweaks to the font used in comment form text boxes, and to the width of the comment form in deeply nested comments.

Issue 2832: "Preview comment" drops reason-for-edit since last code push (pull request)
Category: Bug-squashing
Patch by: [github.com profile] nfagerlund
Description: After our comment code cleanup, if you previewed an edit to a comment, the form would lose anything you put into the 'edit reason' field - the old code preserved it by doing some weird obtuse stuff, which is why we didn't catch it ahead of time.

Issue 2833: mobile post page needs updating for new password checking code (pull request)
Category: Bug-squashing, security fixes
Patch by: [github.com profile] kareila
Description: There's an extremely light-weight 'mobile' site view available at https://www.dreamwidth.org/mobile/ - when we upgraded the password mechanism, we missed the login page here to add the new logic to, so trying to log in there would error. Now it will not.

Issue 2835: Add a shortcut for session msg + redirect pattern (pull request)
Category: Making devs' lives easier
Patch by: [github.com profile] rshatch
Description: Some small backend helper functions that make it easier to use session messages in other code.

Issue 2839: Fix content centering in Gradation Horizontal (pull request)
Category: Site beautification
Patch by: [github.com profile] nfagerlund
Description: When we pulled more Foundation-ized components out of beta, we discovered that Gradation Horizontal had all it's content shoved to the left side, leaving a big section of empty space on the right side of the page. Now it's centered instead.

Issue 2840: Icon components (pull request)
Category: Code tidying, making devs' lives easier
Patch by: [github.com profile] momijizukamori
Description: Basically every place that used the icon browser kind of... implemented it's own version of markup for it, which made it very hard to keep all of them in sync. This moves them into reusable components, so it's easy to make changes to it.

Issue 2841: reports of anonymous comment spam disappearing into the ether? (pull request)
Category: Bug-squashing
Patch by: [github.com profile] nfagerlund
Description: When we cleaned up the comment form code, we accidentally messed up the bit that was responsible for recording the IPs of anonymous comments in the database, which meant that trying to report them as spam failed. No more!

Issue 2842: Tag closer adding `</poll-3>` tags after polls (pull request)
Category: HTML parsing is hard
Patch by: [github.com profile] nfagerlund
Description: When polls get posted in a journal, they get converted on the backend to a special <poll-###> tag so that the poll markup can't be edited after it's posted. The HTML cleaner was being over-zealous and trying to close these empty tags, which it really didn't need to do.

Issue 2845: The Squish, Part 4 (pull request)
Category: Site beautification
Patch by: [github.com profile] nfagerlund
Description: In his constant quest to make oversized images not completely blow out the entire page, while still giving artists the ability to control how their work displays, [github.com profile] nfagerlund has added the following changes to how we handle oversized images in site pages: 1) tall skinny images (like vertical comic strips) will no longer try to fit the entire vertical height on the screen, 2) any image with inline style tags is exempted from the shrinker code (because it indicates someone is trying to do something very specific), and 3) max zoomed in size will now respect width/height attributes on the image.

Issue 2847: Force markup FAQ link to open in new tab/window (pull request)
Category: Bug-squashing
Patch by: [github.com profile] momijizukamori
Description: When we added easier access to the various site markup formats, we added an FAQ entry with more info about them, and linked it on the new entry page and comment components. Unfortunately we forgot to specify that the link should open in a new tab/window (depending on your browser settings), so it would navigate you away from the page where you had maybe started writing an entry/comment. Now it properly opens elsewhere instead of replacing your current page.

Issue 2848: misc. cleanup from August (pull request)
Category: Code tidying
Patch by: [github.com profile] kareila
Description: A bunch of clean up that fixes some more warnings and removes unused bits of code.

Issue 2849: widen ip columns in database tables (pull request)
Category: Future-proofing
Patch by: [github.com profile] kareila
Description: Look, I don't pretend to fully understand all of IPv6. But I do know IPv6 addresses are longer than IPv4 ones, which means if we want to support them in the database, some database columns need to be bigger.

Issue 2851: reformat converted FAQ Search page (pull request)
Category: Site beautification
Patch by: [github.com profile] kareila
Description: We converted the FAQ Search page to Foundation, but it was just using the default Foundation form styling, which tries to make all input boxes as wide as possible, which is.... not always a great look. This adds some tweaks to make the layout nicer.

Issue 2854: update year in copyright footer
Category: Kicking 2020 to the curb
Patch by: [github.com profile] rahaeli
Description: New year, new copyright date!

Issue 2855: Use Math::Random::Secure for auth generation (pull request)
Category: Future-proofing, security fixes
Patch by: [github.com profile] rshatch
Description: We use randomly generated numbers in a bunch of places in the code base, among them, generating auth tokens for reply-by-email, and for session cookies. True randomness is hard to do, and very expensive computationally, so there's a lot of ways to get 'good-enough' randomness, with various degrees of quality. The way we were generating random numbers was one of the less-good versions, which meant that theoretically it was possible, with enough data, to predict what numbers would be generated next. In practicality, making these predictions is pretty hard, so it's incredibly unlikely anyone actually did so for DW, but it's better to be cautious for authentication-related stuff. We now use a more secure generator function for random numbers used for that!

Issue 2858: make sure the initial system user is associated with a journal style (pull request)
Category: Bug-squashing, making devs' lives easier
Patch by: [github.com profile] kareila
Description: The scripts that create a new Dreamwidth setup add an initial 'system' user. Unfortunately they never add a journal style to that user account, which meant if you tried to visit the journal, you'd just get a bunch of S2 errors. This adds a step to the scripts that actually sets a journal style for system.


20 total issues resolved
Contributors: [github.com profile] rahaeli, [github.com profile] kareila, [github.com profile] momijizukamori, [github.com profile] nfagerlund, [github.com profile] rshatch

Post a comment in response:

If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org