User:Mzs/TODO/Deprecating Sources

From Fallen London Wiki
< User:Mzs‎ | TODO

Having Category:_____ Sources for Discrete qualities (and items) and Category:_____ Gain for non-Discrete qualities is all downside with no benefit. The split appears to exist for historical reasons, with references in even very old code stating we should eventually only use Category:_____ Gain.

We could theoretically take the YOLO method: pick an off-peak time, update all the templates to only link to or add the Gain category instead of the Sources category, then set a bot to work updating directly-set categories and moving pages. Unfortunately, this would create noticeable disruption to the user experience and I don't think said disruption could be fully contained within an off-peak window.

A minimal disruption[1] approach is possible by breaking the process into 5 steps, each leaving plenty of time in between for the cache to catch up.

  1. Also add Gain everywhere we add Sources
    1. Update {{Item}} and {{Quality}} to no longer add [[Category:Discrete Qualities with Gain Categories]] (since that will be every Discrete quality)
    2. Update all templates that add Sources category[2] to also add Gain category
    3. Set a bot to add [[Category:{{{NAME}}} Gain]] to every page that adds [[Category:{{{NAME}}} Sources]][3]
  2. Link to Gain category instead of Sources when appropriate
    1. Update {{Item}} and {{Quality}} logic for showing Gain/Sources categories:
      1. If Gain category exists, link to it
      2. Else if Sources category exists and is not redirect, link to Sources category
      3. Else, link to Gain category
  3. Move Sources category pages to Gain
    1. Set a bot to move all [[Category:{{{NAME}}} Sources]] pages to to [[Category:{{{NAME}}} Gain]], leaving redirects behind.
  4. Stop adding to Sources categories
    1. Update all templates that add Sources only Gain.
    2. Set a bot to remove [[Category:{{{NAME}}} Sources]] on every page that sets it
  5. Stop linking to Sources categories
    1. Update {{Item}} and {{Quality}} to only ever link the Gain category and to add [[Category:Qualities with Sources Categories]] if the Source category exists or has a non-zero number of pages


Citations
  1. I say "minimal" instead of "no" only because the transition includes small visible effects, even though those effects should not themselves be a problem.
  2. {{Accomplishment}}, {{Bundle}}, {{Gain}}, {{Item Gain}}, {{Shop Inventory}}, {{Twist}}
  3. (As of 21:55, 29 May 2021, I can find 474 such pages)