Page MenuHomePhabricator

Remove `thumbsize` from ParserOptions
Open, MediumPublic

Description

Once we migrate to a CSS/JS solution for thumbnail size preference (T375981, T417513) we can eventually remove the 'thumbsize' from ParserOptions entirely.

Details

Related Changes in Gerrit:

Event Timeline

Change #1255907 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/core@master] POC: Thumbnail size no longer varies parser cache

https://gerrit.wikimedia.org/r/1255907

cscott assigned this task to Jdlrobson.

We still vary by thumbsize, right?
https://gerrit.wikimedia.org/g/mediawiki/core/+/1cbc0436501efa9ac93ea97dc51d42fa75640f8f/includes/Parser/ParserOptions.php#110

We are just not utilizing it.

I wuld consider this done when getThumbSize() and setThumbSize() no longer exist on ParserOptions ?

yes, sorry, I got confused about the final state of Add upright CSS variable to legacy parser (1255907) · Gerrit Code Review which had originally dropped that variable completely.

There are only two users in https://codesearch.wmcloud.org/deployed/?q=-%3EgetThumbSize%5C%28 -- probably the first step is to replace both with $userOptionsLookup->getDefaultOption( 'thumbsize' ), after which the parser cache won't vary by thumbsize because no one will ever call 'getOption('thumbsize')`. We can then deprecate and remove the method from ParserOptions.

Change #1300222 had a related patch set uploaded (by C. Scott Ananian; author: C. Scott Ananian):

[mediawiki/core@master] Don't vary ParserCache by thumbsize

https://gerrit.wikimedia.org/r/1300222