Skip to content

A platform for community discussion. Free, open, simple.

FEATURE: dedicated admin section for new features (#24292)

Krzysztof Kotlarek96c5a6c9ca15
diff --git a/app/assets/javascripts/admin/addon/components/dashboard-new-feature-item.gjs b/app/assets/javascripts/admin/addon/components/dashboard-new-feature-item.gjs
new file mode 100644
index 00000000000..e541608bb7e
--- /dev/null
+++ b/app/assets/javascripts/admin/addon/components/dashboard-new-feature-item.gjs
@@ -0,0 +1,44 @@
+import Component from "@glimmer/component";
+import CookText from "discourse/components/cook-text";
+import i18n from "discourse-common/helpers/i18n";
+import and from "truth-helpers/helpers/and";
+import not from "truth-helpers/helpers/not";
+
+export default class DashboardNewFeatureItem extends Component {
+ <template>
+ <div class="admin-new-feature-item">
+ <div class="admin-new-feature-item__content">
+ <div class="admin-new-feature-item__header">
+ <h3>
+ {{@item.title}}
+ </h3>
+ {{#if (and @item.emoji (not @item.screenshot_url))}}
+ <div
+ class="admin-new-feature-item__new-feature-emoji"
+ >{{@item.emoji}}</div>
+ {{/if}}
+ </div>
+ {{#if @item.screenshot_url}}
+ <img
+ src={{@item.screenshot_url}}
+ class="admin-new-feature-item__screenshot"
+ alt={{@item.title}}
+ />
+ {{/if}}
+ <div class="admin-new-feature-item__feature-description">
+ <CookText @rawText={{@item.description}} />
+ {{#if @item.link}}
+ <a
+ href={{@item.link}}
+ target="_blank"
+ rel="noopener noreferrer"
+ class="admin-new-feature-item__learn-more"
+ >
+ {{i18n "admin.dashboard.new_features.learn_more"}}
+ </a>
+ {{/if}}
+ </div>
+ </div>
+ </div>
+ </template>
+}
diff --git a/app/assets/javascripts/admin/addon/components/dashboard-new-feature-item.hbs b/app/assets/javascripts/admin/addon/components/dashboard-new-feature-item.hbs
deleted file mode 100644
index fd54bd7d2e2..00000000000
--- a/app/assets/javascripts/admin/addon/components/dashboard-new-feature-item.hbs
+++ /dev/null
@@ -1,17 +0,0 @@
-<div class="admin-new-feature-item">
- <div class="new-feature-emoji">{{this.item.emoji}}</div>
- <div class="new-feature-content">
- <div class="header">
- {{#if this.item.link}}
- <a
- href={{this.item.link}}
- target="_blank"
- rel="noopener noreferrer"
- >{{this.item.title}}</a>
- {{else}}
- {{this.item.title}}
- {{/if}}
- </div>
- <div class="feature-description">{{this.item.description}}</div>
- </div>
-</div>
\ No newline at end of file
diff --git a/app/assets/javascripts/admin/addon/components/dashboard-new-feature-item.js b/app/assets/javascripts/admin/addon/components/dashboard-new-feature-item.js
deleted file mode 100644
index 80e6cd8a167..00000000000
--- a/app/assets/javascripts/admin/addon/components/dashboard-new-feature-item.js
+++ /dev/null
@@ -1,3 +0,0 @@
-import Component from "@ember/component";
-
-export default class DashboardNewFeatureItem extends Component {}
diff --git a/app/assets/javascripts/admin/addon/components/dashboard-new-features.gjs b/app/assets/javascripts/admin/addon/components/dashboard-new-features.gjs
new file mode 100644
index 00000000000..d3e16110b62
--- /dev/null
+++ b/app/assets/javascripts/admin/addon/components/dashboard-new-features.gjs
@@ -0,0 +1,42 @@
+import Component from "@glimmer/component";
+import { tracked } from "@glimmer/tracking";
+import didInsert from "@ember/render-modifiers/modifiers/did-insert";
+import { htmlSafe } from "@ember/template";
+import { ajax } from "discourse/lib/ajax";
+import i18n from "discourse-common/helpers/i18n";
+import { bind } from "discourse-common/utils/decorators";
+import DashboardNewFeatureItem from "admin/components/dashboard-new-feature-item";
+
+export default class DashboardNewFeatures extends Component {
+ @tracked newFeatures = null;
+ @tracked isLoaded = false;
+
+ @bind
+ loadNewFeatures() {
+ ajax("/admin/dashboard/new-features.json")
+ .then((json) => {
+ this.newFeatures = json.new_features;
+ this.isLoaded = true;
+ })
+ .finally(() => {
+ this.isLoaded = true;
+ });
+ }
+
+ <template>
+ <div class="section-body" {{didInsert this.loadNewFeatures}}>
+ {{#if this.newFeatures}}
+ {{#each this.newFeatures as |feature|}}
+ <DashboardNewFeatureItem @item={{feature}} />
+ {{/each}}
+ {{else if this.isLoaded}}
+ {{htmlSafe
+ (i18n
+ "admin.dashboard.new_features.previous_announcements"
+ url="https://meta.discourse.org/tags/c/announcements/67/release-notes"
+ )
+ }}
+ {{/if}}
+ </div>
+ </template>
+}
diff --git a/app/assets/javascripts/admin/addon/components/dashboard-new-features.hbs b/app/assets/javascripts/admin/addon/components/dashboard-new-features.hbs
deleted file mode 100644
index b455f3d29f5..00000000000
--- a/app/assets/javascripts/admin/addon/components/dashboard-new-features.hbs
+++ /dev/null
@@ -1,28 +0,0 @@
-{{#if this.newFeatures}}
- <div class="section-title">
- <h2>{{replace-emoji (i18n "admin.dashboard.new_features.title")}}</h2>
- </div>
-
- <div class="section-body {{this.columnCountClass}}">
- {{#each this.newFeatures as |feature|}}
- <DashboardNewFeatureItem @item={{feature}} @tagName="" />
- {{/each}}
- </div>
- <div class="section-footer">
- {{#if this.releaseNotesLink}}
- <a
- rel="noopener noreferrer"
- target="_blank"
- href={{this.releaseNotesLink}}
- class="btn btn-primary new-features-release-notes"
- >
- {{i18n "admin.dashboard.new_features.learn_more"}}
- </a>
- {{/if}}
- <DButton
- @label="admin.dashboard.new_features.dismiss"
- @action={{this.dismissNewFeatures}}
- class="btn-default new-features-dismiss"
- />
- </div>
-{{/if}}
\ No newline at end of file
diff --git a/app/assets/javascripts/admin/addon/components/dashboard-new-features.js b/app/assets/javascripts/admin/addon/components/dashboard-new-features.js
deleted file mode 100644
index 141833627fb..00000000000
--- a/app/assets/javascripts/admin/addon/components/dashboard-new-features.js
+++ /dev/null
@@ -1,39 +0,0 @@
-import Component from "@ember/component";
-import { action, computed } from "@ember/object";
-import { classNameBindings, classNames } from "@ember-decorators/component";
-import { ajax } from "discourse/lib/ajax";
-
-@classNames("section", "dashboard-new-features")
-@classNameBindings("hasUnseenFeatures:ordered-first")
-export default class DashboardNewFeatures extends Component {
- newFeatures = null;
- releaseNotesLink = null;
-
- constructor() {
- super(...arguments);
-
- ajax("/admin/dashboard/new-features.json").then((json) => {
- if (this.isDestroying || this.isDestroyed) {
- return;
- }
-
- this.setProperties({
- newFeatures: json.new_features,
- hasUnseenFeatures: json.has_unseen_features,
- releaseNotesLink: json.release_notes_link,
- });
- });
- }
-
- @computed("newFeatures")
- get columnCountClass() {
- return this.newFeatures.length > 2 ? "three-or-more-items" : "";
- }
-
- @action
- dismissNewFeatures() {
- ajax("/admin/dashboard/mark-new-features-as-seen.json", {
- type: "PUT",
- }).then(() => this.set("hasUnseenFeatures", false));
- }
-}
diff --git a/app/assets/javascripts/admin/addon/controllers/admin-dashboard-new-features.js b/app/assets/javascripts/admin/addon/controllers/admin-dashboard-new-features.js
new file mode 100644
index 00000000000..946e1a03641
--- /dev/null
+++ b/app/assets/javascripts/admin/addon/controllers/admin-dashboard-new-features.js
@@ -0,0 +1,3 @@
+import Controller from "@ember/controller";
+
+export default class AdminDashboardNewFeaturesController extends Controller {}
diff --git a/app/assets/javascripts/admin/addon/controllers/admin-dashboard.js b/app/assets/javascripts/admin/addon/controllers/admin-dashboard.js
index cf95ce7fe3b..0086624e764 100644
--- a/app/assets/javascripts/admin/addon/controllers/admin-dashboard.js
+++ b/app/assets/javascripts/admin/addon/controllers/admin-dashboard.js
@@ -50,6 +50,11 @@ export default class AdminDashboardController extends Controller {
return this.visibleTabs.includes("reports");
}
+ @computed("visibleTabs")
+ get isNewFeaturesTabVisible() {
+ return this.visibleTabs.includes("features");
+ }
+
fetchProblems() {
if (this.isLoadingProblems) {
return;
diff --git a/app/assets/javascripts/admin/addon/routes/admin-dashboard-new-features.js b/app/assets/javascripts/admin/addon/routes/admin-dashboard-new-features.js
new file mode 100644
index 00000000000..3141e23a6b2
--- /dev/null
+++ b/app/assets/javascripts/admin/addon/routes/admin-dashboard-new-features.js
@@ -0,0 +1,3 @@
+import DiscourseRoute from "discourse/routes/discourse";
+
+export default class AdminDashboardNewFeaturesRoute extends DiscourseRoute {}
diff --git a/app/assets/javascripts/admin/addon/routes/admin-route-map.js b/app/assets/javascripts/admin/addon/routes/admin-route-map.js
index d7c1c958a3e..e615cddd209 100644
--- a/app/assets/javascripts/admin/addon/routes/admin-route-map.js
+++ b/app/assets/javascripts/admin/addon/routes/admin-route-map.js
@@ -14,6 +14,10 @@ export default function () {
path: "/dashboard/reports",
resetNamespace: true,
});
+ this.route("admin.dashboardNewFeatures", {
+ path: "/dashboard/new-features",
+ resetNamespace: true,
+ });
});
this.route(
diff --git a/app/assets/javascripts/admin/addon/templates/dashboard-new-features.hbs b/app/assets/javascripts/admin/addon/templates/dashboard-new-features.hbs
new file mode 100644
index 00000000000..8924d2646f5
--- /dev/null
+++ b/app/assets/javascripts/admin/addon/templates/dashboard-new-features.hbs
@@ -0,0 +1,4 @@
+<ConditionalLoadingSpinner @condition={{this.isLoading}}>
+ <h2>{{i18n "admin.dashboard.new_features.title"}}</h2>
+ <DashboardNewFeatures />
+</ConditionalLoadingSpinner>
\ No newline at end of file
diff --git a/app/assets/javascripts/admin/addon/templates/dashboard.hbs b/app/assets/javascripts/admin/addon/templates/dashboard.hbs
index 4f612dcd82d..60b72555e21 100644
--- a/app/assets/javascripts/admin/addon/templates/dashboard.hbs
+++ b/app/assets/javascripts/admin/addon/templates/dashboard.hbs
@@ -50,13 +50,19 @@
</li>
{{/if}}
+ {{#if this.isNewFeaturesTabVisible}}
+ <li class="navigation-item new-features">
+ <LinkTo @route="admin.dashboardNewFeatures" class="navigation-link">
+ {{i18n "admin.dashboard.new_features.title"}}
+ </LinkTo>
+ </li>
+ {{/if}}
+
<PluginOutlet @name="admin-dashboard-tabs-after" />
</ul>
{{outlet}}
-<DashboardNewFeatures @tagName="div" />
-
<span>
<PluginOutlet @name="admin-dashboard-bottom" @connectorTagName="div" />
</span>
\ No newline at end of file
diff --git a/app/assets/javascripts/discourse/app/lib/notification-types/new-features.js b/app/assets/javascripts/discourse/app/lib/notification-types/new-features.js
index bd5b900c4b4..91a819a96f8 100644
--- a/app/assets/javascripts/discourse/app/lib/notification-types/new-features.js
+++ b/app/assets/javascripts/discourse/app/lib/notification-types/new-features.js
@@ -12,7 +12,7 @@ export default class extends NotificationTypeBase {
}
get linkHref() {
- return getURL("/admin");
+ return getURL("/admin/dashboard/new-features");
}
get icon() {
diff --git a/app/assets/javascripts/discourse/tests/acceptance/dashboard-test.js b/app/assets/javascripts/discourse/tests/acceptance/dashboard-test.js
index 13a7deeb745..59377e1ebe9 100644
--- a/app/assets/javascripts/discourse/tests/acceptance/dashboard-test.js
+++ b/app/assets/javascripts/discourse/tests/acceptance/dashboard-test.js
@@ -11,7 +11,7 @@ import selectKit from "discourse/tests/helpers/select-kit-helper";
acceptance("Dashboard", function (needs) {
needs.user();
needs.settings({
- dashboard_visible_tabs: "moderation|security|reports",
+ dashboard_visible_tabs: "moderation|security|reports|features",
dashboard_general_tab_activity_metrics: "page_view_total_reqs",
});
needs.site({
@@ -140,8 +140,10 @@ acceptance("Dashboard", function (needs) {
test("new features", async function (assert) {
await visit("/admin");
+ await click(".dashboard .navigation-item.new-features .navigation-link");
+
assert.ok(exists(".dashboard-new-features"));
- assert.ok(exists(".dashboard-new-features .new-features-release-notes"));
+ assert.ok(exists("img.admin-new-feature-item__screenshot"));
});
});
diff --git a/app/assets/javascripts/discourse/tests/fixtures/dashboard-new-features.js b/app/assets/javascripts/discourse/tests/fixtures/dashboard-new-features.js
index f9c47b8752c..babd3d897d3 100644
--- a/app/assets/javascripts/discourse/tests/fixtures/dashboard-new-features.js
+++ b/app/assets/javascripts/discourse/tests/fixtures/dashboard-new-features.js
@@ -10,6 +10,7 @@ export default {
"New light and dark color palettes that adhere to Web Content Accessibility Guidelines. ",
tier: [],
link: "https://meta.discourse.org",
+ screenshot_url: "screenshot.jpg",
created_at: "2021-01-18T19:59:29.666Z",
updated_at: "2021-01-19T19:33:16.150Z",
},
@@ -22,6 +23,7 @@ export default {
"Staff can now suspend or silence a user immediately, without needing to visit the review queue or admin page. ",
tier: [],
link: "",
+ screenshot_url: "screenshot.jpg",
created_at: "2021-01-19T19:20:09.757Z",
updated_at: "2021-01-19T19:20:09.757Z",
},
diff --git a/app/assets/stylesheets/common/admin/dashboard.scss b/app/assets/stylesheets/common/admin/dashboard.scss
index 7874e517195..1bbe788a8de 100644
--- a/app/assets/stylesheets/common/admin/dashboard.scss
+++ b/app/assets/stylesheets/common/admin/dashboard.scss
@@ -45,6 +45,10 @@
@include active-navigation-item;
}
+ &.dashboard-new-features .navigation-item.new-features {
+ @include active-navigation-item;
+ }
+
&.general .navigation-item.general {
@include active-navigation-item;
}
@@ -651,24 +655,11 @@
}
&:not(.ordered-first) {
- .section-title {
- margin-top: 1.5em;
- }
-
.new-features-dismiss {
display: none;
}
}
- .section-body {
- display: grid;
- grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
- grid-gap: 1.5em;
- &.three-or-more-items {
- grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
- }
- }
-
.section-footer {
margin: 1.5em;
display: flex;
@@ -683,22 +674,31 @@
.admin-new-feature-item {
display: flex;
align-items: flex-start;
+ margin-bottom: 1.5em;
+ background-color: var(--primary-very-low);
+ padding: 1em;
- .new-feature-emoji {
+ &__new-feature-emoji {
font-size: 3.5em;
- padding-right: 0.5em;
padding-left: 0.5em;
- width: 25%;
- text-align: center;
}
- .new-feature-content {
+ &__content {
padding-right: 0.5em;
- width: 75%;
- .header {
- font-size: var(--font-up-1);
- font-weight: bold;
- margin-bottom: 0.5em;
- }
+ width: 100%;
+ }
+ &__feature-description {
+ padding-top: 1em;
+ }
+ &__header {
+ display: flex;
+ align-items: flex-start;
+ justify-content: space-between;
+ font-size: var(--font-up-1);
+ font-weight: bold;
+ margin-bottom: 0.5em;
+ }
+ &__screenshot {
+ width: 100%;
}
}
diff --git a/app/assets/stylesheets/mobile/dashboard.scss b/app/assets/stylesheets/mobile/dashboard.scss
index 1a0aaf36925..fec5d4bea4a 100644
--- a/app/assets/stylesheets/mobile/dashboard.scss
+++ b/app/assets/stylesheets/mobile/dashboard.scss
@@ -11,9 +11,8 @@
}
.admin-new-feature-item {
- .new-feature-emoji {
+ &__new-feature-emoji {
padding-left: 0em;
- padding-right: 0.25em;
}
}
}
diff --git a/config/locales/client.ar.yml b/config/locales/client.ar.yml
index 9c2eed3d35b..55bcb6fa4f8 100644
--- a/config/locales/client.ar.yml
+++ b/config/locales/client.ar.yml
@@ -5082,8 +5082,6 @@ ar:
problems_found: "بعض النصائح بناءً على إعدادات موقعك الحالية"
new_features:
title: "\U0001F381 الميزات الجديدة"
- dismiss: "تجاهل"
- learn_more: "معرفة المزيد"
last_checked: "تاريخ آخر تحقُّق"
refresh_problems: "تحديث"
no_problems: "لم يتم العثور على مشكلات."
diff --git a/config/locales/client.bg.yml b/config/locales/client.bg.yml
index 3eec557c56d..ae51fa79fb4 100644
--- a/config/locales/client.bg.yml
+++ b/config/locales/client.bg.yml
@@ -3410,9 +3410,6 @@ bg:
version_check_pending: "Изглежда, че скоро сте обновили версията. Това е чудесно!"
installed_version: "Инсталирани"
latest_version: "Последни"
- new_features:
- dismiss: "Отмени"
- learn_more: "Научете повече"
last_checked: "Последна проверка"
refresh_problems: "Обнови"
no_problems: "Не бяха открити проблеми."
diff --git a/config/locales/client.bs_BA.yml b/config/locales/client.bs_BA.yml
index 86fba7dd3f5..5c1db0e719a 100644
--- a/config/locales/client.bs_BA.yml
+++ b/config/locales/client.bs_BA.yml
@@ -3072,9 +3072,6 @@ bs_BA:
installed_version: "Installed"
latest_version: "Zadnje"
problems_found: "Neki saveti na osnovu vaših trenutnih postavki sajta"
- new_features:
- dismiss: "Odpusti"
- learn_more: "Saznaj više"
last_checked: "Zadnje pogledani"
refresh_problems: "Osvježi"
no_problems: "No problems were found."
diff --git a/config/locales/client.ca.yml b/config/locales/client.ca.yml
index 551357ab370..24dea35d166 100644
--- a/config/locales/client.ca.yml
+++ b/config/locales/client.ca.yml
@@ -2914,9 +2914,6 @@ ca:
installed_version: "Instal·lat"
latest_version: "Més recents"
problems_found: "Uns quants consells basats en la configuració actual del lloc web."
- new_features:
- dismiss: "Descarta-ho"
- learn_more: "Per a saber-ne més"
last_checked: "Comprovat per darrera vegada"
refresh_problems: "Actualitza"
no_problems: "No s'han trobat problemes."
diff --git a/config/locales/client.cs.yml b/config/locales/client.cs.yml
index 3c930349b4f..be4762c2ffa 100644
--- a/config/locales/client.cs.yml
+++ b/config/locales/client.cs.yml
@@ -3742,8 +3742,6 @@ cs:
problems_found: "Několik rad na základě vašeho aktuálního nastavení webu"
new_features:
title: "\U0001F381 Nové funkce"
- dismiss: "Označit jako přečtené"
- learn_more: "Více informací"
last_checked: "Naposledy zkontrolováno"
refresh_problems: "Obnovit"
no_problems: "Nenalezeny žádné problémy."
diff --git a/config/locales/client.da.yml b/config/locales/client.da.yml
index 41ce95f64c4..8bb37d0f3b2 100644
--- a/config/locales/client.da.yml
+++ b/config/locales/client.da.yml
@@ -3700,8 +3700,6 @@ da:
problems_found: "Nogle råd baseret på dine nuværende sideindstillinger"
new_features:
title: "\U0001F381 Nye Funktioner"
- dismiss: "Skjul"
- learn_more: "Lær mere"
last_checked: "Sidst kontrolleret"
refresh_problems: "Opdatér"
no_problems: "Ingen problemer fundet."
diff --git a/config/locales/client.de.yml b/config/locales/client.de.yml
index c256c72b182..d6c0e230f61 100644
--- a/config/locales/client.de.yml
+++ b/config/locales/client.de.yml
@@ -4312,8 +4312,6 @@ de:
problems_found: "Ein paar Ratschläge basierend auf deinen aktuellen Website-Einstellungen"
new_features:
title: "\U0001F381 Neue Funktionen"
- dismiss: "Verwerfen"
- learn_more: "Mehr erfahren"
last_checked: "Zuletzt geprüft"
refresh_problems: "Aktualisieren"
no_problems: "Es wurden keine Probleme gefunden."
diff --git a/config/locales/client.el.yml b/config/locales/client.el.yml
index b991800be98..87ba5494c06 100644
--- a/config/locales/client.el.yml
+++ b/config/locales/client.el.yml
@@ -3342,9 +3342,6 @@ el:
installed_version: "Εγκατεστημένα"
latest_version: "Τελευταία"
problems_found: "Μερικές συμβουλές με βάση τις τρέχουσες ρυθμίσεις του ιστότοπού σας"
- new_features:
- dismiss: "Απόρριψη"
- learn_more: "Μάθε περισσότερα"
last_checked: "Τελευταίος έλεγχος"
refresh_problems: "Ανανέωση"
no_problems: "Δεν βρέθηκε κανένα πρόβλημα."
diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml
index 1bbf6373d23..3e98bbfcacb 100644
--- a/config/locales/client.en.yml
+++ b/config/locales/client.en.yml
@@ -4676,9 +4676,9 @@ en:
latest_version: "Latest"
problems_found: "Some advice based on your current site settings"
new_features:
- title: "🎁 New Features"
- dismiss: "Dismiss"
- learn_more: "Learn more"
+ title: "What's new"
+ previous_announcements: "You can see previous new feature announcements on <a href='%{url}' target='_blank'>Discourse Meta</a>"
+ learn_more: "Learn more..."
last_checked: "Last checked"
refresh_problems: "Refresh"
no_problems: "No problems were found."
diff --git a/config/locales/client.es.yml b/config/locales/client.es.yml
index eb406c95864..240919ae0c4 100644
--- a/config/locales/client.es.yml
+++ b/config/locales/client.es.yml
@@ -4266,8 +4266,6 @@ es:
problems_found: "Algunos consejos con base en tus ajustes actuales"
new_features:
title: "\U0001F381 Novedades"
- dismiss: "Descartar"
- learn_more: "Más información"
last_checked: "Ultima comprobación"
refresh_problems: "Volver a cargar"
no_problems: "No se ha encontrado ningún problema."
diff --git a/config/locales/client.et.yml b/config/locales/client.et.yml
index ee635d97fb5..ce302275563 100644
--- a/config/locales/client.et.yml
+++ b/config/locales/client.et.yml
@@ -2561,9 +2561,6 @@ et:
version_check_pending: "Näib, et oled hiljuti uuendanud. Fantastiline!"
installed_version: "Paigaldatud"
latest_version: "Viimased"
- new_features:
- dismiss: "Ignoreeri"
- learn_more: "Uuri veel"
last_checked: "Viimati kontrollitud"
refresh_problems: "Värskenda"
no_problems: "Probleeme ei tuvastatud."
diff --git a/config/locales/client.fa_IR.yml b/config/locales/client.fa_IR.yml
index 49c614b513a..231c1051d17 100644
--- a/config/locales/client.fa_IR.yml
+++ b/config/locales/client.fa_IR.yml
@@ -3447,9 +3447,6 @@ fa_IR:
installed_version: "نصب"
latest_version: "آخرین"
problems_found: "چند توصیه براثاث تنظیمات فعلی سایت شما"
- new_features:
- dismiss: "نخواستیم"
- learn_more: "بیشتر بدانید"
last_checked: " آخرین بررسی"
refresh_problems: "تازه کردن"
no_problems: "هیچ مشکلات پیدا نشد."
diff --git a/config/locales/client.fi.yml b/config/locales/client.fi.yml
index 90120e7eb08..646568eabe6 100644
--- a/config/locales/client.fi.yml
+++ b/config/locales/client.fi.yml
@@ -4220,8 +4220,6 @@ fi:
problems_found: "Joitakin suosituksia nykyisiin sivustoasetuksiisi pohjautuen"
new_features:
title: "\U0001F381 Uudet ominaisuudet"
- dismiss: "Sulje"
- learn_more: "Lue lisää"
last_checked: "Viimeksi tarkistettu"
refresh_problems: "Päivitä"
no_problems: "Ongelmia ei löytynyt."
diff --git a/config/locales/client.fr.yml b/config/locales/client.fr.yml
index b393242656a..cb48827cc80 100644
--- a/config/locales/client.fr.yml
+++ b/config/locales/client.fr.yml
@@ -4187,8 +4187,6 @@ fr:
problems_found: "Quelques conseils d'après vos paramètres actuels"
new_features:
title: "\U0001F381 Nouveautés"
- dismiss: "Ignorer"
- learn_more: "En savoir plus…"
last_checked: "Dernière vérification"
refresh_problems: "Actualiser"
no_problems: "Aucun problème n'a été trouvé."
diff --git a/config/locales/client.gl.yml b/config/locales/client.gl.yml
index fd6285a9601..7c5608e0946 100644
--- a/config/locales/client.gl.yml
+++ b/config/locales/client.gl.yml
@@ -3347,8 +3347,6 @@ gl:
problems_found: "Algúns consellos baseados na súa configuración actual do sitio"
new_features:
title: "Novas funcionalidades"
- dismiss: "Desbotar"
- learn_more: "Saber máis"
last_checked: "Última comprobación"
refresh_problems: "Actualizar"
no_problems: "Non se atoparon problemas."
diff --git a/config/locales/client.he.yml b/config/locales/client.he.yml
index 80aadd22791..0a90d168e55 100644
--- a/config/locales/client.he.yml
+++ b/config/locales/client.he.yml
@@ -4718,8 +4718,6 @@ he:
problems_found: "עצה שמבוססת על הגדרות האתר הנוכחיות שלך"
new_features:
title: "\U0001F381 תכונות חדשות"
- dismiss: "התעלמות"
- learn_more: "מידע נוסף"
last_checked: "נבדק לאחרונה"
refresh_problems: "רענן"
no_problems: "לא נמצאו בעיות."
diff --git a/config/locales/client.hr.yml b/config/locales/client.hr.yml
index a63563806f1..69d5a71c36d 100644
--- a/config/locales/client.hr.yml
+++ b/config/locales/client.hr.yml
@@ -4190,8 +4190,6 @@ hr:
problems_found: "Nekoliko savjeta na temelju vaših trenutnih postavki web mjesta"
new_features:
title: "\U0001F381 Nove značajke"
- dismiss: "Skloni"
- learn_more: "Saznajte više"
last_checked: "Zadnje provjereno"
refresh_problems: "Osvježi"
no_problems: "Nisu pronađeni problemi."
diff --git a/config/locales/client.hu.yml b/config/locales/client.hu.yml
index f44b0036a9f..f6125db735e 100644
--- a/config/locales/client.hu.yml
+++ b/config/locales/client.hu.yml
@@ -3698,8 +3698,6 @@ hu:
problems_found: "Néhány tanács az aktuális webhelybeállítások alapján"
new_features:
title: "\U0001F381 Új funkciók"
- dismiss: "Elvetés"
- learn_more: "Tudjon meg többet"
last_checked: "Utoljára ellenőrizve:"
refresh_problems: "Újratöltés"
no_problems: "Nem találtunk semmilyen problémát."
diff --git a/config/locales/client.hy.yml b/config/locales/client.hy.yml
index 1bf5e306ad2..436611dce42 100644
--- a/config/locales/client.hy.yml
+++ b/config/locales/client.hy.yml
@@ -2888,9 +2888,6 @@ hy:
installed_version: "Տեղադրված է "
latest_version: "Վերջինը"
problems_found: "Որոշ խորհուրդներ՝ հիմնված Ձեր կայքի ընթացիկ կարգավորումների վրա"
- new_features:
- dismiss: "Չեղարկել"
- learn_more: "Իմանալ ավելին"
last_checked: "Վերջին ստուգումը՝ "
refresh_problems: "Թարմացնել"
no_problems: "Խնդիրներ չեն գտնվել:"
diff --git a/config/locales/client.it.yml b/config/locales/client.it.yml
index deddf443bff..c3c5901b4d3 100644
--- a/config/locales/client.it.yml
+++ b/config/locales/client.it.yml
@@ -4298,8 +4298,6 @@ it:
problems_found: "Alcuni consigli basati sulle attuali impostazioni del sito"
new_features:
title: "\U0001F381 Nuove funzionalità"
- dismiss: "Ignora"
- learn_more: "Scopri di più"
last_checked: "Ultimo controllo"
refresh_problems: "Aggiorna"
no_problems: "Nessun problema rilevato."
diff --git a/config/locales/client.ja.yml b/config/locales/client.ja.yml
index da15ffdd92e..fea986cb976 100644
--- a/config/locales/client.ja.yml
+++ b/config/locales/client.ja.yml
@@ -3981,8 +3981,6 @@ ja:
problems_found: "現在のサイト設定に基づいたアドバイス"
new_features:
title: "\U0001F381 新機能"
- dismiss: "閉じる"
- learn_more: "もっと読む"
last_checked: "最終チェック"
refresh_problems: "更新"
no_problems: "問題は見つかりませんでした。"
diff --git a/config/locales/client.ko.yml b/config/locales/client.ko.yml
index 8ed3007fe27..9bea9c43b73 100644
--- a/config/locales/client.ko.yml
+++ b/config/locales/client.ko.yml
@@ -3551,8 +3551,6 @@ ko:
problems_found: "현재 사이트 설정에 따른 몇 가지 권고 사항"
new_features:
title: "\U0001F381 새 기능"
- dismiss: "무시"
- learn_more: "더 알아보기"
last_checked: "마지막으로 확인함"
refresh_problems: "새로고침"
no_problems: "문제가 발견되지 않았습니다."
diff --git a/config/locales/client.lt.yml b/config/locales/client.lt.yml
index 964bb00f643..032500ac527 100644
--- a/config/locales/client.lt.yml
+++ b/config/locales/client.lt.yml
@@ -3558,8 +3558,6 @@ lt:
problems_found: "Keletas patarimų, pagrįstų dabartiniais svetainės nustatymais"
new_features:
title: "\U0001F381 Naujos funkcijos"
- dismiss: "Praleisti"
- learn_more: "Sužinoti daugiau"
last_checked: "Paskutinį kartą tikrinta"
refresh_problems: "Atnaujinti"
no_problems: "Nerasta jokių problemų"
diff --git a/config/locales/client.lv.yml b/config/locales/client.lv.yml
index eba9c33801f..b1a5b731a7a 100644
--- a/config/locales/client.lv.yml
+++ b/config/locales/client.lv.yml
@@ -2801,9 +2801,6 @@ lv:
version_check_pending: "Izskatās, ka nesen esat veicies atjauninājumus. Lieliski!"
installed_version: "Uzinstalēts"
latest_version: "Pēdējais"
- new_features:
- dismiss: "Nerādīt"
- learn_more: "Uzzināt vairāk"
last_checked: "Pēdējā pārbaude"
refresh_problems: "Pārlādēt"
no_problems: "Problēmas nav atrastas."
diff --git a/config/locales/client.nb_NO.yml b/config/locales/client.nb_NO.yml
index 82fbbb4aac7..4f3ab5d58d5 100644
--- a/config/locales/client.nb_NO.yml
+++ b/config/locales/client.nb_NO.yml
@@ -3398,8 +3398,6 @@ nb_NO:
problems_found: "Noen råd basert på gjeldende sideinnstillinger"
new_features:
title: "\U0001F381 Nye funksjoner"
- dismiss: "Avslå"
- learn_more: "Finn ut mer"
last_checked: "Sist sjekket"
refresh_problems: "Last inn siden på nytt"
no_problems: "Ingen problemer ble funnet."
diff --git a/config/locales/client.nl.yml b/config/locales/client.nl.yml
index 059dbbd9f95..21417200ab6 100644
--- a/config/locales/client.nl.yml
+++ b/config/locales/client.nl.yml
@@ -4184,8 +4184,6 @@ nl:
problems_found: "Advies op basis van je huidige website-instellingen"
new_features:
title: "\U0001F381 Nieuwe functies"
- dismiss: "Negeren"
- learn_more: "Meer informatie"
last_checked: "Laatst gecontroleerd"
refresh_problems: "Vernieuwen"
no_problems: "Er zijn geen problemen gevonden."
diff --git a/config/locales/client.pl_PL.yml b/config/locales/client.pl_PL.yml
index 06a308fe9f9..df7d20486a3 100644
--- a/config/locales/client.pl_PL.yml
+++ b/config/locales/client.pl_PL.yml
@@ -4667,8 +4667,6 @@ pl_PL:
problems_found: "Porada bazująca na twoich aktualnych ustawieniach"
new_features:
title: "\U0001F381 Nowe funkcje"
- dismiss: "Odrzuć"
- learn_more: "Dowiedz się więcej"
last_checked: "Ostatnio sprawdzana"
refresh_problems: "Odśwież"
no_problems: "Nie znaleziono problemów."
diff --git a/config/locales/client.pt.yml b/config/locales/client.pt.yml
index 93d7adc9eed..239fbd304b3 100644
--- a/config/locales/client.pt.yml
+++ b/config/locales/client.pt.yml
@@ -3479,8 +3479,6 @@ pt:
problems_found: "Alguns conselhos com base nas configurações atuais do seu site"
new_features:
title: "\U0001F381 Novos Recursos"
- dismiss: "Marcar como visto"
- learn_more: "Saiba mais"
last_checked: "Última verificação"
refresh_problems: "Atualizar"
no_problems: "Nenhum problema encontrado."
diff --git a/config/locales/client.pt_BR.yml b/config/locales/client.pt_BR.yml
index eedcc2ccca5..bdd3ead807b 100644
--- a/config/locales/client.pt_BR.yml
+++ b/config/locales/client.pt_BR.yml
@@ -4178,8 +4178,6 @@ pt_BR:
problems_found: "Algumas dicas baseadas nas configurações atuais do seu site"
new_features:
title: "\U0001F381 Novos recursos"
- dismiss: "Descartar"
- learn_more: "Saiba mais"
last_checked: "Última verificação"
refresh_problems: "Atualizar"
no_problems: "Nenhum problema foi encontrado."
diff --git a/config/locales/client.ro.yml b/config/locales/client.ro.yml
index d51804c2a97..ec05a751011 100644
--- a/config/locales/client.ro.yml
+++ b/config/locales/client.ro.yml
@@ -3089,9 +3089,6 @@ ro:
version_check_pending: "Se pare că ai actualizat recent. Fantastic!"
installed_version: "Instalată"
latest_version: "Ultima"
- new_features:
- dismiss: "Înlătură"
- learn_more: "Află mai multe"
last_checked: "Ultima verificare"
refresh_problems: "Reîmprospătează"
no_problems: "Nu a apărut nicio problemă."
diff --git a/config/locales/client.ru.yml b/config/locales/client.ru.yml
index 10817c8a343..b9e8752d271 100644
--- a/config/locales/client.ru.yml
+++ b/config/locales/client.ru.yml
@@ -4580,8 +4580,6 @@ ru:
problems_found: "Несколько советов по текущим настройкам сайта"
new_features:
title: "\U0001F381 Новые возможности"
- dismiss: "Закрыть"
- learn_more: "Подробнее"
last_checked: "Последняя проверка"
refresh_problems: "Обновить"
no_problems: "Проблем не обнаружено."
diff --git a/config/locales/client.sk.yml b/config/locales/client.sk.yml
index bdf1c267ab4..62a4f4f6a8c 100644
--- a/config/locales/client.sk.yml
+++ b/config/locales/client.sk.yml
@@ -2346,9 +2346,6 @@ sk:
version_check_pending: "Zdá sa že ste nedávno aktualizovali. Fantastické!"
installed_version: "Nainštalované"
latest_version: "Najnovšie"
- new_features:
- dismiss: "Zahodiť"
- learn_more: "Zistiť viac"
last_checked: "Naposledy overené"
refresh_problems: "Obnoviť"
no_problems: "Nenašli sa žiadne problémy."
diff --git a/config/locales/client.sl.yml b/config/locales/client.sl.yml
index 843203c40d0..0ccf995b44f 100644
--- a/config/locales/client.sl.yml
+++ b/config/locales/client.sl.yml
@@ -3383,8 +3383,6 @@ sl:
problems_found: "Nekaj priporočil glede na vaše trenutne nastavitve strani"
new_features:
title: "\U0001F381 Nove funkcije"
- dismiss: "Opusti"
- learn_more: "Več o tem"
last_checked: "Nazadnje preverjeno"
refresh_problems: "Osveži"
no_problems: "Nismo našli problemov."
diff --git a/config/locales/client.sq.yml b/config/locales/client.sq.yml
index 9e72a068139..b991a6f78e6 100644
--- a/config/locales/client.sq.yml
+++ b/config/locales/client.sq.yml
@@ -1974,9 +1974,6 @@ sq:
version_check_pending: "Me sa shohim keni rinovuar faqen se fundmi. Fantastike!"
installed_version: "Instaluar"
latest_version: "Të fundit"
- new_features:
- dismiss: "Hiqe"
- learn_more: "Mëso më shumë"
last_checked: "Verifikimi i fundit"
refresh_problems: "Rifresko"
no_problems: "Nuk u gjet asnjë gabim."
diff --git a/config/locales/client.sr.yml b/config/locales/client.sr.yml
index df2b0f2c86b..a0d43fc58e0 100644
--- a/config/locales/client.sr.yml
+++ b/config/locales/client.sr.yml
@@ -1858,9 +1858,6 @@ sr:
version_check_pending: "Čini se da ste nedavno nadogradili. Fantastično!"
installed_version: "Instalirano"
latest_version: "Poslednje"
- new_features:
- dismiss: "Одбаци"
- learn_more: "Saznaj više"
last_checked: "Zadnje provereno"
refresh_problems: "Osveži"
no_problems: "Nisu pronađeni problemi."
diff --git a/config/locales/client.sv.yml b/config/locales/client.sv.yml
index c949e355e1a..24300ec7381 100644
--- a/config/locales/client.sv.yml
+++ b/config/locales/client.sv.yml
@@ -4177,8 +4177,6 @@ sv:
problems_found: "Några förslag baserat på dina nuvarande webbplatsinställningar"
new_features:
title: "\U0001F381 Nya funktioner"
- dismiss: "Avfärda"
- learn_more: "Läs mer"
last_checked: "Senast kollad"
refresh_problems: "Uppdatera"
no_problems: "Inga problem upptäcktes."
diff --git a/config/locales/client.sw.yml b/config/locales/client.sw.yml
index a823482d95e..6947541e097 100644
--- a/config/locales/client.sw.yml
+++ b/config/locales/client.sw.yml
@@ -2295,9 +2295,6 @@ sw:
version_check_pending: "Inaonekana umeweka toleo la sasa hivi karibuni. Vizuri!"
installed_version: "Imesanikishwa"
latest_version: "Hivi Karibuni"
- new_features:
- dismiss: "Ondosha"
- learn_more: "Jifunze zaidi"
last_checked: "Mara ya Mwisho imeangaliwa"
refresh_problems: "Rudisha Tena"
no_problems: "Hakuna matatizo yaliyopatikana."
diff --git a/config/locales/client.th.yml b/config/locales/client.th.yml
index ddc65fce4c0..ad6eedb631e 100644
--- a/config/locales/client.th.yml
+++ b/config/locales/client.th.yml
@@ -2472,9 +2472,6 @@ th:
please_upgrade: "กรุณาอัปเกรด!"
installed_version: "ติดตั้งแล้ว"
latest_version: "ล่าสุด"
- new_features:
- dismiss: "ซ่อน"
- learn_more: "เรียนรู้เพิ่มเติม"
last_checked: "ตรวจล่าสุด"
refresh_problems: "รีเฟรช"
no_problems: "ไม่พบปัญหา"
diff --git a/config/locales/client.tr_TR.yml b/config/locales/client.tr_TR.yml
index 9cc0a21ec62..6847ce8f52b 100644
--- a/config/locales/client.tr_TR.yml
+++ b/config/locales/client.tr_TR.yml
@@ -4224,8 +4224,6 @@ tr_TR:
problems_found: "Mevcut site ayarlarınıza dayalı bazı tavsiyeler"
new_features:
title: "\U0001F381 Yeni Özellikler"
- dismiss: "Kapat"
- learn_more: "Daha fazla bilgi"
last_checked: "Son kontrol"
refresh_problems: "Yenile"
no_problems: "Hiçbir sorun bulunamadı."
diff --git a/config/locales/client.uk.yml b/config/locales/client.uk.yml
index ff30fa7137d..aa56ea9d2fd 100644
--- a/config/locales/client.uk.yml
+++ b/config/locales/client.uk.yml
@@ -4729,8 +4729,6 @@ uk:
problems_found: "Кілька порад по вашим поточним налаштуванням сайту"
new_features:
title: "\U0001F381 Нові можливості"
- dismiss: "Відхилити"
- learn_more: "Дізнатися більше"
last_checked: "Остання перевірка"
refresh_problems: "Оновити"
no_problems: "Не виявлено жодних проблем."
diff --git a/config/locales/client.ur.yml b/config/locales/client.ur.yml
index 781d4728b0f..3ac80544d34 100644
--- a/config/locales/client.ur.yml
+++ b/config/locales/client.ur.yml
@@ -3610,8 +3610,6 @@ ur:
problems_found: "آپ کی موجودہ سائٹ ترتیبات کے مطابق کچھ مشورے"
new_features:
title: "\U0001F381 نئی خصوصیات"
- dismiss: "بر خاست کریں"
- learn_more: "مزید جانیں"
last_checked: "آخری دفعہ چیک کیا گیا"
refresh_problems: "رِیفریش"
no_problems: "کوئی مسائل نہیں پائے گئے۔"
diff --git a/config/locales/client.vi.yml b/config/locales/client.vi.yml
index 0bb34c3b1e1..8bb3f2f589e 100644
--- a/config/locales/client.vi.yml
+++ b/config/locales/client.vi.yml
@@ -3621,8 +3621,6 @@ vi:
problems_found: "Một số lời khuyên dựa trên cài đặt trang web hiện tại của bạn"
new_features:
title: "\U0001F381 Các tính năng mới"
- dismiss: "Hủy bỏ"
- learn_more: "Tìm hiểu thêm"
last_checked: "Kiểm tra lần cuối"
refresh_problems: "Làm mới"
no_problems: "Không phát hiện vấn đề"
diff --git a/config/locales/client.zh_CN.yml b/config/locales/client.zh_CN.yml
index 3bc6be5bdc1..091da57c566 100644
--- a/config/locales/client.zh_CN.yml
+++ b/config/locales/client.zh_CN.yml
@@ -4103,8 +4103,6 @@ zh_CN:
problems_found: "基于您当前站点设置的一些建议"
new_features:
title: "\U0001F381 新功能"
- dismiss: "忽略"
- learn_more: "了解详情"
last_checked: "上次检查"
refresh_problems: "刷新"
no_problems: "找不到问题。"
diff --git a/config/locales/client.zh_TW.yml b/config/locales/client.zh_TW.yml
index 68a9098bf83..cdb06ec4153 100644
--- a/config/locales/client.zh_TW.yml
+++ b/config/locales/client.zh_TW.yml
@@ -2971,8 +2971,6 @@ zh_TW:
problems_found: "根據您現在網站設定的建議"
new_features:
title: "\U0001F381 新功能"
- dismiss: "忽略"
- learn_more: "了解更多"
last_checked: "上次檢查的時間"
refresh_problems: "重新整理"
no_problems: "未發現任何問題。"
diff --git a/config/site_settings.yml b/config/site_settings.yml
index 86da5d14b4a..fd40357e5e8 100644
--- a/config/site_settings.yml
+++ b/config/site_settings.yml
@@ -2934,12 +2934,13 @@ dashboard:
client: true
type: list
list_type: compact
- default: "moderation|security|reports"
+ default: "moderation|security|reports|features"
allow_any: false
choices:
- moderation
- security
- reports
+ - features
dashboard_general_tab_activity_metrics:
client: true
type: list
diff --git a/spec/system/admin_dashboard_new_features_spec.rb b/spec/system/admin_dashboard_new_features_spec.rb
new file mode 100644
index 00000000000..c9771422981
--- /dev/null
+++ b/spec/system/admin_dashboard_new_features_spec.rb
@@ -0,0 +1,56 @@
+# frozen_string_literal: true
+
+describe "Admin Dashboard New Features Page", type: :system do
+ let(:new_features_page) { PageObjects::Pages::AdminDashboardNewFeatures.new }
+ fab!(:admin) { Fabricate(:admin) }
+
+ before { sign_in(admin) }
+
+ it "displays new features with screenshot taking precednce over emoji" do
+ DiscourseUpdates.stubs(:new_features).returns(
+ [
+ {
+ "id" => 7,
+ "user_id" => 1,
+ "emoji" => "😍",
+ "title" => "New feature",
+ "description" => "New feature description",
+ "link" => "https://meta.discourse.org",
+ "tier" => [],
+ "discourse_version" => "",
+ "created_at" => "2023-11-10T02:52:41.462Z",
+ "updated_at" => "2023-11-10T04:28:47.020Z",
+ "screenshot_url" =>
+ "/uploads/default/original/1X/bab053dc94dc4e0d357b0e777e3357bb1ac99e12.jpeg",
+ },
+ ],
+ )
+
+ new_features_page.visit
+ expect(new_features_page).to have_screenshot
+ expect(new_features_page).to have_learn_more_link
+ expect(new_features_page).to have_no_emoji
+ end
+
+ it "displays new features with emoji when no screenshot" do
+ DiscourseUpdates.stubs(:new_features).returns(
+ [
+ {
+ "id" => 7,
+ "user_id" => 1,
+ "emoji" => "😍",
+ "title" => "New feature",
+ "description" => "New feature description",
+ "link" => "https://meta.discourse.org",
+ "tier" => [],
+ "discourse_version" => "",
+ "created_at" => "2023-11-10T02:52:41.462Z",
+ "updated_at" => "2023-11-10T04:28:47.020Z",
+ },
+ ],
+ )
+ new_features_page.visit
+ expect(new_features_page).to have_emoji
+ expect(new_features_page).to have_no_screenshot
+ end
+end
diff --git a/spec/system/page_objects/pages/admin_dashboard_new_features.rb b/spec/system/page_objects/pages/admin_dashboard_new_features.rb
new file mode 100644
index 00000000000..ffce8cdf93b
--- /dev/null
+++ b/spec/system/page_objects/pages/admin_dashboard_new_features.rb
@@ -0,0 +1,32 @@
+# frozen_string_literal: true
+
+module PageObjects
+ module Pages
+ class AdminDashboardNewFeatures < PageObjects::Pages::Base
+ def visit
+ page.visit("/admin/dashboard/new-features")
+ self
+ end
+
+ def has_screenshot?
+ page.has_css?(".admin-new-feature-item__screenshot")
+ end
+
+ def has_no_screenshot?
+ page.has_no_css?(".admin-new-feature-item__screenshot")
+ end
+
+ def has_learn_more_link?
+ page.has_css?(".admin-new-feature-item__learn-more")
+ end
+
+ def has_emoji?
+ page.has_css?(".admin-new-feature-item__new-feature-emoji")
+ end
+
+ def has_no_emoji?
+ page.has_no_css?(".admin-new-feature-item__new-feature-emoji")
+ end
+ end
+ end
+end