Skip to content

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

UX: Change wording to reflect status (#38132)

Jordan Vidrine8015cfa9e85d
diff --git a/plugins/discourse-ai/admin/assets/javascripts/discourse/components/ai-features.gjs b/plugins/discourse-ai/admin/assets/javascripts/discourse/components/ai-features.gjs
index c78f59c24ab..cbd9d3e604d 100644
--- a/plugins/discourse-ai/admin/assets/javascripts/discourse/components/ai-features.gjs
+++ b/plugins/discourse-ai/admin/assets/javascripts/discourse/components/ai-features.gjs
@@ -13,14 +13,14 @@ import AiDefaultLlmSelector from "./ai-default-llm-selector";
import AiFeaturesList from "./ai-features-list";
const ALL = "all";
-const CONFIGURED = "configured";
-const UNCONFIGURED = "unconfigured";
+const ENABLED = "enabled";
+const NOT_ENABLED = "not enabled";
export default class AiFeatures extends Component {
@service adminPluginNavManager;
@tracked filterValue = "";
- @tracked selectedFeatureGroup = CONFIGURED;
+ @tracked selectedFeatureGroup = ENABLED;
constructor() {
super(...arguments);
@@ -31,7 +31,7 @@ export default class AiFeatures extends Component {
(f) => f.module_enabled === true
).length;
if (configuredCount === 0) {
- this.selectedFeatureGroup = UNCONFIGURED;
+ this.selectedFeatureGroup = NOT_ENABLED;
}
}
}
@@ -40,12 +40,12 @@ export default class AiFeatures extends Component {
return [
{ value: ALL, label: i18n("discourse_ai.features.filters.all") },
{
- value: CONFIGURED,
- label: i18n("discourse_ai.features.nav.configured"),
+ value: ENABLED,
+ label: i18n("discourse_ai.features.nav.enabled"),
},
{
- value: UNCONFIGURED,
- label: i18n("discourse_ai.features.nav.unconfigured"),
+ value: NOT_ENABLED,
+ label: i18n("discourse_ai.features.nav.not_enabled"),
},
];
}
@@ -57,9 +57,9 @@ export default class AiFeatures extends Component {
let features = this.args.features;
- if (this.selectedFeatureGroup === CONFIGURED) {
+ if (this.selectedFeatureGroup === ENABLED) {
features = features.filter((feature) => feature.module_enabled === true);
- } else if (this.selectedFeatureGroup === UNCONFIGURED) {
+ } else if (this.selectedFeatureGroup === NOT_ENABLED) {
features = features.filter((feature) => feature.module_enabled === false);
}
@@ -164,7 +164,7 @@ export default class AiFeatures extends Component {
@action
resetAndFocus() {
this.filterValue = "";
- this.selectedFeatureGroup = CONFIGURED;
+ this.selectedFeatureGroup = ENABLED;
document.querySelector(".admin-filter__input").focus();
}
diff --git a/plugins/discourse-ai/config/locales/client.en.yml b/plugins/discourse-ai/config/locales/client.en.yml
index c1bb364ee6c..562c635bd39 100644
--- a/plugins/discourse-ai/config/locales/client.en.yml
+++ b/plugins/discourse-ai/config/locales/client.en.yml
@@ -268,8 +268,8 @@ en:
ui_settings: "UI Settings"
integrations: "Integrations"
nav:
- configured: "Configured"
- unconfigured: "Unconfigured"
+ enabled: "Enabled"
+ not_enabled: "Not enabled"
filters:
all: "All"
text: "Search features, agents, LLMs, or groups..."
diff --git a/plugins/discourse-ai/spec/system/admin_ai_features_spec.rb b/plugins/discourse-ai/spec/system/admin_ai_features_spec.rb
index bbc57aced2e..26caef9810c 100644
--- a/plugins/discourse-ai/spec/system/admin_ai_features_spec.rb
+++ b/plugins/discourse-ai/spec/system/admin_ai_features_spec.rb
@@ -20,16 +20,15 @@ RSpec.describe "Admin AI features configuration" do
sign_in(admin)
end
- it "lists all agent backed AI features separated by configured/unconfigured" do
+ it "lists all persona backed AI features separated by enabled/not enabled" do
all_modules = DiscourseAi::Configuration::Module.all
configured_count = all_modules.count(&:enabled?)
-
ai_features_page.visit
- ai_features_page.toggle_configured
+ ai_features_page.toggle_enabled
expect(ai_features_page).to have_listed_modules(configured_count)
- ai_features_page.toggle_unconfigured
+ ai_features_page.toggle_not_enabled
expect(ai_features_page).to have_listed_modules(all_modules.size - configured_count)
@@ -39,7 +38,7 @@ RSpec.describe "Admin AI features configuration" do
it "lists the agent used for the corresponding AI feature" do
ai_features_page.visit
- ai_features_page.toggle_configured
+ ai_features_page.toggle_enabled
expect(ai_features_page).to have_feature_agent("topic_summaries", summarization_agent.name)
end
@@ -47,7 +46,7 @@ RSpec.describe "Admin AI features configuration" do
it "lists the groups allowed to use the AI feature" do
ai_features_page.visit
- ai_features_page.toggle_configured
+ ai_features_page.toggle_enabled
expect(ai_features_page).to have_feature_groups("topic_summaries", [group_1.name, group_2.name])
end
diff --git a/plugins/discourse-ai/spec/system/page_objects/pages/admin_ai_features.rb b/plugins/discourse-ai/spec/system/page_objects/pages/admin_ai_features.rb
index 8a250446902..ff2476a50c3 100644
--- a/plugins/discourse-ai/spec/system/page_objects/pages/admin_ai_features.rb
+++ b/plugins/discourse-ai/spec/system/page_objects/pages/admin_ai_features.rb
@@ -10,14 +10,14 @@ module PageObjects
self
end
- def toggle_configured
+ def toggle_enabled
select = page.find("#{FEATURES_PAGE} .ai-features__controls .d-select")
- select.find("option[value='configured']").select_option
+ select.find("option[value='enabled']").select_option
end
- def toggle_unconfigured
+ def toggle_not_enabled
select = page.find("#{FEATURES_PAGE} .ai-features__controls .d-select")
- select.find("option[value='unconfigured']").select_option
+ select.find("option[value='not enabled']").select_option
end
def has_listed_modules?(count)