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

New tab in admin panel with list of new features. Presentation was enhanced by screenshot and markdown description.

Related PR https://github.com/discourse-org/discourse-new-features-feeds/pull/23
This commit is contained in:
Krzysztof Kotlarek 2023-11-20 09:59:04 +11:00 committed by GitHub
parent abc0fad17e
commit 96c5a6c9ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
64 changed files with 238 additions and 222 deletions

View File

@ -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>
}

View File

@ -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>

View File

@ -1,3 +0,0 @@
import Component from "@ember/component";
export default class DashboardNewFeatureItem extends Component {}

View File

@ -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>
}

View File

@ -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}}

View File

@ -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));
}
}

View File

@ -0,0 +1,3 @@
import Controller from "@ember/controller";
export default class AdminDashboardNewFeaturesController extends Controller {}

View File

@ -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;

View File

@ -0,0 +1,3 @@
import DiscourseRoute from "discourse/routes/discourse";
export default class AdminDashboardNewFeaturesRoute extends DiscourseRoute {}

View File

@ -14,6 +14,10 @@ export default function () {
path: "/dashboard/reports",
resetNamespace: true,
});
this.route("admin.dashboardNewFeatures", {
path: "/dashboard/new-features",
resetNamespace: true,
});
});
this.route(

View File

@ -0,0 +1,4 @@
<ConditionalLoadingSpinner @condition={{this.isLoading}}>
<h2>{{i18n "admin.dashboard.new_features.title"}}</h2>
<DashboardNewFeatures />
</ConditionalLoadingSpinner>

View File

@ -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>

View File

@ -12,7 +12,7 @@ export default class extends NotificationTypeBase {
}
get linkHref() {
return getURL("/admin");
return getURL("/admin/dashboard/new-features");
}
get icon() {

View File

@ -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"));
});
});

View File

@ -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",
},

View File

@ -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%;
}
}

View File

@ -11,9 +11,8 @@
}
.admin-new-feature-item {
.new-feature-emoji {
&__new-feature-emoji {
padding-left: 0em;
padding-right: 0.25em;
}
}
}

View File

@ -5082,8 +5082,6 @@ ar:
problems_found: "بعض النصائح بناءً على إعدادات موقعك الحالية"
new_features:
title: "\U0001F381 الميزات الجديدة"
dismiss: "تجاهل"
learn_more: "معرفة المزيد"
last_checked: "تاريخ آخر تحقُّق"
refresh_problems: "تحديث"
no_problems: "لم يتم العثور على مشكلات."

View File

@ -3410,9 +3410,6 @@ bg:
version_check_pending: "Изглежда, че скоро сте обновили версията. Това е чудесно!"
installed_version: "Инсталирани"
latest_version: "Последни"
new_features:
dismiss: "Отмени"
learn_more: "Научете повече"
last_checked: "Последна проверка"
refresh_problems: "Обнови"
no_problems: "Не бяха открити проблеми."

View File

@ -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."

View File

@ -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."

View File

@ -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."

View File

@ -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."

View File

@ -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."

View File

@ -3342,9 +3342,6 @@ el:
installed_version: "Εγκατεστημένα"
latest_version: "Τελευταία"
problems_found: "Μερικές συμβουλές με βάση τις τρέχουσες ρυθμίσεις του ιστότοπού σας"
new_features:
dismiss: "Απόρριψη"
learn_more: "Μάθε περισσότερα"
last_checked: "Τελευταίος έλεγχος"
refresh_problems: "Ανανέωση"
no_problems: "Δεν βρέθηκε κανένα πρόβλημα."

View File

@ -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."

View File

@ -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."

View File

@ -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."

View File

@ -3447,9 +3447,6 @@ fa_IR:
installed_version: "نصب"
latest_version: "آخرین"
problems_found: "چند توصیه براثاث تنظیمات فعلی سایت شما"
new_features:
dismiss: "نخواستیم"
learn_more: "بیشتر بدانید"
last_checked: " آخرین بررسی"
refresh_problems: "تازه کردن"
no_problems: "هیچ مشکلات پیدا نشد."

View File

@ -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."

View File

@ -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é."

View File

@ -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."

View File

@ -4718,8 +4718,6 @@ he:
problems_found: "עצה שמבוססת על הגדרות האתר הנוכחיות שלך"
new_features:
title: "\U0001F381 תכונות חדשות"
dismiss: "התעלמות"
learn_more: "מידע נוסף"
last_checked: "נבדק לאחרונה"
refresh_problems: "רענן"
no_problems: "לא נמצאו בעיות."

View File

@ -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."

View File

@ -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."

View File

@ -2888,9 +2888,6 @@ hy:
installed_version: "Տեղադրված է "
latest_version: "Վերջինը"
problems_found: "Որոշ խորհուրդներ՝ հիմնված Ձեր կայքի ընթացիկ կարգավորումների վրա"
new_features:
dismiss: "Չեղարկել"
learn_more: "Իմանալ ավելին"
last_checked: "Վերջին ստուգումը՝ "
refresh_problems: "Թարմացնել"
no_problems: "Խնդիրներ չեն գտնվել:"

View File

@ -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."

View File

@ -3981,8 +3981,6 @@ ja:
problems_found: "現在のサイト設定に基づいたアドバイス"
new_features:
title: "\U0001F381 新機能"
dismiss: "閉じる"
learn_more: "もっと読む"
last_checked: "最終チェック"
refresh_problems: "更新"
no_problems: "問題は見つかりませんでした。"

View File

@ -3551,8 +3551,6 @@ ko:
problems_found: "현재 사이트 설정에 따른 몇 가지 권고 사항"
new_features:
title: "\U0001F381 새 기능"
dismiss: "무시"
learn_more: "더 알아보기"
last_checked: "마지막으로 확인함"
refresh_problems: "새로고침"
no_problems: "문제가 발견되지 않았습니다."

View File

@ -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ų"

View File

@ -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."

View File

@ -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."

View File

@ -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."

View File

@ -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."

View File

@ -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."

View File

@ -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."

View File

@ -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ă."

View File

@ -4580,8 +4580,6 @@ ru:
problems_found: "Несколько советов по текущим настройкам сайта"
new_features:
title: "\U0001F381 Новые возможности"
dismiss: "Закрыть"
learn_more: "Подробнее"
last_checked: "Последняя проверка"
refresh_problems: "Обновить"
no_problems: "Проблем не обнаружено."

View File

@ -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."

View File

@ -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."

View File

@ -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."

View File

@ -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."

View File

@ -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."

View File

@ -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."

View File

@ -2472,9 +2472,6 @@ th:
please_upgrade: "กรุณาอัปเกรด!"
installed_version: "ติดตั้งแล้ว"
latest_version: "ล่าสุด"
new_features:
dismiss: "ซ่อน"
learn_more: "เรียนรู้เพิ่มเติม"
last_checked: "ตรวจล่าสุด"
refresh_problems: "รีเฟรช"
no_problems: "ไม่พบปัญหา"

View File

@ -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ı."

View File

@ -4729,8 +4729,6 @@ uk:
problems_found: "Кілька порад по вашим поточним налаштуванням сайту"
new_features:
title: "\U0001F381 Нові можливості"
dismiss: "Відхилити"
learn_more: "Дізнатися більше"
last_checked: "Остання перевірка"
refresh_problems: "Оновити"
no_problems: "Не виявлено жодних проблем."

View File

@ -3610,8 +3610,6 @@ ur:
problems_found: "آپ کی موجودہ سائٹ ترتیبات کے مطابق کچھ مشورے"
new_features:
title: "\U0001F381 نئی خصوصیات"
dismiss: "بر خاست کریں"
learn_more: "مزید جانیں"
last_checked: "آخری دفعہ چیک کیا گیا"
refresh_problems: "رِیفریش"
no_problems: "کوئی مسائل نہیں پائے گئے۔"

View File

@ -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 đề"

View File

@ -4103,8 +4103,6 @@ zh_CN:
problems_found: "基于您当前站点设置的一些建议"
new_features:
title: "\U0001F381 新功能"
dismiss: "忽略"
learn_more: "了解详情"
last_checked: "上次检查"
refresh_problems: "刷新"
no_problems: "找不到问题。"

View File

@ -2971,8 +2971,6 @@ zh_TW:
problems_found: "根據您現在網站設定的建議"
new_features:
title: "\U0001F381 新功能"
dismiss: "忽略"
learn_more: "了解更多"
last_checked: "上次檢查的時間"
refresh_problems: "重新整理"
no_problems: "未發現任何問題。"

View File

@ -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

View File

@ -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

View File

@ -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