Wiki source code of Versioning
Last modified by Vincent Massol on 2026/11/23 22:13
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 1 | {{box cssClass="floatinginfobox" title="**Contents**"}} | ||
| 2 | {{toc/}} | ||
| 3 | {{/box}} | ||
| 4 | |||
| 5 | == Documentation Perspective == | ||
| 6 | |||
| 7 | * Documentation must be written from the perspective of the latest version. | ||
| 8 | * Differences between the latest version and the LTS or other supported versions should be documented secondarily using the [[##~~{~~{version}}## macro>>doc:xwiki:documentation.extensions.user.documentation.version-macro.WebHome]], along with the ##before## parameter. | ||
| 9 | * The documentation content should always reflect the current UI, behavior, and features. | ||
| 10 | |||
| 11 | == The "Version" Macro == | ||
| 12 | |||
| 13 | When documentation depends on specific versions of XWiki or on a released extension, you must indicate this using the [[##~~{~~{version}}## macro>>xwiki:DocApp.Code.VersionMacro]]. | ||
| 14 | |||
| 15 | * For XWiki itself, specify [[versions more recent or equal to the LTS version>>xwiki:Main.Support||anchor="HCommunitySupport"]], as long as that version is within the currently supported [[LTS cycle>>xwiki:Main.Support||anchor="HCommunitySupport"]]. | ||
| 16 | * For extensions, specify the released version and you must set the ##product## parameter to the name of the extension. Without it, the version is displayed and treated as an XWiki version. For example:((( | ||
| 17 | {{code language="none"}} | ||
| 18 | {{version product="JIRA" since="11.0"}}New feature...{{/version}} | ||
| 19 | {{/code}} | ||
| 20 | ))) | ||
| 21 | * For the [[XWiki Docker distribution>>xwiki:documentation.xs.admin.installation.methods.install-xwiki-docker.WebHome]], use the XWiki version(s) the change was released with, not a separate Docker version, and no ##product## parameter (the Docker images are released along with XWiki). | ||
| 22 | |||
| 23 | Example result: | ||
| 24 | |||
| 25 | {{gallery}} | ||
| 26 | image:version-macro-before.png | ||
| 27 | image:version-macro-since.png | ||
| 28 | image:product-version.png | ||
| 29 | {{/gallery}} | ||
| 30 | |||
| 31 | This helps readers know if the information applies to their XWiki instance. | ||
| 32 | |||
| 33 | Note: When the versions referenced in a ##~{~{version}}## macro are no longer within the supported LTS cycle, those version markers must be [[removed>>||anchor="HRemovingOldDocumentation"]]. | ||
| 34 | |||
| 35 | == Documenting a New Feature == | ||
| 36 | |||
| 37 | When documenting something that did not exist before: | ||
| 38 | |||
| 39 | * Use the ##~{~{version}}## macro, along with the ##since## parameter. Readers need to know if it exists in their version. For example:((( | ||
| 40 | {{code language="none"}} | ||
| 41 | {{version since="16.10.6, 17.3.0RC1"}} | ||
| 42 | The Realtime edit actions were included. | ||
| 43 | {{/version}} | ||
| 44 | {{/code}} | ||
| 45 | ))) | ||
| 46 | |||
| 47 | == Documenting UI Changes or Modified Behavior == | ||
| 48 | |||
| 49 | When describing something that existed before, but works differently now: | ||
| 50 | |||
| 51 | * Write the latest behavior normally (no macro). | ||
| 52 | * Use the ##before## parameter to describe the previous behavior. For example:((( | ||
| 53 | {{code language="none"}} | ||
| 54 | The tab uses the "Language" terminology ({{version before="16.10.12"}}Previously, the tab was using the "Locale" terminology{{/version}}). | ||
| 55 | {{/code}} | ||
| 56 | ))) | ||
| 57 | ** Note: Some UI changes may not be relevant enough to justify a version macro for showing the old UI. For example: | ||
| 58 | *** No text was added or modified. | ||
| 59 | *** The behavior remains the same. | ||
| 60 | *** The UI element that changed is located in the same area. | ||
| 61 | In such cases, adding a version macro with the ##before## parameter would only clutter the page with information that is not really helpful for readers. | ||
| 62 | |||
| 63 | == Removing Old Documentation == | ||
| 64 | |||
| 65 | The xwiki.org community only [[supports the Cycle LTS and beyond>>xwiki:Main.Support||anchor="HCommunitySupport"]]. Thus, the documentation on xwiki.org should be kept aligned and focus exclusively on supported versions. | ||
| 66 | |||
| 67 | Documentation gardening therefore involves: | ||
| 68 | |||
| 69 | * Removing documentation and [[versions macros>>||anchor="HThe22Version22Macro"]] for versions older than the current [[LTS cycle>>dev:Community.VersioningAndReleasePractices.WebHome||anchor="HReleaseCyclesandReleaseStrategy"]]. | ||
| 70 | * Remove mentions of old XWiki versions by removing the [[versions macros>>||anchor="HThe22Version22Macro"]] around valid content. This prevents the xwiki.org documentation from being littered with references to old (not supported) versions of XWiki. |