Page MenuHomePhabricator

[Session] Cool new things in MediaWiki code
Closed, ResolvedPublic

Description

I could imagine two styles of doing this collaboratively: collecting everyone’s ideas for things to mention in advance (and then have one person putting together a presentation and holding it), or having people suggest things during the session.

Incomplete list of things to mention:

  • service container, dependency injection
  • hook handler classes (instead of static methods)
  • SelectQueryBuilder
  • UpdateQueryBuilder
  • $lbFactory->getPrimaryDatabase(), $lbFactory->getReplicaDatabase(), IReadableDatabase

Event Timeline

bd808 added a subscriber: bd808.

I'll take the opportunity to promote NormalizedException.

I'll take the opportunity to promote NormalizedException.

Oh nice, I’ve needed something like this before (e.g. for the issue we eventually solved with Improve Exception loggability and Reduce logspam, cc @Michael) but had no idea it existed. Thanks!

Yes! This is indeed exactly what we did there. Will definitively use it a lot in the future! Thanks for mentioning it 🙏🙌

(unless we widen the scope to the JS side too? but I’m more aware of PHP-side improvements)

We have a separate session for T333611: [Session] An introduction to Codex: the design system for Wikimedia as well, but here are some ideas for JS/CSS stuff you could include:

  • Briefly mention that Codex is now available, and that there's a separate session about it
  • Briefly mention that the skin variables have been expanded a lot, now that they contain all the Codex design tokens
  • ES6 is now the default (can be used everywhere, 'es6' => true is no longer needed)
  • The default target for a ResourceLoader module is now ['desktop', 'mobile'], which is what you usually want (previously, it was ['desktop'], which kept causing problems)

(unless we widen the scope to the JS side too? but I’m more aware of PHP-side improvements)

We have a separate session for T333611: [Session] An introduction to Codex: the design system for Wikimedia as well, but here are some ideas for JS/CSS stuff you could include:

  • Briefly mention that Codex is now available, and that there's a separate session about it
  • Briefly mention that the skin variables have been expanded a lot, now that they contain all the Codex design tokens
  • ES6 is now the default (can be used everywhere, 'es6' => true is no longer needed)
  • The default target for a ResourceLoader module is now ['desktop', 'mobile'], which is what you usually want (previously, it was ['desktop'], which kept causing problems)

I think you could fill a third session just with all the JS features that ES6 unlocks 😅 but mentioning the things you said is definitely a good idea. I’ll start a Google presentation (based on the template the organizers sent around) and link it here soon.

Slides will be here (but so far I’ve just dumped everything into a TODO slide, will expand later); feel free to comment there: https://docs.google.com/presentation/d/1d7-pEX9xFcsqLM8ogNnBmdPgEEb7W5u1bMvDzAg_C3A/edit

After the session I’ll also put the finished slides on Commons, of course.

I think the presentation slides are mostly done now, and I did a test run at just about 25 minutes, so that works out very well ^^

Below you may find the link attached that redirects the user to the corresponding Etherpad:

https://etherpad.wikimedia.org/p/whm2023-Cool_new_things_in_MediaWiki_code

Closing the task as the session is done. Note that the slide deck PDF on Commons include additional slides between the ones I showed live, more or less summarizing what I said out loud.