You are browsing a read-only backup copy of Wikitech. The live site can be found at wikitech.wikimedia.org

GrowthExperiments setup: Difference between revisions

From Wikitech-static
Jump to navigation Jump to search
imported>Gergő Tisza
No edit summary
 
imported>Catrope
(Various tweaks and minor additions)
Line 4: Line 4:
# TODO check/backport translations
# TODO check/backport translations
# Update [[InitialiseSettings.php]] in the <code>[https://gerrit.wikimedia.org/r/plugins/gitiles/operations/mediawiki-config mediawiki/operations-config]</code> repo (example patch: {{gerrit|634119}}):
# Update [[InitialiseSettings.php]] in the <code>[https://gerrit.wikimedia.org/r/plugins/gitiles/operations/mediawiki-config mediawiki/operations-config]</code> repo (example patch: {{gerrit|634119}}):
#* Enable the extensions itself (<code>wmgUseGrowthExperiments</code>). This enables all main features; in rare cases, some might need to be disabled for the wiki (<code>wgWelcomeSurveyEnabled</code>, <code>wgGEHelpPanelEnabled</code>, <code>wgGEHomepageEnabled</code>).
#* Enable the extension itself (<code>wmgUseGrowthExperiments</code>). This enables all main features; in rare cases, some might need to be disabled for the wiki (<code>wgWelcomeSurveyEnabled</code>, <code>wgGEHelpPanelEnabled</code>, <code>wgGEHomepageEnabled</code>).
#* Set various configuration options. (Many of these are strings in the wiki's language. Note that some text editors, especially console-based ones like vim, mess up some non-Latin scripts in all kinds of exciting ways. Copy-pasting is usually safe in any Unicode-aware editor; editing the pasted text, not necessarily so.) The commonly used ones correlate with the fields in the standard task template as follows:
#* Set various configuration options. (Many of these are strings in the wiki's language. Note that some text editors, especially console-based ones like vim, mess up some non-Latin scripts in all kinds of exciting ways. Copy-pasting is usually safe in any Unicode-aware editor; editing the pasted text, not necessarily so.) The commonly used ones correlate with the fields in the standard task template as follows:
#** Help panel:  
#** Help panel:  
#*** Help desk: <code>wgGEHelpPanelHelpDeskTitle</code>
#*** Help desk: <code>wgGEHelpPanelHelpDeskTitle</code>
#*** Archiving system: archived after 14 days of inactivity
#*** Help pages: <code>wgGEHelpPanelLinks</code>
#*** Help pages: <code>wgGEHelpPanelLinks</code>
#**** The <code>text</code> field is usually the page title without namespace, use your best judgement though. Use spaces not underscores (everywhere else it doesn't matter).
#**** The <code>title</code> field is the page title of the wiki page to link to. Interwiki prefixes and section fragments can be used here, e.g. <code>mw:Help/VisualEditor/User_guide/pt#Editar_referências</code>
#****The <code>text</code> field is the link text. The Phabricator task requesting the deployment should specify both the title and the text for each link, but it sometimes doesn't. If the text is not specified, you can usually the page title without namespace, but use your best judgement and ask the requesting community member to confirm your guesses. Use spaces not underscores (everywhere else it doesn't matter).
#**** The <code>id</code> field is somewhat arbitrary (only used for analytics), you can try to follow conventions from other languages but ultimately it doesn't matter much.
#**** The <code>id</code> field is somewhat arbitrary (only used for analytics), you can try to follow conventions from other languages but ultimately it doesn't matter much.
#*** Search on namespace: <code>wgGEHelpPanelReadingModeNamespaces</code>. Only set if it includes something other than the default (Wikipedia and Help).
#*** Search on namespace: <code>wgGEHelpPanelReadingModeNamespaces</code>. Only set if it includes something other than the default (Wikipedia and Help).
Line 18: Line 18:
#*** Signature list: <code>wgGEHomepageMentorsList</code>
#*** Signature list: <code>wgGEHomepageMentorsList</code>
#** Suggested edits:
#** Suggested edits:
#*** Extra links: <code>wgGEHomepageSuggestedEditsIntroLinks</code>
#*** Additional links: <code>wgGEHomepageSuggestedEditsIntroLinks</code>
#*** See below for task-specific settings.
#*** See below for task-specific settings.
# Add the wiki to the growthexperiments [[Configuration_files#dblists|dblist]] by adding <code>growthexperiments</code> to the <code>inheritsFrom</code> list in <code>wmf-config/config/{wiki id}.yaml</code> in the <code>mediawiki/operations-config</code> repo and running <code>composer buildDBLists</code> (which updates <code>dblists/growthexperiments.dblist</code>). This is usually done in the same patch as the <code>InitializeSettings.php</code> changes - in general this is a bad idea as changes in one file might depend on the other, but specifically for GrowthExperiments the dblist does not do anything important so this is OK.
# Add the wiki to the growthexperiments [[Configuration_files#dblists|dblist]] by adding <code>growthexperiments</code> to the <code>inheritsFrom</code> list in <code>wmf-config/config/{wiki id}.yaml</code> in the <code>mediawiki/operations-config</code> repo and running <code>composer buildDBLists</code> (which updates <code>dblists/growthexperiments.dblist</code>). This is usually done in the same patch as the <code>InitialiseSettings.php</code> changes - in general this is a bad idea as changes in one file might depend on the other, but specifically for GrowthExperiments the dblist does not do anything important so this is OK.
# Add on-wiki configuration. This is done on the `MediaWiki:NewcomerTasks.json` page (example: [[w:fr:MediaWiki:NewcomerTasks.json]]), which means your wiki account needs to be in staff, sysop or a similar user group. The contents correlate to table in the Suggested edits section of the standard task template. Use a descriptive edit summary such as <code>Configuration for [[mw:Growth/Personalized first day/Newcomer homepage]]. See [[phab:XXX]] for more information.</code>
# Add on-wiki configuration. This is done on the <code>MediaWiki:NewcomerTasks.json</code> page (example: [[w:fr:MediaWiki:NewcomerTasks.json]]), which means your wiki account needs to be in staff, sysop or a similar user group. The contents correlate to table in the Suggested edits section of the standard task template. Use a descriptive edit summary such as <code>Configuration for <nowiki>[[mw:Growth/Personalized first day/Newcomer homepage]]</nowiki>. See <nowiki>[[phab:XXX]]</nowiki> for more information.</code>
# Check if there are enough tasks. TODO
# Check if there are enough tasks. TODO
# Deploy the config change in a [[Backport windows|backport window]].
# Deploy the config change in a [[Backport windows|backport window]].

Revision as of 17:05, 5 January 2021

This is a documentation for developers for adding Growth features to a Wikimedia wiki. For requesting these features as a community member, see mw:Growth/Communities/Get the Growth experiments on your wiki instead.

  1. Add special page aliases for the new language. (Example patch: 643084 Note: do not include namespace names.) Unlike the other changes described here, this is deployed via the train so it's worth doing ahead of the rest. This is an i18n change so if you need to backport it, you have to use scap sync-world.
  2. TODO check/backport translations
  3. Update InitialiseSettings.php in the mediawiki/operations-config repo (example patch: 634119):
    • Enable the extension itself (wmgUseGrowthExperiments). This enables all main features; in rare cases, some might need to be disabled for the wiki (wgWelcomeSurveyEnabled, wgGEHelpPanelEnabled, wgGEHomepageEnabled).
    • Set various configuration options. (Many of these are strings in the wiki's language. Note that some text editors, especially console-based ones like vim, mess up some non-Latin scripts in all kinds of exciting ways. Copy-pasting is usually safe in any Unicode-aware editor; editing the pasted text, not necessarily so.) The commonly used ones correlate with the fields in the standard task template as follows:
      • Help panel:
        • Help desk: wgGEHelpPanelHelpDeskTitle
        • Help pages: wgGEHelpPanelLinks
          • The title field is the page title of the wiki page to link to. Interwiki prefixes and section fragments can be used here, e.g. mw:Help/VisualEditor/User_guide/pt#Editar_referências
          • The text field is the link text. The Phabricator task requesting the deployment should specify both the title and the text for each link, but it sometimes doesn't. If the text is not specified, you can usually the page title without namespace, but use your best judgement and ask the requesting community member to confirm your guesses. Use spaces not underscores (everywhere else it doesn't matter).
          • The id field is somewhat arbitrary (only used for analytics), you can try to follow conventions from other languages but ultimately it doesn't matter much.
        • Search on namespace: wgGEHelpPanelReadingModeNamespaces. Only set if it includes something other than the default (Wikipedia and Help).
        • Read more about editing: wgGEHelpPanelViewMoreTitle
      • Homepage:
        • Tutorial: wgGEHomepageTutorialTitle
        • Signature list: wgGEHomepageMentorsList
      • Suggested edits:
        • Additional links: wgGEHomepageSuggestedEditsIntroLinks
        • See below for task-specific settings.
  4. Add the wiki to the growthexperiments dblist by adding growthexperiments to the inheritsFrom list in wmf-config/config/{wiki id}.yaml in the mediawiki/operations-config repo and running composer buildDBLists (which updates dblists/growthexperiments.dblist). This is usually done in the same patch as the InitialiseSettings.php changes - in general this is a bad idea as changes in one file might depend on the other, but specifically for GrowthExperiments the dblist does not do anything important so this is OK.
  5. Add on-wiki configuration. This is done on the MediaWiki:NewcomerTasks.json page (example: w:fr:MediaWiki:NewcomerTasks.json), which means your wiki account needs to be in staff, sysop or a similar user group. The contents correlate to table in the Suggested edits section of the standard task template. Use a descriptive edit summary such as Configuration for [[mw:Growth/Personalized first day/Newcomer homepage]]. See [[phab:XXX]] for more information.
  6. Check if there are enough tasks. TODO
  7. Deploy the config change in a backport window.
    1. (Placeholder for adding tables. This is not needed today, but by the time this page is next used, it probably will be.)
    2. Test by enabling User profile > Display newcomer homepage and Editing > Enable the editor help panel in Special:Preferences, visiting Special:ClaimMentor (this will validate the mentor page as a side effect), visiting Special:Homepage, and clicking on a suggested task to bring up the help panel in suggested editing mode.