FEATURE: allow admins to enable announced experimental features (#29244)

Toggle the button to enable the experimental site setting from "What's new" announcement.

The toggle button is displayed when:
- site setting exists and is boolean;
- potentially required plugin is enabled.
This commit is contained in:
Krzysztof Kotlarek
2024-10-22 10:56:58 +11:00
committed by GitHub
parent 644e6c7f46
commit 433fadbd52
12 changed files with 363 additions and 46 deletions

View File

@@ -5104,6 +5104,13 @@ en:
subtitle: "We are releasing new features and improvements all the time. This page covers the highlights, but you can click 'Learn more' to see extensive release notes."
previous_announcements: "You can see previous new feature announcements on <a href='%{url}' target='_blank'>Discourse Meta</a>"
learn_more: "Learn more..."
experiment_enabled: "You have enabled the experimental feature."
experiment_disabled: "You have disabled the experimental feature."
experiment_toggled_too_fast: "You have toggled the experimental feature too fast. Please wait a few seconds before trying again."
experiment_tooltip:
title: "Try our experimental feature"
content: "Give our newest feature in development a spin! It's still in the experimental stage, so we might remove it at any time. You can opt-out whenever you like."
last_checked: "Last checked"
refresh_problems: "Refresh"
no_problems: "No problems were found."

View File

@@ -326,6 +326,7 @@ Discourse::Application.routes.draw do
get "dashboard/reports" => "dashboard#reports"
get "dashboard/whats-new" => "dashboard#new_features"
get "/whats-new" => "dashboard#new_features"
post "/toggle-feature" => "dashboard#toggle_feature"
resources :dashboard, only: [:index] do
collection { get "problems" }