Upon closer investigation, I noticed that commit a75ddc41 and 33f9e9d3 for T364347 effectively changed the default user option value of popups-reference-previews for users created before 2017/08/16 without any justification.
Before commit a75ddc41:
- extension.json:
- "popups-reference-previews": 0, but this is not the final default value being used in production
- "PopupsReferencePreviews": { ... "value": true }, this set the PopupsReferencePreviews config to true
- includes/PopupsHooks.php:
- onUserGetDefaultOptions: Set the actual default value of popups-reference-previews to '1' when PopupsReferencePreviews is true, which is true by default - resulting in popups-reference-previews default for all users.
- onLocalUserCreated: Set the value of popups-reference-previews when PopupsReferencePreviews is true - this is redundant! The value it set is the same as the default value by onUserGetDefaultOptions, and gives us a false image that this user option is also related to the user creation date as popups. This can be verified with comment from Tgr in T54777#7651262 2 years ago, where new accounts don't have the popups-reference-previews option set.
Commit a75ddc41:
- extension.json:
"ConditionalUserOptions": { "popups": [...], "popups-reference-previews": [ [ 1, [ "registered-after", "20170816000000" ] ], [ 0, [ "named-user" ] ] ] }
- includes/PopupsHooks.php:
- onUserGetDefaultOptions: Removed, the PopupsOptInDefaultState config and PopupsReferencePreviews config are not honored