User:DKinzler (WMF)/Stable interface policy/frontend

Ref User:Jdlrobson/Stable interface policy/frontend

Stable Interface
Items listed in this section are subject to the Deprecation Process.

CSS classes in page content
NOTE: does not include IDs and classes defined in wikitext!

NOTE: MediaWiki developers and wiki-based code MUST NOT share CSS classes

Element IDs defined in MediaWiki core
"mw-" prefix.

NOTE: does not include IDs and classes defined in wikitext!

IDs marked @public (UNCLEAR!)
''In cases where it might make sense for wiki-based code and MediaWiki developers to share code, this MUST be documented in the source-controlled code using a  and  keyword. HTML classes that do wish to be considered stable MUST add an inline comment indicating for what MediaWiki versions they were introduced using a  annotation and must follow the deprecation policy.''

ResourceLoader modules
All ResourceLoader modules inside MediaWiki core MUST be considered stable unless marked as deprecated [or unstable or internal]. [how? where?]

The mw Object
JavaScript...


 * Code inside the public  object
 * Hooks fired using the  object

Semi-Stable Interface
Items listed in this section are subject to the Deprecation Process.

CSS classes in the user interface
"mw-" prefix.

Naming Conventions
MediaWiki developers MUST prefix CSS to avoid namespace clashes with wiki-based code developers.

       MediaWiki developers SHOULD ensure legacy classes are preserved while moving to their mw- prefixed equivalent for example .wikitableand .mw-wikitable

   Extension/skin developers MUST prefix their CSS classes to avoid namespace clashes with wiki-based code developers.

   Extension/skin developers MUST use a unique prefix e.g. for Skin:Vector use vector-, for Extension:AbuseFilter use mw-abusefilter-

''   Wiki-based code MUST NOT introduce or use CSS classes prefixed with mw- to avoid namespace clashes with MediaWiki developers. It SHOULD consider prefixing CSS classes with context about the code's origin e.g. mwgadget- / twinkle- where possible but not in a way that creates name clashes with other extensions or skins.''

JS Practices

 * Code that MUST be protected by the wiki-based code stable policy and follow the deprecation policy:
 * Code inside the public  object
 * Hooks fired using the  object
 * Wikimedia developers SHOULD regularly check the JavaScript console for deprecation notices and warnings.
 * Code creating complex UIs SHOULD use Vue.js and MUST follow any guidance that appear in the JavaScript console to maintain compatibility.
 * Code written in OOUI MUST follow any guidelines in the JavaScript console.
 * MediaWiki developers MUST regularly review popular gadgets to evaluate missing APIs using the global-search tool. MediaWiki developers MAY do this as part of their planning process, and MUST evaluate the use case in situations where a gadget developer raises a Phabricator ticket after an incident has occurred (for example: in a situation where a popular gadget breaks)
 * All new MediaWiki code deployed to Wikimedia wikis SHOULD consider support providing on-wiki code a stable way to access its most important elements.
 * Code SHOULD NOT use ResourceLoader modules using the deprecated tag. e.g. jQuery.UI.
 * Code SHOULD NOT use ResourceLoader modules using the deprecated tag. e.g. jQuery.UI.