Front end XWiki APIs
Description
Goal
Define for all non java resources:
- How do we mark an element public or internal?
- How do we deprecate them?
- How we do introduce a new element?
- How do we keep backward compatibility?
- What elements are public or internal
All non java resources:
- vms
- javascript API
- velocity macros
- CSS / LESS elements
Front end components
On Front End resources, we already have a list of components. The features, style and architecture of these components would be part of the API as they are meant to be exposed publicly, reused and augmented.
There's velocity macros bundled in the default flavor, some of them match the resources above.
DOM API
Any style attribute should never be considered as API: it's been a long time that we indicate in our documentation to not use inline style, so scripts should never rely on it, and it should always be ok to remove them in old code. Example of such change: https://github.com/xwiki/xwiki-platform/pull/2812/files/95f349912c19b66f00b684153dcf8be6ec526db1#r1504545037
The changes on this basic layout should be documented and backward compatible (CSS or DOM or both ?): https://www.xwiki.org/xwiki/bin/view/Documentation/DevGuide/Tutorials/Skins/CSSLayout/
CSS API
Elements to include in the API:
1. Bootstrap 3 classes: used everywhere, for a long time. When moving to a new design system, we want to consider how to keep support for those classes. E.g. `.btn`, `.btn-default`, ...
2. Special CSS classes defined in https://www.xwiki.org/xwiki/bin/view/Documentation/DevGuide/FrontendResources/SpecialCSSClasses/
Javascript API
Already pretty well defined in https://www.xwiki.org/xwiki/bin/view/Documentation/DevGuide/FrontendResources/JavaScriptAPI/
Resources
Previous research about defining a CSS API: https://design.xwiki.org/xwiki/bin/view/Standards/CSSAPI