This issue has been created
There are 2 updates, 1 comment.
 
 
XWiki Platform / cid:jira-generated-image-avatar-fa281d0f-4f07-4d60-8946-b18b5f928558 XWIKI-24683 Open

Factorize the duplicated user-with-avatar display macro in likers.vm and getusers.vm

 
View issue   ·   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-4f284777-3129-415b-86d2-90076667c046 Charpentier Lucas created this issue on 11/Aug/26 14:50
 
Summary: Factorize the duplicated user-with-avatar display macro in likers.vm and getusers.vm
Issue Type: cid:jira-generated-image-avatar-fa281d0f-4f07-4d60-8946-b18b5f928558 Improvement
Affects Versions: 18.6.0
Assignee: Unassigned
Components: Like
Created: 11/Aug/26 14:50
Priority: cid:jira-generated-image-static-major-84f569a7-65cc-4ec2-9a68-670a3b6c41fd Major
Reporter: Charpentier Lucas
Description:

`likers.vm` and `getusers.vm` each define their own local, identical
`#displayUserAliasWithAvatar($userReference $disabled)` Velocity macro to render a user's
avatar + link, instead of reusing the standard `displayUser` macro from `macros.vm`.

This is a maintenance problem: the two templates carry duplicated markup/logic for
something XWiki already has a shared, standard macro for. Any future change to how a
user is displayed (permission handling, styling, accessibility, etc. — e.g. the
non-viewable-user handling fixed in XWIKI-23995) has to be found and re-applied in both
copies instead of being fixed once in `displayUser`. The local macros also lag behind
`displayUser` in capability, since they were never touched when that macro evolved.

This ticket is about eliminating that duplication so both templates go through the
standard `displayUser` macro, with no visible change in how users are rendered in either
template.

 
 

2 updates

 
cid:jira-generated-image-avatar-4f284777-3129-415b-86d2-90076667c046 Changes by Charpentier Lucas on 11/Aug/26 14:51
 
Description: `likers.vm` and `getusers.vm` each define their own local, identical
`#displayUserAliasWithAvatar($userReference $disabled)` Velocity macro to render a user's
avatar + link, instead of reusing the standard `displayUser` macro from `macros.vm`.

This is a maintenance problem: the two templates carry duplicated markup/logic for

something XWiki already has a shared, standard macro for. Any future change to how a
user is displayed (permission handling, styling, accessibility, etc. — e.g. the
non-viewable-user handling fixed in XWIKI-23995) has to be found and re-applied in both
copies instead of being fixed once in `displayUser`. The local macros also lag behind
`displayUser` in capability, since they were never touched when that macro evolved.

This ticket is about eliminating that duplication so both templates go through the

standard `displayUser` macro, with no visible change in how users are rendered in either
template.
Assignee: Charpentier Lucas
 
 

1 comment

 
cid:jira-generated-image-avatar-4f284777-3129-415b-86d2-90076667c046 Charpentier Lucas on 11/Aug/26 14:53
 

Started a PR at https://github.com/xwiki/xwiki-platform/pull/5057