Skip to content

Commit

Permalink
Merge pull request solidusio#5405 from nebulab/rainerd/fix/admin-back…
Browse files Browse the repository at this point in the history
…end-config-version-updates

Update backend configuration for solidus `v4.2`
  • Loading branch information
elia authored Oct 2, 2023
2 parents 51f44e1 + ff09c3f commit 41495d2
Showing 1 changed file with 3 additions and 4 deletions.
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

0 comments on commit 41495d2

Please sign in to comment.