Relevant wish: W469: Allow posting new sections to top of Talk pages
Background
Using Extension:PlaceNewSection (T355164) comes with caveats, namely that communities must decide for all users whether a particular page has new sections posted at the top or the at the bottom. The extension also isn't completely compatible with DiscussionTools.
An idea instead is to add this feature directly to DiscussionTools. With the rollout of Parsoid, each thread is its own <section> element. Combined with DiscussionTools structured data, this allows us to more easily re-order the content.
Proposed solution
In discussion with Editing-team and Content-Transform-Team, an alternative solution was identified to patch DiscussionTools to allow sorting of threads clientside, based on a user preference. Imagine the common experience on Q&A sites and social media where you can sort by timestamp ascending or descending, and possibly other sorting as well such as "Last modified".
When using DiscussionTools or simply viewing a discussion page, the UI will appear to match the preference, but under the hood we'd still post new sections to the bottom as is default MW behaviour.
Drawbacks
- Relies on Parsoid-Read-Views.
- This conveniently is slated to be 100% rolled out to all Wikipedias by June 2026. Long-term, the Parsoid dependency should not be an issue.
- Edge cases can exist such as where there's mixed discussion and content, or different heading levels for topics.
- Could be avoided with a __NO_REORDER__ magic word or the like.
- DiscussionTools could disable re-ordering if its parse detected any non-discussion sections.
- Editors who want to edit the full wikitext may be confused by the rendered order versus the actual order in the wikitext.
- Perhaps something users would become accustomed to over time, or such users may prefer to always the sorting be "natural" (as it lives in the wikitext).
