From 636be8cac53e909e6c296dc3ba3c8af7851b8ad2 Mon Sep 17 00:00:00 2001 From: David Taylor Date: Fri, 12 Aug 2022 17:05:51 +0100 Subject: [PATCH] DEV: Remove `discourse/components/glimmer` superclass (#17877) This was a temporary solution while we updated the resolver and migrated all our singletons to true ember services. Now that's done, we can switch to use `@glimmer/component` directly, and explicitly inject services as required. --- .../discourse/app/components/glimmer.js | 24 ------------------- 1 file changed, 24 deletions(-) delete mode 100644 app/assets/javascripts/discourse/app/components/glimmer.js diff --git a/app/assets/javascripts/discourse/app/components/glimmer.js b/app/assets/javascripts/discourse/app/components/glimmer.js deleted file mode 100644 index b3142a9060a..00000000000 --- a/app/assets/javascripts/discourse/app/components/glimmer.js +++ /dev/null @@ -1,24 +0,0 @@ -import GlimmerComponent from "@glimmer/component"; -import { inject as service } from "@ember/service"; - -/* - Glimmer components are not EmberObjects, and therefore do not support automatic - injection of the things defined in `pre-initializers/inject-discourse-objects`. - - This base class provides an alternative. All these references are looked up lazily, - so the performance impact should be negligible -*/ - -export default class DiscourseGlimmerComponent extends GlimmerComponent { - @service appEvents; - @service store; - @service("search") searchService; - @service keyValueStore; - @service pmTopicTrackingState; - @service siteSettings; - @service messageBus; - @service currentUser; - @service session; - @service site; - @service topicTrackingState; -}