T167365 implements disabled event handling via PHP. When a user hits "save" on preferences form PHP listens to changes. When a user disables Page Previews PHP triggers event to EventLogging system.
This approach has one downside, we cannot pass all required event data:
- previewCountBucket
- sessionToken
Those variables are available only in the browser and there is no easy way to pass it to the backend. Because of that, we would like to trigger the disabled event in Popups codebase after the user saves preferences.
Developer notes:
- create a separate small module that loads only on Special:Preferences page and listens for changes
- trigger the disabled event when user disables Page Previews