The help panel is a feature that allows newcomers to post questions directly to their wiki's help desk while they are in the middle of editing a page. The panel also provides a set of five recommended help links that are quite popular -- in wikis with the help panel between 40% and 50% of users who open the help panel click one of the links. The challenge is that different links are appropriate in different contexts. One might need different links in mobile vs. desktop, in wikitext vs. visual editor, for editing talk pages and editing articles, etc.
Per T209297#4770939 and T209297#4790781, we want the ability to vary links in the help panel by context. Context can be desktop or mobile, visualeditor or wikitext. Additionally, one could envision a desire to vary links by namespace, and if the user does not have edit rights to a protected page.
If a given wiki wants the same links to appear in all contexts they can set a "default" list.
I would suggest building this out via a configuration value, like:
$wgGEHelpPanelLinks = [ 'default_edit' => [ 'title' => 'Wikipedia:Tutorial/Editing', 'display_text' => 'Editing tutorial' // 4 more links. // These links are used across all contexts unless they are // overridden below ], 'default_page_creation' => [ // These links would be the default set show for page creation context. ], 'protected' => [ // These links would override the default_edit and default_page_creation, and be used across all contexts if // the page is protected and the user does not have edit rights. ], NS_MAIN => [ 'default_edit' => [ // same as default at root level, sets defaults for all contexts in this namespace ], 'default_page_creation' => [ // same as default at root level, sets default for page creation links for all contexts in this namespace ], 'protected' => [ // same as protected at root level, sets links for any protected page in this namespace ], 'mobile' => [ 've' => [ // 5 links ], 'wikitext' => [ // 5 links ], ], 'desktop' => [ // same structure as mobile above ] ], NS_PORTAL => [ // same as NS_MAIN above ] ];
When the links are rendered in the help panel, we could consider appending query parameters to the URL such that they can be easily captured in event logging (T209982). For example Wikipedia:Tutorial/Editing in NS_MAIN on mobile VE might be output in the help panel as /wiki/Wikipedia:Tutorial/Editing?platform=mobile&editor=ve&namespace=1. This way we don't have to try to reconstruct the context in the event logging code that captures clicks on the help panel links.