Looking through ContentHandler/Content, there are also these things:
- ContentHandler:
- makeEmptyContent. Do we want to have role-based default values? (Specifically I'm thinking of roles holding JsonContent.)
- getActionOverrides: these will effectively go away (maybe the main slot can use them but even that seems problematic), presumably replaced by something in PageTypeHandler. Do we need some new slot-level funcionality to replace them? E.g. customize the edit interface or do extra work on rollback/purge? Or just prevent certain actions? That's off-scope for the RfC but it should mention that this part will be filled in elsewhere.
- createDifferenceEngine: do we want to tweak diff calculation or presentation for some roles? Make it more compact for example, or provide special handling for content model changes?
- getPageLanguage/getPageViewLanguage: do we want or need a slot-level equivalent? Using a different language makes sense for some slots (e.g. source code is usually written in English, some slot might be in the interface language) but outputting
lang
attributes can be done in the HTML wrapping step, and I'm not sure what else the language would be useful for. - merge3: maybe some roles can do more intelligent conflict resolution by considering the usage patterns. E.g. a SAL-like slot where the content type is wikitext but conflicts where both edits append to the end can be special-cased.
- getAutosummary: seems quite useful. Meaningful autosummary is rarely possible at the content level, while the slot can say things like "added <role>".
- getChangeTag: seems useful for changes which do not normally happen (e.g. deleting a documentation slot) or are potentially disruptive (e.g. adding a templatestyle slot). But then, can be easily done via AbuseFilter as well so maybe it's needless complication (nothing seems to override the default ContentHandler behavior either).
- getFieldsForSearchIndex/getDataForSearchIndex/getParserOutputForIndexing and similar methods in Content: some of this will probably move to the page level. Slot existence/nonexistence should probably be searchable but no need for any functionality in SlotRoleHandler for that. But slots will need to provide some sort of weight factor (finding a word in the template documentation slot is highly relevant; in the template itself, probably less relevant; in the template unit test slot, not relevant at all) at the very least. Maybe even more customization is needed.
- Content:
- getWikitextForTransclusion: how would this work for non-main slots? Mostly they shouldn't be transcluded, but e.g. for TemplateStyles the current workflow is that you add a
<templatestyles src="SomePage.css"/>
tag in the template; when SomePage.css becomes a slot on the template, we probably want to get rid of the tag as well and prepend automatically on transclusion. - isValid: do we want to add extra validation based on role? E.g. for the Wikidata description override, the content type would probably be TextContent, but an empty string or one containing newlines is not valid. It would be overkill to require a new content type just for that.
- more generally, having an empty slot vs. a missing slot wasn't a meaningful difference before MCR (as "missing" would have meant page deletion) so little thought was given to it (although a long, long time ago there was much discussion about semi-deletion, and IIRC Flow also had something like that for a while), but now we should consider whether we want to keep the UI simple and use blanking as a slot deletion mechanism (or give role handlers some mechanism to decide whether they want that).
- isCountable: should role handlers be able to suppress countable-ness of the content?
- getSecondaryDataUpdates/getDeletionUpdates: role handlers should probably be able to add stuff. For example, various use cases that have been suggested involve CSS/JS slots. When slots change, the ResourceLoader module needs to be invalidated (currently that's not a data update but hardcoded in doEditUpdates, but we probably want to move away from that). The Content can't do that because it does not know its role name and the cache purge logic needs to differentiate between multiple CSS/JS slots on the same page.
- getWikitextForTransclusion: how would this work for non-main slots? Mostly they shouldn't be transcluded, but e.g. for TemplateStyles the current workflow is that you add a