XWIKI-10514: Improve the display of the Tree View on Flamingo.

(cherry picked from commit 8fbeff6cf86b873b156edd97af29fdf536a76073)