Lets try to figure out how we can best integrate a community configuration for the backlink marker symbols.
There's currently a WIP where we played with the genral idea and looks of such a setting. The challenges are, that we'll have a long list of alphabets and users could have different approaches on what keyword they would want to filter this to get to their results.
- Put WIP in patchdemo --> https://6067b5f1bb.catalyst.wmcloud.org/wiki/Special:CiteConfiguration
- Discuss the idea with Martin ( Urbanecm ) and see what's his advice
- Plan further implementation
Outcome
Update: we are currently implementing an alternative of option 1: we are using the extension but are adding a subpage for cite.
We'll go with option (2) in which we create a new Codex page based on our proof of concept. Our extension will be the first production integration of a custom Community Configuration page, but this should already be supported by the code. The Growth team is actively helping us fine-tune this integration, and some notes from our discussion are copied below:
Implement the page following the basic structure of https://github.com/wikimedia/mediawiki-extensions-CommunityConfiguration/blob/master/src/EditorCapabilities/GenericFormEditorCapability.php and implement a new subclass of AbstractEditorCapability. Register in extension.json using code like this,
"attributes": {
"CommunityConfiguration": {
"EditorCapabilities": {
"citeEditor": {
// must be an implementation of IEditorCapability; AbstractEditorCapability is provided as an optional (but recommended) helper
"class": "MediaWiki\\Extension\\Cite\\CiteEditorCapability"
"services": [...]
}
},
"Providers": {
"cite": {
"store": {
"type": "wikipage",
"args": [ "MediaWiki:CiteConfig.json" ]
},
"validator": {
"type": "jsonschema",
"args": [...]
},
"type": "mw-config" // or "data",
"options": {
"editorCapability": "citeEditor" // or whatever the capability was registered as in the above
}
}
}
}
}Save the configuration using the action API from the client, or by using $provider->storeValidConfiguration() on the backend.
Options to implement backlink marker settings
1) Add to community configuration extension
Description: We can use the existing extension community configuration (see epic).
- Pro: Central place for users
- Pro: Easy to integrate
- Con: No preview possible
2) Create own special page for cite configs
Description: We can create a new special page for this and other settings for Cite.
- Pro: Full control of the interface
- Con: Would need to manage the integration
3) JS module loaded in community configuration
Description: We can add to the community configuration extension.
- Pro: Add features we need to the default settings page
- Pro: Preview in community config
- Con: Would need a hook
- Is it acceptable? We will talk to the extension maintainers.
Mockup of progressive enhancement button:
