There are 2 comments.
 
 
XWiki Platform / cid:jira-generated-image-avatar-6e5cf9fd-c011-4e98-9a94-d85bbf8b54f0 XWIKI-23116 Open

Documents macro should not have the likes column when it's not asked

 
View issue   ยท   Add comment
 

2 comments

 
cid:jira-generated-image-avatar-371f18bc-b5a9-45b2-a38c-aefbdf41e5b0 Vincent Massol on 23/Jun/25 10:28
 

BTW I also propose to do the same for the "actions" columns with an "actions" column.

There's already an actions parameter to turn on/off the actions column (on by default).

So we have 2 choices:
1) Add a "like" parameters to the macro to turn on/off the likes column (similar to the "actions" param), and make it true by default (to not change the current behavior)
2) Deprecate the "actions" parameter and allow users to use "_like" and "_actions" in the "columns" parameter

Solution 2 is my preference as it's the most natural way, and matches what is already documented for the "columns" parameter:

If specified, only display specified columns (e.g. doc.name,doc.author). The default value is doc.title,doc.location,doc.date,doc.author. See the Livetable documentation for the list of available columns.

And the LT documentation documents the "_actions" and "_likes" columns.

Note that solution 2 breaks the backward compatibility a bit since the user would need to explicitly say that he/she wants to have these columns as they won't be displayed by default.

I'm going to send a forum proposal.

 
cid:jira-generated-image-avatar-371f18bc-b5a9-45b2-a38c-aefbdf41e5b0 Vincent Massol on 23/Jun/25 10:32
 
bq. BTW I also propose to do the same for the "actions" columns with an "actions" column.

There's already an {{actions}} parameter to turn on/off the actions column (on by default).

So we have 2 choices:
1) Add a "like" parameters to the macro to turn on/off the likes column (similar to the "actions" param), and make it true by default (to not change the current behavior)
2) Deprecate the "actions" parameter and allow users to use "_like" and "_actions" in the "columns" parameter

Solution 2 is my preference as it's the most natural way, and matches what is already documented for the "columns" parameter:

bq. If specified, only display specified columns (e.g. doc.name,doc.author). The default value is doc.title,doc.location,doc.date,doc.author. See the Livetable documentation for the list of available columns.

And the LT documentation documents the "_actions" and "_likes" columns.

Note that solution 2
breaks may not break the backward compatibility a  bit since if we add the user would need _likes and _actions column to explicitly say that he/she wants to have these columns as they won't be displayed by the default columns value .

I'm going to send a forum proposal.