From 2a9dcade0aa8ad0ecb752de8faaf55dcac6ca375 Mon Sep 17 00:00:00 2001 From: Krzysztof Kotlarek Date: Mon, 29 Jul 2024 14:20:12 +1000 Subject: [PATCH] UX: group admin new features by month (#28106) Display new features grouped by month and show additional information about the version. --- .../components/admin-config-area-card.gjs | 11 ++++-- .../components/dashboard-new-feature-item.gjs | 5 +++ .../components/dashboard-new-features.gjs | 35 +++++++++++++++--- .../templates/dashboard-new-features.hbs | 7 ++-- .../admin/addon/templates/whats-new.hbs | 7 ++-- .../stylesheets/common/admin/dashboard.scss | 24 ++++++++++--- app/assets/stylesheets/mobile/dashboard.scss | 9 +++++ config/locales/client.en.yml | 1 + .../admin_dashboard_new_features_spec.rb | 36 ++++++++++++++++--- .../pages/admin_dashboard_new_features.rb | 10 ++++++ 10 files changed, 126 insertions(+), 19 deletions(-) diff --git a/app/assets/javascripts/admin/addon/components/admin-config-area-card.gjs b/app/assets/javascripts/admin/addon/components/admin-config-area-card.gjs index 78ad09b7af8..d2b5e0af90d 100644 --- a/app/assets/javascripts/admin/addon/components/admin-config-area-card.gjs +++ b/app/assets/javascripts/admin/addon/components/admin-config-area-card.gjs @@ -1,13 +1,20 @@ import Component from "@glimmer/component"; import { tracked } from "@glimmer/tracking"; -import i18n from "discourse-common/helpers/i18n"; +import I18n from "discourse-i18n"; export default class AdminConfigAreaCard extends Component { @tracked collapsed = false; + get computedHeading() { + if (this.args.heading) { + return I18n.t(this.args.heading); + } + return this.args.translatedHeading; + } +