I’d like to propose an option to sort the comments on tasks.
Currently, the oldest comment is on the top and the newest at the bottom.
This is exactly the opposite as what we are used from trello.
Because we have many comments on tasks, scrolling to the bottom just to get the lastest update is cumbersome .
I’d propose adding a config value where these comments can be sorted either “asc” or “desc” by the time they were added.
I did not dig deeply into the code, but would it be sufficient to add a “sort by” statement here?
to OrderBy(“task_comments.created desc”) orders the comments descending when the task is opened.
A config value foe either “asc” or “desc” should be simple to add.
However, when a comment is added, it is still added to the end of the list. So there is still a piece (probable in the frontend code) I am missing.
I can see your point, but manually guiding all users to change this setting is not an option for us.
We migrated from Trello, so basically all users expect the comments to be in the other order.
Couldn’t it be both? Default value set in the config but overridable by the user?
@kolaente If this gets implemented, is it somehow possible to also change the position of the editor to add new comments?
F.e. if the comments are newest to oldest it would make sense to also place the editor to add new comments to the top.
I am unfortunately not really familiar with vuejs, what could be the nicest way to achieve this (without duplicating html code)?
I tried adressing this issue as a user setting.
A simple solution I came up with was to simply add a computated value
I’d rather sort the comments on the server only. Then the change would amount to passing the order set in the settings here, when loading the comments (via the authStore) and honoring the parameter here in the api.
I would add this as a query parameter, similar to how sorting works for tasks (look for the TaskCollection). Parameters with the query tag in Go structs are bound automatically.