Skip to content

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

FIX: edit theme navigation link should be in active state (#36350)

Yuriy Kurantabbd5f24262c
diff --git a/frontend/discourse/app/lib/sidebar/admin-nav-map.js b/frontend/discourse/app/lib/sidebar/admin-nav-map.js
index 2f6c490f0ed..6ea99eecec3 100644
--- a/frontend/discourse/app/lib/sidebar/admin-nav-map.js
+++ b/frontend/discourse/app/lib/sidebar/admin-nav-map.js
@@ -290,7 +290,7 @@ export const ADMIN_NAV_MAP = [
icon: "paintbrush",
keywords: "admin.config.themes_and_components.keywords",
currentWhen:
- "adminConfig.customize.themes adminConfig.customize.components adminConfig.customize.themeSiteSettings",
+ "adminConfig.customize.themes adminConfig.customize.components adminConfig.customize.themeSiteSettings adminCustomizeThemes.show.index",
links: [
{
name: "admin_theme_site_settings",
diff --git a/spec/system/admin_customize_themes_spec.rb b/spec/system/admin_customize_themes_spec.rb
index 950be6191dc..2bbf6fac434 100644
--- a/spec/system/admin_customize_themes_spec.rb
+++ b/spec/system/admin_customize_themes_spec.rb
@@ -10,10 +10,16 @@ describe "Admin Customize Themes", type: :system do
let(:theme_page) { PageObjects::Pages::AdminCustomizeThemes.new }
let(:themes_page) { PageObjects::Pages::AdminCustomizeThemesConfigArea.new }
let(:dialog) { PageObjects::Components::Dialog.new }
+ let(:sidebar) { PageObjects::Components::NavigationMenu::Sidebar.new }
before { sign_in(admin) }
describe "when visiting the page to customize a single theme" do
+ it "should keep sidebar navigation link active" do
+ theme_page.visit(theme)
+ expect(sidebar).to have_active_link("admin_themes_and_components")
+ end
+
it "should allow admin to update the light color scheme of the theme" do
theme_page.visit(theme)