Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update backend configuration for solidus v4.2 #5405

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions backend/lib/spree/backend_configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class BackendConfiguration < Preferences::Configuration

# @!attribute [rw] theme
# @return [String] Default admin theme name
versioned_preference :theme, :string, initial_value: 'classic', boundaries: { "4.1.0.a" => "solidus_admin" }
versioned_preference :theme, :string, initial_value: 'classic', boundaries: { "4.2.0" => "solidus_admin" }

def theme_path(user_theme = nil)
user_theme ? themes.fetch(user_theme.to_sym) : themes.fetch(theme.to_sym)
Expand All @@ -25,8 +25,7 @@ def theme_path(user_theme = nil)
# @!attribute [rw] admin_updated_navbar
# @return [Boolean] Should the updated navbar be used in admin (default: +false+)
#
# TODO: Update boundaries before merging to `main`
versioned_preference :admin_updated_navbar, :boolean, initial_value: false, boundaries: { "4.1.0.a" => true }
versioned_preference :admin_updated_navbar, :boolean, initial_value: false, boundaries: { "4.2.0" => true }

preference :frontend_product_path,
:proc,
Expand All @@ -40,7 +39,7 @@ def theme_path(user_theme = nil)

# @!attribute [rw] prefer_menu_item_partials
# @return [Boolean] Whether or not to prefer menu item partials when both a partial and children are present.
preference :prefer_menu_item_partials, :boolean, default: false
versioned_preference :prefer_menu_item_partials, :boolean, initial_value: true, boundaries: { "4.2.0" => false }

autoload :ORDER_TABS, 'spree/backend_configuration/deprecated_tab_constants'
autoload :PRODUCT_TABS, 'spree/backend_configuration/deprecated_tab_constants'
Expand Down