From 140d9aadfef9851c33c350af0be99b2a78089332 Mon Sep 17 00:00:00 2001 From: Jarek Radosz Date: Tue, 17 Sep 2024 17:39:24 +0200 Subject: [PATCH] DEV: Remove unused code from glimmer topic list (#28946) --- .../components/topic-list/activity-column.gjs | 52 ++++++++----------- .../topic-list/latest-topic-list-item.gjs | 7 +-- .../app/components/topic-list/list.gjs | 2 - .../topic-list/topic-list-header-column.gjs | 1 - .../components/topic-list/topic-list-item.gjs | 2 - 5 files changed, 22 insertions(+), 42 deletions(-) diff --git a/app/assets/javascripts/discourse/app/components/topic-list/activity-column.gjs b/app/assets/javascripts/discourse/app/components/topic-list/activity-column.gjs index 3f9875433b2..9b522af40ee 100644 --- a/app/assets/javascripts/discourse/app/components/topic-list/activity-column.gjs +++ b/app/assets/javascripts/discourse/app/components/topic-list/activity-column.gjs @@ -1,39 +1,29 @@ -import Component from "@glimmer/component"; import { hash } from "@ember/helper"; -import { service } from "@ember/service"; import { htmlSafe } from "@ember/template"; import PluginOutlet from "discourse/components/plugin-outlet"; import coldAgeClass from "discourse/helpers/cold-age-class"; import concatClass from "discourse/helpers/concat-class"; -import element from "discourse/helpers/element"; import formatDate from "discourse/helpers/format-date"; -export default class ActivityColumn extends Component { - @service siteSettings; - - get wrapperElement() { - return element(this.args.tagName ?? "td"); - } - - ; +export default ActivityColumn; diff --git a/app/assets/javascripts/discourse/app/components/topic-list/latest-topic-list-item.gjs b/app/assets/javascripts/discourse/app/components/topic-list/latest-topic-list-item.gjs index c940bd0a958..510397eb637 100644 --- a/app/assets/javascripts/discourse/app/components/topic-list/latest-topic-list-item.gjs +++ b/app/assets/javascripts/discourse/app/components/topic-list/latest-topic-list-item.gjs @@ -1,6 +1,5 @@ import Component from "@glimmer/component"; import { concat, hash } from "@ember/helper"; -import { service } from "@ember/service"; import PluginOutlet from "discourse/components/plugin-outlet"; import PostsCountColumn from "discourse/components/topic-list/posts-count-column"; import TopicPostBadges from "discourse/components/topic-post-badges"; @@ -16,12 +15,8 @@ import topicFeaturedLink from "discourse/helpers/topic-featured-link"; import topicLink from "discourse/helpers/topic-link"; export default class LatestTopicListItem extends Component { - @service appEvents; - get tagClassNames() { - if (this.args.topic.tags) { - return this.args.topic.tags.map((tagName) => `tag-${tagName}`); - } + return this.args.topic.tags?.map((tagName) => `tag-${tagName}`); }