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, so we should build that as well.
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:
``` lang=php
$wgGEHelpPanelLinks = [
'default' => [
'title' => 'Wikipedia:Tutorial/Editing',
'display_text' => 'Editing tutorial'
// 4 more links.
// These links are used across all contexts unless they are
// overridden below
],
NS_MAIN => [
'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.