[xwiki-contrib/documentation] 161fd6: DA-70: Support common content fragments for reuse
Branch: refs/heads/vmassol/DA-70 Home: https://github.com/xwiki-contrib/documentation Commit: 161fd66cd7f0f69848d9804f267a25a99b8d2f46 https://github.com/xwiki-contrib/documentation/commit/161fd66cd7f0f69848d980... Author: Vincent Massol <[email protected]> Date: 2026-10-11 (Sun, 11 Oct 2026) Changed paths: M documentation-api/pom.xml A documentation-api/src/main/java/org/xwiki/contrib/documentation/internal/ContentFragmentMacro.java A documentation-api/src/main/java/org/xwiki/contrib/documentation/internal/ContentFragmentMacroParameters.java A documentation-api/src/main/java/org/xwiki/contrib/documentation/internal/ContentFragmentMacroRefactoring.java A documentation-api/src/main/java/org/xwiki/contrib/documentation/internal/ContentFragments.java M documentation-api/src/main/java/org/xwiki/contrib/documentation/internal/DocumentationFAQDisplayer.java A documentation-api/src/main/java/org/xwiki/contrib/documentation/internal/DocumentationPropertyDisplayer.java M documentation-api/src/main/java/org/xwiki/contrib/documentation/script/DocumentationScriptService.java M documentation-api/src/main/resources/META-INF/components.txt A documentation-api/src/test/java/org/xwiki/contrib/documentation/internal/ContentFragmentMacroRefactoringTest.java A documentation-api/src/test/java/org/xwiki/contrib/documentation/internal/ContentFragmentMacroTest.java A documentation-api/src/test/java/org/xwiki/contrib/documentation/internal/ContentFragmentsTest.java M documentation-api/src/test/java/org/xwiki/contrib/documentation/internal/DocumentationContentMacroTest.java M documentation-api/src/test/java/org/xwiki/contrib/documentation/script/DocumentationScriptServiceTest.java M documentation-test/documentation-test-docker/pom.xml M documentation-test/documentation-test-docker/src/test/it/org/xwiki/contrib/documentation/test/docker/DocumentationIT.java A documentation-test/documentation-test-pageobjects/src/main/java/org/xwiki/contrib/documentation/test/po/DocumentationEditPage.java A documentation-ui/src/main/resources/DocApp/Code/ContentFragmentClass.xml A documentation-ui/src/main/resources/DocApp/Code/ContentFragmentsEdit.xml M documentation-ui/src/main/resources/DocApp/Code/DocumentationSheet.xml M documentation-ui/src/main/resources/DocApp/Code/Translations.xml Log Message: ----------- DA-70: Support common content fragments for reuse * Add a `DocApp.Code.ContentFragmentClass` class for content fragments: small wiki content held by the documentation page that owns it, so that reusing it doesn't require creating a hidden page that still shows in the navigation and the search for users who display hidden pages. * Add a `fragment` macro displaying a content fragment of the current page or of another page (`reference` parameter). The fragment is displayed as blocks of the calling page, so its headings are visible to the TOC, and is executed with the rights of the author of the page holding it. It supports the inline mode, checks the view right on the page holding the fragment, and reports a missing fragment or a fragment displaying itself. * Extract the display of the FAQ into a `DocumentationPropertyDisplayer`, shared by the FAQ and the content fragments. * Add a macro refactoring keeping the `reference` parameter in sync when the page holding the fragment, or the page containing the macro, is renamed, and exposing that page for backlinks. * List the pages using a content fragment, found from the backlinks of the page holding it (`$services.documentation.getContentFragmentUsages()`), so that the authors of a fragment know which pages their changes affect. * Let the authors add, edit and remove the content fragments of a page from its edit form (`DocApp.Code.ContentFragmentsEdit`, included by the documentation sheet in edit mode), along with the macro syntax to display each fragment and the pages using it. * Add unit tests and a functional test scenario, and raise the coverage threshold of the API module to 0.96. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> To unsubscribe from these emails, change your notification settings at https://github.com/xwiki-contrib/documentation/settings/notifications
participants (1)
-
XWiki Notifications