[xwiki/xwiki-platform] 6e0ae4: XWIKI-18921: Panel Navigation: duplicated IDs
Branch: refs/heads/master Home: https://github.com/xwiki/xwiki-platform Commit: 6e0ae421af9a7d1aff2f9d0548fe383c158ffb39 https://github.com/xwiki/xwiki-platform/commit/6e0ae421af9a7d1aff2f9d0548fe3... Author: Marius Dumitru Florea <[email protected]> Date: 2026-09-11 (Fri, 11 Sep 2026) Changed paths: M xwiki-platform-core/xwiki-platform-tree/pom.xml R xwiki-platform-core/xwiki-platform-tree/xwiki-platform-tree-test-pageobjects/pom.xml R xwiki-platform-core/xwiki-platform-tree/xwiki-platform-tree-test-pageobjects/src/main/java/org/xwiki/tree/test/po/TreeElement.java R xwiki-platform-core/xwiki-platform-tree/xwiki-platform-tree-test-pageobjects/src/main/java/org/xwiki/tree/test/po/TreeNodeElement.java A xwiki-platform-core/xwiki-platform-tree/xwiki-platform-tree-test/pom.xml A xwiki-platform-core/xwiki-platform-tree/xwiki-platform-tree-test/xwiki-platform-tree-test-docker/pom.xml A xwiki-platform-core/xwiki-platform-tree/xwiki-platform-tree-test/xwiki-platform-tree-test-docker/src/test/it/org/xwiki/tree/test/ui/AllIT.java A xwiki-platform-core/xwiki-platform-tree/xwiki-platform-tree-test/xwiki-platform-tree-test-docker/src/test/it/org/xwiki/tree/test/ui/TreeMacroIT.java A xwiki-platform-core/xwiki-platform-tree/xwiki-platform-tree-test/xwiki-platform-tree-test-pageobjects/pom.xml A xwiki-platform-core/xwiki-platform-tree/xwiki-platform-tree-test/xwiki-platform-tree-test-pageobjects/src/main/java/org/xwiki/tree/test/po/TreeElement.java A xwiki-platform-core/xwiki-platform-tree/xwiki-platform-tree-test/xwiki-platform-tree-test-pageobjects/src/main/java/org/xwiki/tree/test/po/TreeNodeElement.java M xwiki-platform-core/xwiki-platform-tree/xwiki-platform-tree-webjar/src/main/webjar/tree.js Log Message: ----------- XWIKI-18921: Panel Navigation: duplicated IDs * Prefix the rendered anchor id of every tree node, not only of the nodes loaded from the server: the tree takes over this id when the node is redrawn, which is the single place where jsTree computes it, so that the nodes created from JavaScript (e.g. the new page nodes created by the entity resource picker, or the nodes created by extensions) get it too * Expose #getNodeAnchorId() on the tree instance so that the code using the tree doesn't have to rebuild this id * Generate the tree id before the tree is created, because the nodes can be drawn synchronously when the tree data comes from the HTML inside the tree element * Go back to the tree elements after un-wrapping the links generated from wiki syntax, instead of adding those links to the elements the tree is created on * Look for the selected node anchor relative to its node, in TreeElement, instead of rebuilding its id * Add xwiki-platform-tree-test, move the tree page objects inside it and add functional tests for the Tree macro, checking that two trees displaying the same nodes don't generate duplicate ids Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> To unsubscribe from these emails, change your notification settings at https://github.com/xwiki/xwiki-platform/settings/notifications
participants (1)
-
XWiki Notifications