DEV: Migrate sidebar site settings (#19336)

This new site setting replaces the
`enable_experimental_sidebar_hamburger` and `enable_sidebar` site
settings as the sidebar feature exits the experimental phase.

Note that we're replacing this without depreciation since the previous
site setting was considered experimental.

Internal Ref: /t/86563
This commit is contained in:
Alan Guo Xiang Tan
2022-12-08 09:44:29 +08:00
committed by GitHub
parent f7f0ca801b
commit fde9e6bc25
77 changed files with 254 additions and 265 deletions

View File

@ -1719,7 +1719,7 @@ class User < ActiveRecord::Base
end
def redesigned_user_menu_enabled?
SiteSetting.enable_experimental_sidebar_hamburger
!SiteSetting.legacy_navigation_menu?
end
protected
@ -1951,7 +1951,7 @@ class User < ActiveRecord::Base
private
def set_default_sidebar_section_links(update: false)
return if !SiteSetting.enable_experimental_sidebar_hamburger
return if SiteSetting.legacy_navigation_menu?
return if staged? || bot?
if SiteSetting.default_sidebar_categories.present?