ilyena_sylph: (Dreamwidth "d", rainbow-colored by Sophie) (Dreamwidth)
ilyena_sylph ([personal profile] ilyena_sylph) wrote in [site community profile] dw_dev2023-06-25 12:39 pm
Entry tags:

Code Tour (2023-03-04 to 2023-06-25)

Hello Interwebs!

It is time for a code tour again, and I'm the fool that volunteered to do it! (I'm pretty sure the devs would almost prefer I didn't, because I have to ask so many questions, but it's kind of fun anyway. Part of the time, I even learn things!)

Our amazing devs have been hard at work to make things better for everyone, here are some of the recent/upcoming changes for your perusal!

Issue 674: standardize option to have navigation links at the top/in header (pull request)
Category: Modernizing!
Patch by: [github.com profile] momijizukamori
Description: For a long time, some layouts had the option to display navigation links (Recent Entries/Archive/Reading/Tags/etc) in the header, and some did not, and you couldn't really tell which did without applying the layout and going in to reorder the modules. So... why not make it a standard option? This is step one of that, which is to say, basically all the layouts that use the common main area/sidebar pattern now have the option to put the navlinks in the header, but it may not look super-nice by default in all of them.

Issue 1339: shop til you drop part 2 (pull request)
Category: Keeping the Lights On
Patch by: [github.com profile] kareila
Description: More minor changes to the shop, most prominently a nice shiny warning to people trying to buy regular paid time for a premium account.

Issue 2455: additional external sites: FurAffinity and ArtStation (pull request)
Category: All the Places!
Patch by: [github.com profile] cmho
Description: Congratulations artists and furries and furry artists! You can now use the tag with FurAffinity and ArtStation accounts.

Issue 2657: criticalcommons.org has changed their embed format (pull request)
Category: Site Improvement
Patch by: [github.com profile] cmho
Description: Videos from Bilibili and Rumble are now embeddable on the site; CriticalCommons embedding should now be fixed.

Issue 2891: typos in strings for Shortcuts settings (pull request)
Category: Typo Gremlin Wrangling
Patch by: [github.com profile] kareila
Description: Change 'shorcuts' to 'shortcuts' in two places.

Issue 2906: Text::Fuzzy wants to correct me.com to mail.com (pull request)
Category: Email woes
Patch by: [github.com profile] kareila
Description: Users with email addresses at these common domains complained about having to confirm they had not misspelled a similar domain. Add these two to the list so that they are no longer flagged as possible misspellings.

Issue 2909: need better failure mode for console suspend command when search is down (pull request)
Category: Bad User No Cookie
Patch by: [github.com profile] kareila
Description: So when we suspend someone, one of the backend actions that happen is that we make some changes to how their content is indexed in the search database (which is different from the main site database). If the search database was down this would fail in confusing and unhelpful ways, this fixes that.

Issue 2910: Allow email spell-checking to be overridden in admin/sysban (pull request)
Category: Email woes
Patch by: [github.com profile] kareila
Description: This fixes a BML conversion error that was preventing the "don't spell-check this email" checkbox from doing its job.

Issue 2933: community "work as" dropdown needs to be wider on Invite New Members page (pull request)
Category: Site Modernization
Patch by: [github.com profile] momijizukamori
Description: Updates the sizing of the work-as select box since text was getting cut off, and adds some classes for handling smaller screens as well.

Issue 2939: add itch.io to user tag (pull request)
Category: All the Places!
Patch by: [github.com profile] cmho
Description:Adds itch.io username handling with custom userheads!

Issue 2954: change old Google Analytics paid feature to GA4 since UA is being sunsetted 30 July 2023 (pull request)
Category: Stop Breaking Things, Google!
Patch by: [github.com profile] kareila
Description: This is the bare minimum of code needed to allow users to tell us their IDs for use with the new version of Google Analytics. It doesn't do anything with that information yet.

Issue 2955: change DW's Google Analytics snippet to use GA4
Category: Stop Breaking Things, Google!
Patch by: [github.com profile] momijizukamori
Description: Dreamwidth-side fix for Google's mucking about.

Issue 2979: Make cut links targetable by CSS (pull request)
Category: Prettifying
Patch by: [github.com profile] cmho
Description: Adds some additional classnamed wrapper elements around the full cut tag and around individual inner parts so that they're all more easily targetable by CSS for the aesthetically minded.

Issue 3008: try again with warning users off buying regular paid time for premium accounts (pull request)
Category: Keeping The Lights On
Patch by: [github.com profile] kareila
Description: This brings back the part of #3008 we had to pull out when it broke the shop. It displays a nice shiny warning to people trying to buy regular paid time for a premium account [. . .] and it also fixes the underlying issue that was sending the cart widget errors into a black hole.

Issue 3026: fix table header background color on Foundation pages (pull request)
Category: Site Modernization; Prettifying
Patch by: [github.com profile] kareila
Description: Specify a background color for table header rows on site-schemed Foundation pages.

Issue 3035: Update color picker element to something more modern (pull request)
Category: Site Modernization; Prettifying
Patch by: [github.com profile] momijizukamori
Description: You may or may not know that if you go to customize your style (https://www.dreamwidth.org/customize/options?group=colors), if you click on the little color swatches, you get a colorpicker? It opens in a new window, and is 1) ancient, 2) terrible, 3) inaccessible, and 4) apparently difficult for a lot of people to find. It has now been nuked to oblivion and replaced with a nice little library that pops up in the page and which has way better support for screenreaders and keyboard navigation. It also comes in dark mode to match all you Gradation users out there.

Issue 3048: Change 'rising' to 'krja' in theme credits (pull request)
Category: Credit Where Credit Is Due
Patch by: [github.com profile] cmho
Description: Changes credits for a lot of layouts from rising to krja, since the user in question renamed their journal.

Issue 3053: update suggested interests on the signup page (pull request)
Category: Site Modernization; (We're the Cryptkeeper!)
Patch by: [github.com profile] cmho
Description: Updates the suggested interests for when you sign up, since the old ones were... old.

Issue 3055: Add Substack to username tag/profile (pull request)
Category: All the Places!
Patch by: [github.com profile] cmho
Description: Adds custom username linking with userhead for Substack accounts so everyone can subscribe to your newsletter.

Issue 3067: treat user bio of non-validated accounts like anonymous comments for HTML cleaning purposes
Category: SEO-stuff is terrible
Patch by: [github.com profile] momijizukamori
Description: Part of the endless war on spam - this delinkifies links in the bios of users who haven't validated their email addresses yet, making it slower for spammers to create a bunch of profiles and dump spam links in them (if they aren't actual links, it doesn't count towards page rank algorithms on Google etc)

Issue 3073: Clean up now-redundant S2 code for header navlinks (pull request)
Category: Code Machete!
Patch by: [github.com profile] cmho
Description: Removes a bunch of redundant code that was useful before we patched in the ability to display the navigation module in the header—now it duplicates what's in s2core, so we can remove the redundancy.

Issue 3074: also don't allow gifts of premium time for paid accounts (pull request)
Category: Keeping The Lights On
Patch by: [github.com profile] kareila
Description: Don't allow users to purchase premium time for paid accounts other than their own.

Issue 3075: antispam support category email alias missing
Category: Email Woes
Patch by: [github.com profile] rahaeli
Description: Now a useful antispam thing works!

Issue 3078: add SVG logo to a repository somewhere (pull request)
Category: Tech Wizardry
Patch by: [github.com profile] cmho
Description: Adds the very nice DW svg logo to the repository so we can use it on stuff!

Issue 3079: Inbox tweaks canary (pull request)
Category: Site Modernization; Inbox Improvements
Patch by: [github.com profile] momijizukamori
Description: The ongoing quest to replace the inbox! Now with less 'OH GOD SO MANY BUTTONS' and more updated message counts.

Issue 3080: URL blocklist for HTML cleaner (pull request)
Category: SEO-stuff is terrible; Spamwhacking
Patch by: [github.com profile] momijizukamori
Description:A number of our spammers are repeat customers. This change allows site admins to set up a list of domains that posting links to will cause your account to get auto-suspended, with a note in the admin log of what domain got flagged and where it got flagged.

Issue 3087: Fix for annoying button flash on initial inbox load (pull request)
Category: Site Modernization; Inbox Improvements
Patch by: [github.com profile] momijizukamori
Description: Part of making the inbox nicer - there would be a second or two of all five action buttons being visible at once before the JS would load and hide some of them. This removes that, while ensuring that if a user doesn't have JS enabled, they see all five buttons.

Issue 3088: add userhead support for ko-fi.com (pull request)
Category: All the Places!
Patch by: [github.com profile] cmho
Description: Adds Ko-Fi userhead support and updates the userhead for Fanfiction.net.

Issue 3089: New inbox polish (pull request)
Category: Site Modernization; Inbox Improvements
Patch by: [github.com profile] momijizukamori
Description: More polish for the new inbox!

Issue 3094: Add new GA4 google analytics script into pages (pull request)
Category: Stop Breaking Things, Google!
Patch by: [github.com profile] momijizukamori
Description: This is the second half of the code to update Google Analytics scripts to the newer Google format (the first half is #3094 ). This bit constructs the script tags using either the new user setting (for journals where users have enabled google analytics) or the site config variable (for site pages).

Issue 3096: RTE hacks (pull request)
Category: Site Modernization; The Bleep-ing RTE
Patch by: [github.com profile] momijizukamori
Description: The new 'Create Entries' page has been in beta for years now despite being like 90% done, and part of that last 10% was lack of a Rich Text Editor. We'd really like to have a new RTE, instead of the current one (which is 15 years old at this point), but it turns out most RTEs are varying degrees of Bad, and making one be mostly Not Bad is a lot of work. But in the meantime we can shove the aging RTE onto the newer entry page and get us a little closer to only maintaining one entry page.

Issue 3098: Clean up Perl -> JS dumping (pull request)
Category: Codebase Old Enough To Drink; WT-actual-F; We needed a drink
Patch by: [github.com profile] momijizukamori
Description: The short version is a small essay, but there was something really, really whack going on. Please click the link and read the essay -- and then heap praises on momijizukamori for figuring out how to fix another of Brad's 'it was the best way possible at the time' gifts to the devs.

ETA: from [personal profile] azurelunatic: For those who are intimidated by the thought of reading/understanding all of this -- you know how when you try to type a zip code starting with 0 in an excel sheet, and it cheerfully Does The Exact Wrong Thing with it? Picture that, but in a way that made a journal unable to delete comments. CURSED I SAY.

Issue 3099: build-static fixes (pull request)
Category: Site Modernization; Calm Down, Dreamhack
Patch by: [github.com profile] alierak
Description:The development script that builds static CSS and JS files could get confused with different developers' data on the dreamhack server, and was doing extra work most of the time.

Issue 3100: add admin view to /file/list (pull request)
Category: TOS support
Patch by: [github.com profile] kareila
Description: Denise mentioned needing a way for site admins to review uploaded images for possible TOS violations. This adds that capability to the /file/list page for users who have the canview:images admin priv.

Issue 3101: Fix some weirdness caused by Firefox reselecting on reload (pull request)
Category: Inbox Improvements
Patch by: [github.com profile] momijizukamori
Description: Firefox reselects previously-checked checkboxes when you reload a page, and it was causing some weirdness with the new inbox. This should behave a little bit better now.

Issue 3102: Hack old drafts functionality into new Create Entries page (pull request)
Category: Site Modernization; Create Entries
Patch by: [github.com profile] momijizukamori
Description: One of the things missing from the new Create Entries page was any sort of draft functionality. On the old page, this basically auto-saved in-progress entries, and then if you had a draft saved, when you opened the post editor again, it would ask if you'd like to restore from the previous draft. This adds that functionality to the new page, with some updates on the JS that powers it that will hopefully make the save behavior more reliable.

Issue 3103: Cleanup 2023q2 (pull request)
Category: Code Machete!
Patch by: [github.com profile] kareila
Description: Nothing here that affects end users, just cleaning up bits of code to make things easier to maintain and less likely to print out non-useful warnings.

Issue 3104: Strip links from the userbio for accounts that aren't validated yet (pull request)
Category: Spamwacking!
Patch by: [github.com profile] momijizukamori
Description: Part of the endless war on spam - this delinkifies links in the bios of users who haven't validated their email addresses yet, making it slower for spammers to create a bunch of profiles and dump spam links in them (if they aren't actual links, it doesn't count towards page rank algorithms on Google etc)

Issue 3108: Add call to print_meta_tags() for venture layout (pull request)
Category: Site Modernization
Patch by: [github.com profile] cmho
Description: This adds the function that includes useful meta tags to the Venture layout, which allows it to, among other things, display the layout responsively on mobile devices.

Issue 3110: Add Media Query support to all base layouts (pull request)
Category: Site Modernization; Layouts
Patch by: [github.com profile] cmho
Description: Venture now actually uses media queries to collapse the layout on smaller devices, and Easy Reader and Zesty got a couple little quality of life tweaks for mobile.

Issue 3111: allow suspended accounts to use the admin console if they have the suspend priv (pull request)
Category: Backend suspension stuff
Patch by: [github.com profile] kareila
Description: Sometimes even the devs make mistakes like suspending themselves. This lets them fix it.

Issue 3112: Only iterate over array elements, not the entire array object's props (pull request)
Category: Someone Get The Holy Water!; Cursed Code
Patch by: [github.com profile] momijizukamori
Description: Javascript is cursed, our codebase is haunted, and the combination of the two meant the new entry page was cheerfully printing a bunch of Javascript functions into the Custom Access Filter modal. The codebase is -1 point haunted and now does not do that. (The slightly longer version: array.forEach() and for(i in array) behave the same way if and only if nothing is patching new functions onto the Array prototype)

Issue 3128: more cleanup (pull request)
Category: Tidying Up
Patch by: [github.com profile] kareila
Description: No impact.

Issue 3132: new template constants for username and password max lengths (pull request)
Category: Tidying Up
Patch by: [github.com profile] kareila
Description: No visible impact, unless I messed something up.

Issue 3135: Convert /manage/circle and /manage/circle/filter to TT (pull request)
Category: Brad, in his dorm room, with BML; Site Modernization
Patch by: [github.com profile] momijizukamori
Description: More de-BMLing!

Issue 3136: use 'draft-autosave' instead of 'draft' as field keyword (pull request)
Category: Saving Ourselves Some Trouble
Patch by: [github.com profile] momijizukamori
Description: Nick pointed out that draft-autosave was probably a clearer keyword than just draft for marking fields we autosave in drafts. Me in six months will be happy for this.


58 total issues resolved
Contributors: [github.com profile] alierak, [github.com profile] kareila, [github.com profile] momijizukamori, [github.com profile] rahaeli, all of whom are awesome.

And warmest of welcomes to new contributor [github.com profile] cmho!!! Thank you for the fixes!