Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.
Ruby b2b-commercee-commerceecommerceecommerce-apiecommerce-frameworkecommerce-platformheadlessheadless-commerceheadless-ecommercemarketplacemulti-tenantmulti-vendormulti-vendor-ecommerceopen-sourcespree-commerce
Use fullscreen?
Matthew Kennedy1c8ac16558f8
diff --git a/core/app/models/spree/cms/sections/featured_article.rb b/core/app/models/spree/cms/sections/featured_article.rbindex a690056a01..fdf81e45c9 100644--- a/core/app/models/spree/cms/sections/featured_article.rb+++ b/core/app/models/spree/cms/sections/featured_article.rb@@ -12,10 +12,6 @@ module Spree::Cms::Sectionsgutters == 'Gutters'end- def screen?- fit == 'Screen'- end-privatedef reset_link_attributesdiff --git a/core/app/models/spree/cms/sections/hero_image.rb b/core/app/models/spree/cms/sections/hero_image.rbindex 861e0c40a6..a0a1522830 100644--- a/core/app/models/spree/cms/sections/hero_image.rb+++ b/core/app/models/spree/cms/sections/hero_image.rb@@ -12,10 +12,6 @@ module Spree::Cms::Sectionsgutters == 'Gutters'end- def screen?- fit == 'Screen'- end-privatedef reset_link_attributesdiff --git a/core/app/models/spree/cms/sections/image_gallery.rb b/core/app/models/spree/cms/sections/image_gallery.rbindex b8d6b0c457..d6b0849133 100644--- a/core/app/models/spree/cms/sections/image_gallery.rb+++ b/core/app/models/spree/cms/sections/image_gallery.rb@@ -12,14 +12,14 @@ module Spree::Cms::Sectionsstore :settings, accessors: [:layout_style, :display_labels], coder: JSON- def screen?- fit == 'Screen'- end-def default_layout?layout_style == 'Default'end+ def show_labels?+ display_labels == 'Show'+ end+privatedef default_valuesdiff --git a/core/app/models/spree/cms/sections/product_carousel.rb b/core/app/models/spree/cms/sections/product_carousel.rbindex 59be6f98eb..4f12945856 100644--- a/core/app/models/spree/cms/sections/product_carousel.rb+++ b/core/app/models/spree/cms/sections/product_carousel.rb@@ -4,10 +4,6 @@ module Spree::Cms::SectionsLINKED_RESOURCE_TYPE = ['Spree::Taxon']- def screen?- fit == 'Screen'- end-privatedef default_valuesdiff --git a/core/app/models/spree/cms/sections/side_by_side_images.rb b/core/app/models/spree/cms/sections/side_by_side_images.rbindex 1533199fd7..4b5b2cd617 100644--- a/core/app/models/spree/cms/sections/side_by_side_images.rb+++ b/core/app/models/spree/cms/sections/side_by_side_images.rb@@ -14,10 +14,6 @@ module Spree::Cms::Sectionsgutters == 'Gutters'end- def screen?- fit == 'Screen'- end-privatedef reset_link_attributesdiff --git a/core/spec/models/spree/cms/sections/featured_article_spec.rb b/core/spec/models/spree/cms/sections/featured_article_spec.rbindex 7fd5020e5c..de0ac74a2f 100644--- a/core/spec/models/spree/cms/sections/featured_article_spec.rb+++ b/core/spec/models/spree/cms/sections/featured_article_spec.rb@@ -39,10 +39,10 @@ describe Spree::Cms::Sections::FeaturedArticle, type: :model doexpect(section.gutters?).to be falseend- it '#screen? is true' do+ it '#fullscreen? is true' dosection = Spree::CmsSection.find(featured_article_section.id)- expect(section.screen?).to be true+ expect(section.fullscreen?).to be trueendenddiff --git a/core/spec/models/spree/cms/sections/hero_image_spec.rb b/core/spec/models/spree/cms/sections/hero_image_spec.rbindex 73c61da720..ab5784de21 100644--- a/core/spec/models/spree/cms/sections/hero_image_spec.rb+++ b/core/spec/models/spree/cms/sections/hero_image_spec.rb@@ -39,10 +39,10 @@ describe Spree::Cms::Sections::HeroImage, type: :model doexpect(section.gutters?).to be falseend- it '#screen? is true' do+ it '#fullscreen? is true' dosection = Spree::CmsSection.find(hero_section.id)- expect(section.screen?).to be true+ expect(section.fullscreen?).to be trueendenddiff --git a/core/spec/models/spree/cms/sections/image_gallery_spec.rb b/core/spec/models/spree/cms/sections/image_gallery_spec.rbindex 277d7301f9..6998aaffa5 100644--- a/core/spec/models/spree/cms/sections/image_gallery_spec.rb+++ b/core/spec/models/spree/cms/sections/image_gallery_spec.rb@@ -45,10 +45,10 @@ describe Spree::Cms::Sections::ImageGallery, type: :model doexpect(section.fit).to eq('Container')end- it '#screen? is true' do+ it '#fullscreen? is true' dosection = Spree::CmsSection.find(image_gallery_section.id)- expect(section.screen?).to be false+ expect(section.fullscreen?).to be falseendit '#default_layout? is true' dodiff --git a/core/spec/models/spree/cms/sections/side_by_side_images_spec.rb b/core/spec/models/spree/cms/sections/side_by_side_images_spec.rbindex 8aad99c336..9dc79ed3a6 100644--- a/core/spec/models/spree/cms/sections/side_by_side_images_spec.rb+++ b/core/spec/models/spree/cms/sections/side_by_side_images_spec.rb@@ -33,10 +33,10 @@ describe Spree::Cms::Sections::SideBySideImages, type: :model doexpect(section.fit).to eq('Container')end- it '#screen? is true' do+ it '#fullscreen? is true' dosection = Spree::CmsSection.find(side_by_side_images_section.id)- expect(section.screen?).to be false+ expect(section.fullscreen?).to be falseendit '#gutters? is true' dodiff --git a/frontend/app/views/spree/shared/cms/sections/_image_gallery.html.erb b/frontend/app/views/spree/shared/cms/sections/_image_gallery.html.erbindex d13fa4f0f3..d26a12fa7b 100644--- a/frontend/app/views/spree/shared/cms/sections/_image_gallery.html.erb+++ b/frontend/app/views/spree/shared/cms/sections/_image_gallery.html.erb@@ -1,5 +1,5 @@<% if section.fullscreen? %>- <% if section.layout_style == 'Default' %>+ <% if section.default_layout? %><% section_one_padding = 'pl-3' %><% section_two_padding = 'pr-3' %><% else %>@@ -7,7 +7,7 @@<% section_two_padding = 'pl-3 order-1' %><% end %><% else %>- <% if section.layout_style == 'Default' %>+ <% if section.default_layout? %><% section_one_padding = '' %><% section_two_padding = '' %><% else %>@@ -16,10 +16,10 @@<% end %><% end %>-<% if section.display_labels == 'Hide' %>- <% labels_class = 'd-none' %>-<% else %>+<% if section.show_labels? %><% labels_class = 'homepage-taxon-box-text' %>+<% else %>+ <% labels_class = 'd-none' %><% end %><% if section.link_one.present? && section.link_type_one == 'Spree::Taxon' %>