Sort order of Templates in the composer

AI-generated summary

The discussion revolves around the sort order of templates in the Discourse composer, specifically in version 2025.12.0-latest with Templates plugin 2.5.0. soeren-1 notes that templates are now displayed in a seemingly random order, which is less intuitive than the previous alphabetical sorting. awesomerobot clarifies that the change was intentional, prioritizing the most used templates at the top, as implemented in pull request #35881. However, the lack of clear indication for this change makes the behavior appear random, especially for users accustomed to alphabetical ordering. soeren-1 suggests that while the current heuristic may work for some, it becomes ambiguous in teams using diverse template categories. They propose either adding sorting options or allowing users to filter templates by category, leveraging the existing template plugin functionality for better UX.

Discourse 2025.12.0-latest, Discourse Templates 2.5.0

Composer → Insert template

The templates are displayed in a “random” order – neither alphabetically nor by timestamp – which makes selecting a template harder than necessary.

Feature request:

Make the template list in the composer sortable.

:slight_smile:  

additional note:

The templates were displayed in alphabetical order before. The actual “random” order appeared with the recent update.

1 Like

Looks like the sort order was changed so that the most used templates appear at the top, in UX: Improve template filtering with usage count and preserving tags by Alteras1 · Pull Request #35881 · discourse/discourse · GitHub… but there’s no indication of this, so it can certainly appear random, especially if you were accustomed to the previous alphabetical ordering.

This isn’t a bug because it’s working as indented, so I’m going to move it to a feature request for more sorting options. Thanks for the feedback!

4 Likes

Imagine a heterogeneous team using different template classes. In that context, “most used” quickly becomes ambiguous – which is exactly the case in our use scenario.

The UX would be more satisfying if you either allowed a sorting option or, if you stick with the current heuristic, provided a way to limit the selection to specific template classes.

The template plugin already supports multiple categories for storing templates. This could be leveraged to implement the latter approach.

Thanks :slight_smile:

2 Likes