-
-
Notifications
You must be signed in to change notification settings - Fork 605
XWIKI-20437: Wrong order of categories in space administration #4813
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
* Split the code of the findCustomSectionsToConfigure macro to make it a bit more readable/reusable. * Made a second lookup to get all the categories in all the cases, so that we always get all the order information. * The structures used are complexe for velocity, so deep copying was needed at some point. * The $query initialization was unnecessary on modern XS. * Added comments to explain a bit more the process.
...ration/xwiki-platform-administration-ui/src/main/resources/XWiki/ConfigurableClassMacros.xml
Outdated
Show resolved
Hide resolved
| #foreach ($entry in $adminMenu) | ||
| #set ($entryCopy = {}) | ||
| #set ($discard = $entryCopy.putAll($entry)) | ||
| #set ($entryChildrenCopy = []) | ||
| #set ($discard = $entryChildrenCopy.addAll($entry.children)) | ||
| #set ($discard = $entryCopy.put('children',$entryChildrenCopy)) | ||
| #set ($discard = $outputList.add($entryCopy)) | ||
| #end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| #foreach ($entry in $adminMenu) | |
| #set ($entryCopy = {}) | |
| #set ($discard = $entryCopy.putAll($entry)) | |
| #set ($entryChildrenCopy = []) | |
| #set ($discard = $entryChildrenCopy.addAll($entry.children)) | |
| #set ($discard = $entryCopy.put('children',$entryChildrenCopy)) | |
| #set ($discard = $outputList.add($entryCopy)) | |
| #end | |
| #set ($discard = $outputList.addAll($jsontool.fromString($jsontool.serialize($adminMenu)))) |
This should work because we're using only Map, List and simple types (string, number, boolean) to build the administration menu.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! That looks way better than what I had :)
Addressed in 24ee46e 👍
...ration/xwiki-platform-administration-ui/src/main/resources/XWiki/ConfigurableClassMacros.xml
Outdated
Show resolved
Hide resolved
...ration/xwiki-platform-administration-ui/src/main/resources/XWiki/ConfigurableClassMacros.xml
Outdated
Show resolved
Hide resolved
...ration/xwiki-platform-administration-ui/src/main/resources/XWiki/ConfigurableClassMacros.xml
Outdated
Show resolved
Hide resolved
...ration/xwiki-platform-administration-ui/src/main/resources/XWiki/ConfigurableClassMacros.xml
Outdated
Show resolved
Hide resolved
...ration/xwiki-platform-administration-ui/src/main/resources/XWiki/ConfigurableClassMacros.xml
Outdated
Show resolved
Hide resolved
* Updated comments style.
* Improved the deep copy workaround.
* Fixed a comment
* Fixed a comment
* Cleaned up initialization of params for the full order information query. Co-authored-by: Marius Dumitru Florea <[email protected]>
* Made a comment a bit clearer
Jira URL
https://jira.xwiki.org/browse/XWIKI-20437
Changes
Description
Clarifications
valueproperty on categories (the standard way, the one already used for sections in categories) instead of a linkedlist simili-structure to compute a score.Screenshots & Video
After the PR was applied on my local instance, it looked like:


Executed Tests
Manual tests (see screenshots above).
Docker tests for admin are really slow, so far though they did not fail (WIP).
Expected merging strategy