TULIPS/2024-12-26

From Support Wiki
Jump to navigation Jump to search

Welcome to our twentieth TULIPS (Thursday Updates & Logs Improving Platform Software)! You can read the previous one if you haven't yet.

These posts will be made whenever we have enough development updates to make a post, usually on Thursdays. Because we are starting to work on the MediaWiki 1.43 update, TULIPS will be released less frequently until the update is rolled out.

Live now

Miscellaneous 1.43 preparation

  • Database preparations for the MediaWiki 1.43 upgrade have been started on December 24th. We'll be releasing update notes and an approximate timeline next week, after working out some extra details.
  • Page revisions imported automatically will now be appropriately tagged on all future wikis forked to wiki.gg. We're planning to retrofit existing wikis over the first half of 2025.
  • This month, we've done a bunch of upgrades to our server fleet's hardware. Based on our observations, this has scored us significant stability improvements in addition to a decent response latency drop!
  • Rebuilt our wikitext caching setup to reduce the frequency of cache misses. In the testing group, this change has resulted in significant latency decrease when accessing existing pages while logged-in or on CDN misses.
  • Rebuilt our text localization cache setup to make extension updates much easier to deploy on our end. We're hoping for a small performance gain too.

Parser Power

  • Thanks to User:Derugon for a plethora of ParserPower patches! He's provided the following documentation:
    • {{#follow:}}:
      • In general, {{#follow: somewhere }} now returns the link to the same place that would be linked to when using [[somewhere]]. More specifically, if a section name is specified (after a `#`) in the argument or in the redirection page, it will now be returned (e.g. {{#follow: redirect#section }} will return target#section instead of target) while only the page name would have been returned previously.
    • Escape sequence functions:
      • All functions now consistently trim their arguments (before unescaping for the ones that are unescaped). More specifically, the {{#ueif}} and {{#ueifeq}} functions now trim their returned value (e.g. "{{#ueif: 1 | y | n }}" yields "y" instead of " y ") and {{#ueswitch}} trims case keys (e.g. "{{#ueswitch: x |x= y }}" and "{{#ueswitch: x | x = y }}" now both yield "y").
    • {{#tokenif:}}:
      • If the value is not empty, the default value is no longer evaluated (e.g. #vardefine or #cargo_store in the default value are skipped).
    • {{#ueswitch:}}:
      • The #default magic word can be used to specify a default value (the same way as {{#switch}}).
    • {{#ueswitch:}} and list functions with named arguments:
      • Named arguments are now split the same way as {{#switch}}, the equals symbol must not be inside a variable to split a key from a value. This means you can no longer write {{#if: {{{1}}} | k1=v1 | k2=v2 }} to generate a key-value pair, but it also means that a parser function with an argument a {{=}} b = c will now assume a = b is the key and c the value, while before it would have assumed a is the key and b = c is the value.
    • {{#lstcnt:}}:
      • If the list is empty, it now consistently returns 0. Previously, it would have returned either 0 or an empty string depending on whether the list contains empty elements.
    • {{#listmerge:}}:
      • No longer adds some debugging strings to the returned default value.
    • {{#lstfltr:}} / {{#lstrm:}}:
      • No longer break if a parameter contains an = character.
  • Derugon also is updating the ParserPower documentation on the support wiki so that it'll be up-to-date with our functionality!
  • Thanks also to User:Untitled7 for writing {{#argmap:}}, you can see the commit adding this function and we will provide full documentation and examples after the holiday! It's an alternative to Extension:Loops and we think it's very cool.

Search (on-wiki)

  • Added a "Files" preset to Special:Search to make it easier to search for, well, files, duh.
  • Added a "Code" preset to Special:Search to make searching for templates, Lua modules and pages in the MediaWiki namespace easier.
  • Namespaces with no pages are now hidden from Special:Search.

Search (search engines)

  • Several changes have been done this week to help Google choose wiki names over "wiki.gg" when displaying search results.
  • Updated the algorithm used to generate meta description tags which may be sometimes used by Bing and Google. Most notably, elements like amboxes, infoboxes, TemplateStyles CSS, Scribunto errors will not be considered eligible to appear in the automated summary. These changes have been live on a few selected wikis for about a year now.
  • Added rel="canonical" meta tags to signal canonical article URLs to search engines.

URL parameters

  • The safemode URL parameter now disables custom site CSS and JavaScript in addition to user CSS and JS.
  • usesitecss, usesitejs, useusercss, useuserjs URL parameters have been added as a finer alternative to safemode.

ImportJS

  • Improved the reliability of cross-wiki JS and CSS loaded via the ImportJS compatibility layer (such as the importArticles JS function).
    • It's worth highlighting that we do not recommend ImportJS for new wikis or any forks coming to the platform. For local code (stored on the same wiki), Gadgets should be used instead as they enable loading the code only when needed.

Redlinks for anonymous users

  • Reworked how redlinks are hidden away from anonymous users' eyes. Previous approach was incompatible with MediaWiki's wikitext cache, and caused redlinks to rarely disappear from logged-in users' views. That is no longer the case.
    • At the moment, missing files are not supported at the moment and will continue to display as redlinks. A fix will be deployed in January.

Support wiki

  • Five recent TULIPS will now show on the front page!

Live soon

  • Some platforms tend to cut off special characters when at the end of a link. We're working on a workaround.
  • We're working on minor additions to AbuseFilter that'll let us create targeted abuse filters more safely.

WE DID THIS

WE DID THIS stands for "Wiki Editors Developed Inspired Designs That Have Interesting Screenshots." You can submit to WE DID THIS by writing in the channel #we-did-this in the wiki.gg Discord server!