As part of our ongoing quest to standardise the rendering systems across Discourse’s codebase, we’re replacing the implementation of the topic-list.
Previously, this used a ‘raw handlebars’ (.hbr
) approach, and could be customized via template overrides and raw-plugin-outlets. The new implementation of the topic-list uses modern Glimmer components, and has been built from the ground-up to to be customizable in sustainable ways.
The new implementation is now available behind the glimmer_topic_list_mode
setting.
disabled
: use the legacy “raw handlebars” topic-listauto
: will detect the compatibility of your current plugins and themes. If any are incompatible, it will use the legacy system; otherwise it will use the new implementation.enabled
: will use the new topic-list implementation. If you have any incompatible plugins or themes, your site may be broken.
We’ve already updated most of our official themes and plugins to be compatible with the new menu. But, if you run any third-party plugins, themes, or theme components which customize the topic list, upgrading them will be required.
Warnings will be printed in the browser console identifying the source of the incompatibility.
Roll-out Timeline
These are rough estimates subject to change
Q4 2024:
- core implementation finished
- official themes/plugins updated (in progress)
- enabled on Meta
- published upgrade advice
Q1 2025:
-
glimmer_post_menu_mode
default toauto
; console deprecation messages enabled - third-party plugins and themes should be updated
- deprecations will trigger an admin warning banner for any remaining issues
- enabled the new topic-list by default
Q2 2025
- removal of the feature flag setting and legacy code
What does it mean for me?
If your plugin or theme has any ‘raw handlebars’ files (named .hbr
or .raw.hbs
) then those will need to be updated for compatibility with the new version. Regular .hbs
files for Ember components/routes are unaffected by this change.
Upgrades will also be required if you use modifyClass on component:topic-list
or component:topic-list-item
.
If your site has any of these incompatible customizations, warning messages will be printed to the browser developer console, including information about which theme/plugin is the cause.
What are the replacements?
Some of the old raw-plugin-outlets have been converted to regular Plugin Outlets.
To add, remove, reorder or replace columns in the topic-list, we’ve introduced a new topic-list-columns
value transformer.
The value transformer provides a DAG object which allows adding, replacing removing, or reordering the columns. When introducing new columns, regular Ember components can be passed in to the DAG.
Every customization is different, but here are some examples:
-
discourse-assign
introduces a new column to a specific topic-list -
discourse-calendar
uses one of the new plugin outlets to display the event date badge -
discourse-solved
uses a new valueTransformer to replace the previous modifyClass
We’ll continue to update this section with more examples over the coming weeks.
What about other customizations?
If your customization cannot be achieved using the new APIs we’ve introduced, please let us know by creating a new Dev topic to discuss.
I am a plugin/theme author. How do I update a theme/plugin to support both old and new topic list during the transition?
The new plugin outlets are rendered in both the old and new implementations of the topic list. So: when you’ve implemented the new one, simply delete the old raw-plugin-outlet connector.
For DAG-based customizations which replace template-overrides or non-modernized outlets, you will need to maintain both implementations during the transition period.
Once your theme/plugin supports both old and new implementations, you can add this magic comment at the top of all your .hbr
files:
{{!-- has-modern-replacement --}}
This will silence the deprecation messages, and allow the new implementation to be used when in “auto” mode.