The discussion revolves around the deprecation of Ember string prototype extensions in Ember 4.x and beyond, with merefield noting that @ember/string appears absent in Ember 5.x, suggesting a temporary fix may not be sustainable. david clarifies that only prototype extensions (e.g., "mystring".capitalize()) are deprecated, not the utility functions themselves — which can still be imported and used as import { capitalize } from "@ember/string". He recommends updating code like the topic-list-previews component accordingly, referencing deprecation docs. david also reports that only a few public plugins need updating, and he’s submitted PRs to fix them: discourse-layouts and discourse-news. He explains that while a patch could restore the deprecated functionality (as detailed in this PR), it’s not ideal due to upstream dependency complexity and the imminent removal anyway. Thus, he formalized the removal in PR #24110. merefield agrees with the strategy and thanks david for the proactive fixes.
Problem is @ember/string is deprecated it appears after Ember 4.x? I can’t see this package in Ember 5.x … so this would just be a bandaid until Discourse rapidly moves into 5.x (which David alluded to here: Upgrading Discourse to Ember 4 - #14 by david)
@David what’s the right call here - use native Javascript (like I have)?
I had a look through all-the-themes and all-the-plugins, and there are just a couple of public plugins which need fixing up. I made PRs here: (cc @merefield@angus)
Godfrey did some digging for us into why the JQuery commit triggered this, and his findings are in this PR. So, it’s technically possible for us to restore this functionality, but it involves applying a patch to an upstream dependency which is not ideal.
Given the complexity, and that we’d be removing them in a few months anyway, I think it makes sense to just double-down on the removal now. I’ve formalised that in this PR: