Motivation
Beta features allow us to roll out changes in a limited way and test them out before a wider release. Beta Features appear under the "Beta Features" tab in Special:Preferences and look something like this:
This presents a convenient way for the community to discover, discuss and provide feedback on new and upcoming changes. Because of these benefits, and the wide reaching impact of IP Info, it is advantageous to release IP Info as a beta feature.
AC
If a user has the ipinfo right:
- IP Info appears in the list of beta features on Special:Preferences#mw-prefsection-betafeatures
- Description: IP Info tool aims to equip patrollers with vital information about IP addresses to assist them in their roles. This information will be accessible on the Special:Contributions page for the IP editor. An abridged version of this information will be available in a popup next to IP addresses on Log, Contributions and RecentChanges pages.
- Information link: https://meta.wikimedia.org/wiki/IP_Editing:_Privacy_Enhancement_and_Abuse_Mitigation/IP_Info_feature
- Discussion link: https://meta.wikimedia.org/wiki/Talk:IP_Editing:_Privacy_Enhancement_and_Abuse_Mitigation/IP_Info_feature
- Logo: Figma
- SVGs:
- The "IP information" section does not appear on Special:Preferences (User profile tab), unless the user has enabled the beta feature
- When a user first enables the IP Info beta feature, the "IP information" section appears on Special:Preferences (User profile tab). The states of the checkboxes will be handled in T297897.
- When the user visits Special:Contributions for an IP address, they will be presented with the data disclaimer (see T264150)
- Whenever a user disables the IP Info beta feature, the "IP information" section disappears from Special:Preferences (User profile tab) again
- If a user then re-enables the beta feature, the "IP information" section reappears on Special:Preferences (User profile tab) again. The states of the checkboxes will be handled in T297897.
- Checking/unchecking the checkboxes on Special:Preferences (User profile tab) has no effect on whether the beta feature is enabled or disabled
If a user does not have the ipinfo right:
- IP Info is not listed under beta features; the "IP information" section on Special:Preferences is not shown
Notes
- The BetaFeatures extension manual has detailed notes on how to define beta features
- When the user enables a beta feature (manually or via the auto-enable feature), a user preference is set corresponding to the internal name of the feature, e.g. if we define the ipinfo-beta-feature beta feature via the GetBetaFeaturePreferences hook, then the user preference will be called ipinfo-beta-feature
- No hooks are fired when a beta feature is enabled or disabled so we're going to have to monitor all user preference changes and manually keep it in sync with the other user preference:
public function onSaveUserOptions( UserIdentity $user, array &$modifiedOptions, array $originalOptions ) { // The user is enabling the feature via Special:Preferences? if ( isset( $modifiedOptions[ 'ipinfo' ] ) { $modifiedOptions[ 'ipinfo-beta-feature' ] = $modifiedOptions[ 'ipinfo' ]; } // The user is enabling the beta feature? if ( isset( $modifiedOptions[ 'ipinfo-beta-feature' ] ) { $modifiedOptions[ 'ipinfo' ] = $modifiedOptions[ 'ipinfo-beta-feature' ]; } }

