spree_frontend 4.7.0 → 4.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (135) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +37 -42
  3. data/.gem_release.yml +1 -1
  4. data/.github/CONTRIBUTING.md +1 -1
  5. data/.github/dependabot.yml +9 -30
  6. data/.rubocop.yml +10 -183
  7. data/.ruby-version +1 -0
  8. data/Gemfile +4 -4
  9. data/LICENSE +1 -1
  10. data/README.md +31 -38
  11. data/SECURITY.md +1 -1
  12. data/app/assets/config/spree_frontend_manifest.js +2 -1
  13. data/app/assets/images/favicon.ico +0 -0
  14. data/app/assets/images/logo/spree_50.png +0 -0
  15. data/app/assets/images/noimage/large.png +0 -0
  16. data/app/assets/images/noimage/mini.png +0 -0
  17. data/app/assets/images/noimage/product.png +0 -0
  18. data/app/assets/images/noimage/small.png +0 -0
  19. data/app/assets/javascripts/spree/frontend/{account.js → account.es6} +2 -5
  20. data/app/assets/javascripts/spree/frontend/{api_tokens.js → api_tokens.es6} +2 -5
  21. data/app/assets/javascripts/spree/frontend/cart.js +1 -1
  22. data/app/assets/javascripts/spree/frontend/checkout/address.js +1 -1
  23. data/app/assets/javascripts/spree/frontend/checkout/address_book.js +1 -1
  24. data/app/assets/javascripts/spree/frontend/checkout/payment.js +1 -1
  25. data/app/assets/javascripts/spree/frontend/checkout/shipment.js +1 -1
  26. data/app/assets/javascripts/spree/frontend/checkout.js +1 -1
  27. data/app/assets/javascripts/spree/frontend/login.js +1 -1
  28. data/app/assets/javascripts/spree/frontend/main_nav_bar.js +1 -1
  29. data/app/assets/javascripts/spree/frontend/views/spree/layouts/spree_application.js +1 -1
  30. data/app/assets/javascripts/spree/frontend/views/spree/products/cart_form.js +9 -2
  31. data/app/assets/javascripts/spree/frontend/views/spree/products/index.js +1 -1
  32. data/app/assets/javascripts/spree/frontend/views/spree/products/modal_carousel.js +1 -1
  33. data/app/assets/javascripts/spree/frontend/views/spree/products/price_filters.es6 +1 -1
  34. data/app/assets/javascripts/spree/frontend/views/spree/shared/carousel/single.js +1 -1
  35. data/app/assets/javascripts/spree/frontend/views/spree/shared/carousel/swipes.js +1 -1
  36. data/app/assets/javascripts/spree/frontend/views/spree/shared/carousel/thumbnails.js +1 -1
  37. data/app/assets/javascripts/spree/frontend/views/spree/shared/carousel.js +1 -1
  38. data/app/assets/javascripts/spree/frontend/views/spree/shared/delete_address_popup.js +1 -1
  39. data/app/assets/javascripts/spree/frontend/views/spree/shared/mobile_navigation.js +1 -1
  40. data/app/assets/javascripts/spree/frontend/views/spree/shared/quantity_select.js +1 -1
  41. data/app/assets/javascripts/spree/lazysizes.config.js +1 -1
  42. data/app/assets/stylesheets/spree/frontend/components-custom/headers.scss +0 -2
  43. data/app/assets/stylesheets/spree/frontend/components-custom/inputs.scss +4 -146
  44. data/app/assets/stylesheets/spree/frontend/fonts.scss +0 -136
  45. data/app/assets/stylesheets/spree/frontend/variables/variables.scss +21 -7
  46. data/app/assets/stylesheets/spree/frontend/views/spree/checkout/edit.scss +0 -3
  47. data/app/assets/stylesheets/spree/frontend/views/spree/layouts/spree_application.scss +1 -1
  48. data/app/assets/stylesheets/spree/frontend/views/spree/orders/edit.scss +0 -20
  49. data/app/assets/stylesheets/spree/frontend/views/spree/products/index.scss +2 -2
  50. data/app/assets/stylesheets/spree/frontend/views/spree/products/show.scss +0 -20
  51. data/app/assets/stylesheets/spree/frontend/views/spree/shared/cart.scss +0 -14
  52. data/app/assets/stylesheets/spree/frontend/views/spree/shared/header.scss +0 -25
  53. data/app/assets/stylesheets/spree/frontend/views/spree/shared/login.scss +0 -16
  54. data/app/assets/stylesheets/spree/frontend/views/spree/shared/main_nav_bar.scss +1 -8
  55. data/app/assets/stylesheets/spree/frontend/views/spree/shared/nav_bar.scss +1 -14
  56. data/app/assets/stylesheets/spree/frontend/views/spree/shared/no_product_available.scss +1 -1
  57. data/app/assets/stylesheets/spree/frontend/views/spree/shared/order_details.scss +0 -1
  58. data/app/assets/stylesheets/spree/frontend/views/spree/taxons/show.scss +1 -1
  59. data/app/assets/stylesheets/spree/frontend/views/spree/users/show.scss +0 -28
  60. data/app/helpers/spree/addresses_helper.rb +6 -10
  61. data/app/helpers/spree/frontend_helper.rb +1 -1
  62. data/app/helpers/spree/navigation_helper.rb +1 -1
  63. data/app/helpers/spree/products_filters_helper.rb +3 -3
  64. data/app/javascript/spree/frontend/application.js +2 -0
  65. data/app/views/spree/addresses/_form.html.erb +4 -5
  66. data/app/views/spree/addresses/edit.html.erb +1 -1
  67. data/app/views/spree/addresses/new.html.erb +1 -1
  68. data/app/views/spree/checkout/_address.html.erb +1 -1
  69. data/app/views/spree/checkout/_delivery.html.erb +1 -1
  70. data/app/views/spree/checkout/_summary.html.erb +1 -1
  71. data/app/views/spree/checkout/edit.html.erb +1 -1
  72. data/app/views/spree/checkout/payment/_gateway.html.erb +4 -4
  73. data/app/views/spree/checkout/payment/_storecredit.html.erb +1 -1
  74. data/app/views/spree/checkout/registration.html.erb +1 -1
  75. data/app/views/spree/layouts/spree_application.html.erb +4 -1
  76. data/app/views/spree/orders/_line_item_data.html.erb +1 -1
  77. data/app/views/spree/orders/show.html.erb +1 -1
  78. data/app/views/spree/products/_cart_form.html.erb +2 -2
  79. data/app/views/spree/products/_color_option_type.html.erb +1 -1
  80. data/app/views/spree/products/_description.html.erb +1 -1
  81. data/app/views/spree/products/_filters_desktop.html.erb +1 -1
  82. data/app/views/spree/products/_filters_mobile.html.erb +3 -3
  83. data/app/views/spree/products/_option_type.html.erb +1 -1
  84. data/app/views/spree/products/_promotions.html.erb +1 -1
  85. data/app/views/spree/products/_properties.html.erb +1 -1
  86. data/app/views/spree/products/_sort_desktop.html.erb +9 -24
  87. data/app/views/spree/products/index.html.erb +1 -1
  88. data/app/views/spree/products/related.html.erb +1 -1
  89. data/app/views/spree/shared/_checkout_header.html.erb +1 -1
  90. data/app/views/spree/shared/_currency_dropdown.html.erb +1 -1
  91. data/app/views/spree/shared/_delete_address_popup.html.erb +2 -2
  92. data/app/views/spree/shared/_footer.html.erb +3 -3
  93. data/app/views/spree/shared/_head.html.erb +2 -1
  94. data/app/views/spree/shared/_internationalization_options.html.erb +3 -3
  95. data/app/views/spree/shared/_line_item.html.erb +1 -1
  96. data/app/views/spree/shared/_locale_dropdown.html.erb +1 -1
  97. data/app/views/spree/shared/_login.html.erb +2 -2
  98. data/app/views/spree/shared/_main_nav_bar.html.erb +2 -2
  99. data/app/views/spree/shared/_mobile_internationalization_options.html.erb +1 -1
  100. data/app/views/spree/shared/_mobile_navigation.html.erb +1 -1
  101. data/app/views/spree/shared/_nav_bar.html.erb +5 -5
  102. data/app/views/spree/shared/_no_product_available.html.erb +1 -1
  103. data/app/views/spree/shared/_order_details.html.erb +3 -3
  104. data/app/views/spree/shared/_product_added_modal.html.erb +2 -2
  105. data/app/views/spree/shared/_user_form.html.erb +3 -3
  106. data/app/views/spree/taxons/_header.html.erb +1 -1
  107. data/app/views/spree/taxons/_subcategories.html.erb +1 -1
  108. data/app/views/spree/taxons/product_carousel.html.erb +1 -1
  109. data/app/views/spree/users/edit.html.erb +1 -1
  110. data/app/views/spree/users/show.html.erb +1 -1
  111. data/config/importmap.rb +2 -0
  112. data/config/locales/en.yml +37 -0
  113. data/lib/generators/spree/frontend/install/install_generator.rb +0 -2
  114. data/lib/spree/frontend/configuration.rb +1 -1
  115. data/lib/spree/frontend/engine.rb +9 -5
  116. data/lib/spree/frontend/version.rb +3 -3
  117. data/lib/spree/frontend.rb +3 -1
  118. data/spree_frontend.gemspec +12 -10
  119. metadata +65 -50
  120. data/.deepsource.toml +0 -19
  121. data/.eslintignore +0 -7
  122. data/.eslintrc +0 -36
  123. data/.solargraph.yml +0 -20
  124. data/.stylelintignore +0 -4
  125. data/.stylelintrc +0 -6
  126. data/app/assets/images/logo-spree.png +0 -0
  127. data/app/assets/images/logo.png +0 -0
  128. data/app/assets/images/logo.svg +0 -10
  129. data/app/assets/images/logo@2x.png +0 -0
  130. data/app/assets/images/logo@3x.png +0 -0
  131. data/app/assets/images/noimage/plp.png +0 -0
  132. data/app/assets/images/noimage/plp.svg +0 -16
  133. data/app/views/spree/shared/_get_started.html.erb +0 -32
  134. data/lib/generators/spree/frontend/install/templates/app/assets/config/manifest.js +0 -2
  135. data/license.md +0 -13
@@ -1,4 +1,4 @@
1
- <div class="container dropdown d-none d-lg-flex justify-content-end mt-5 pr-4 pb-3 plp-sort">
1
+ <div class="dropdown d-none d-lg-flex justify-content-end mt-5 pr-4 pb-3 plp-sort">
2
2
  <a data-toggle="dropdown" class="plp-sort-header" href="#" role="button" aria-haspopup="true" aria-expanded="false">
3
3
  <%= Spree.t("plp.#{ params[:sort_by].blank? ? 'sort_by': params[:sort_by].gsub('-', '_') }") %>
4
4
  <%= icon(name: 'arrow-right',
@@ -10,27 +10,12 @@
10
10
  width: 18,
11
11
  height: 18) %>
12
12
  </a>
13
- <div class="dropdown-menu text-right plp-sort-dropdown">
14
- <ul class="pt-1 plp-sort-dropdown-ul">
15
- <li class="p-3 plp-sort-dropdown-ul-li<%= '--active' if params[:sort_by].blank? %>">
16
- <%= link_to Spree.t('plp.default'), url_for(permitted_params.merge(sort_by: nil)), class: 'dropdown-item' %>
17
- </li>
18
- <li class="p-3 plp-sort-dropdown-ul-li<%= '--active' if params[:sort_by] == 'name-a-z' %>">
19
- <%= link_to Spree.t('plp.name_a_z'), url_for(permitted_params.merge(sort_by: 'name-a-z')), class: 'dropdown-item' %>
20
- </li>
21
- </li>
22
- <li class="p-3 plp-sort-dropdown-ul-li<%= '--active' if params[:sort_by] == 'name-z-a' %>">
23
- <%= link_to Spree.t('plp.name_z_a'), url_for(permitted_params.merge(sort_by: 'name-z-a')), class: 'dropdown-item' %>
24
- </li>
25
- <li class="p-3 plp-sort-dropdown-ul-li<%= '--active' if params[:sort_by] == 'newest-first' %>">
26
- <%= link_to Spree.t('plp.newest_first'), url_for(permitted_params.merge(sort_by: 'newest-first')), class: 'dropdown-item' %>
27
- </li>
28
- <li class="p-3 plp-sort-dropdown-ul-li<%= '--active' if params[:sort_by] == 'price-high-to-low' %>">
29
- <%= link_to Spree.t('plp.price_high_to_low'), url_for(permitted_params.merge(sort_by: 'price-high-to-low')), class: 'dropdown-item' %>
30
- </li>
31
- <li class="p-3 plp-sort-dropdown-ul-li<%= '--active' if params[:sort_by] == 'price-low-to-high' %>">
32
- <%= link_to Spree.t('plp.price_low_to_high'), url_for(permitted_params.merge(sort_by: 'price-low-to-high')), class: 'dropdown-item' %>
33
- </li>
34
- </ul>
35
- </div>
13
+ <div class="dropdown-menu text-right">
14
+ <%= active_link_to Spree.t('plp.default'), url_for(permitted_params.merge(sort_by: nil)), class: 'dropdown-item', active: { sort_by: nil } %>
15
+ <%= active_link_to Spree.t('plp.name_a_z'), url_for(permitted_params.merge(sort_by: 'name-a-z')), class: 'dropdown-item', active: { sort_by: 'name-a-z' } %>
16
+ <%= active_link_to Spree.t('plp.name_z_a'), url_for(permitted_params.merge(sort_by: 'name-z-a')), class: 'dropdown-item', active: { sort_by: 'name-z-a' } %>
17
+ <%= active_link_to Spree.t('plp.newest_first'), url_for(permitted_params.merge(sort_by: 'newest-first')), class: 'dropdown-item', active: { sort_by: 'newest-first' } %>
18
+ <%= active_link_to Spree.t('plp.price_high_to_low'), url_for(permitted_params.merge(sort_by: 'price-high-to-low')), class: 'dropdown-item', active: { sort_by: 'price-high-to-low' } %>
19
+ <%= active_link_to Spree.t('plp.price_low_to_high'), url_for(permitted_params.merge(sort_by: 'price-low-to-high')), class: 'dropdown-item', active: { sort_by: 'price-low-to-high' } %>
20
+ </div>
36
21
  </div>
@@ -11,7 +11,7 @@
11
11
  <% else %>
12
12
  <% if params[:keywords] %>
13
13
  <div class="container d-md-flex pt-md-5">
14
- <div class="plp-results-text text-uppercase mx-md-auto py-md-5">
14
+ <div class="plp-results-text mx-md-auto py-md-5">
15
15
  <%= "#{@products.total_count} #{Spree.t('plp.results_for')} '#{params[:keywords].upcase}'" %>
16
16
  </div>
17
17
  </div>
@@ -5,7 +5,7 @@
5
5
 
6
6
  <% if products.any? %>
7
7
  <div class="product-details-related" id="product-details-related-<%= relation_type.id %>">
8
- <p class="font-weight-bold text-center text-uppercase product-details-carousel-text"><%= relation_type.name %></p>
8
+ <p class="font-weight-bold text-center product-details-carousel-text"><%= relation_type.name %></p>
9
9
  <%= render 'spree/shared/carousel_4_products', id: "related-products-carousel-#{relation_type.id}", products: products %>
10
10
  </div>
11
11
  <% end %>
@@ -4,7 +4,7 @@
4
4
  <div class="row">
5
5
 
6
6
  <div class="col d-flex align-items-center truncate pr-0">
7
- <%= link_to spree.cart_path, class: "text-uppercase truncate checkout-header-link-text", method: :get do %>
7
+ <%= link_to spree.cart_path, class: "truncate checkout-header-link-text btn btn-link", method: :get do %>
8
8
  <%= icon(name: 'arrow-right',
9
9
  classes: 'spree-icon-arrow spree-icon-arrow-left',
10
10
  width: 14,
@@ -6,7 +6,7 @@
6
6
  </label>
7
7
  <%= select_tag(:switch_to_currency,
8
8
  options_for_select(supported_currency_options, current_currency),
9
- class: 'custom-select w-100') %>
9
+ class: 'custom-select custom-select-sm w-100') %>
10
10
  <noscript><%= submit_tag %></noscript>
11
11
  </div>
12
12
  <% end %>
@@ -12,10 +12,10 @@
12
12
  </p>
13
13
 
14
14
  <div class="d-flex delete-address-popup-buttons">
15
- <div class="btn bg-light-background text-primary border-2 border-primary text-uppercase font-weight-bold delete-address-popup-button js-delete-address-popup-close-button"><%= Spree.t(:cancel) %></div>
15
+ <div class="btn bg-light-background text-primary border-2 border-primary font-weight-bold delete-address-popup-button js-delete-address-popup-close-button"><%= Spree.t(:cancel) %></div>
16
16
  <a
17
17
  id="delete-address-popup-confirm"
18
- class="btn btn-primary text-uppercase font-weight-bold delete-address-popup-button"
18
+ class="btn btn-primary font-weight-bold delete-address-popup-button"
19
19
  data-method="delete"
20
20
  rel="nofollow"
21
21
  href="#">
@@ -47,7 +47,7 @@
47
47
  </div>
48
48
  </div>
49
49
  </div>
50
- <div class="row d-none d-xl-flex border-top pt-5 text-uppercase footer-spree-menu-links">
50
+ <div class="row d-none d-xl-flex border-top pt-5 footer-spree-menu-links">
51
51
 
52
52
  <% if spree_menu('footer').present? %>
53
53
  <% spree_menu('footer').children.each do |parent| %>
@@ -71,10 +71,10 @@
71
71
  <% if spree.respond_to?(:account_path) %>
72
72
  <div class="col-3 mb-5">
73
73
  <div class="footer-spree-label">
74
- <%= Spree.t('nav_bar.my_account') %>
74
+ <%= Spree.t(:my_account) %>
75
75
  </div>
76
76
  <div class="pt-2">
77
- <%= link_to Spree.t(:my_orders).upcase, spree.account_path(anchor: "account-my-orders") %>
77
+ <%= link_to Spree.t(:my_orders), spree.account_path(anchor: "account-my-orders") %>
78
78
  </div>
79
79
  </div>
80
80
  <% end %>
@@ -7,8 +7,9 @@
7
7
  <%= favicon_link_tag(spree_favicon_path) %>
8
8
  <%= stylesheet_link_tag 'spree/frontend/all', media: 'screen', data: { turbo_track: 'reload' } %>
9
9
  <%= csrf_meta_tags %>
10
+
11
+ <%= javascript_importmap_tags('application-spree-frontend') %>
10
12
  <%= render 'spree/shared/paths' %>
11
13
  <%= render 'spree/shared/locale_and_currency' %>
12
- <%= javascript_include_tag "application", defer: true, data: { turbo_track: 'reload' } %>
13
14
  <%= javascript_include_tag 'spree/frontend/all', defer: true, data: { turbo_track: 'reload' } %>
14
15
  <%= yield :head %>
@@ -4,8 +4,8 @@
4
4
  <button id="internationalization-button-desktop" type="button" data-toggle="dropdown" class="navbar-right-dropdown-toggle" aria-label="<%= Spree.t(:internationalization) %>">
5
5
  <%= icon(name: 'global',
6
6
  classes: 'd-none d-xl-inline-block',
7
- width: 41,
8
- height: 36) %>
7
+ width: 24,
8
+ height: 24) %>
9
9
  <%= icon(name: 'arrow-down',
10
10
  classes: 'd-inline-block d-xl-none',
11
11
  width: 15,
@@ -17,7 +17,7 @@
17
17
  <% stores.each do |store| %>
18
18
  <div class="pl-3 d-flex justify-content-between align-items-center stores-list">
19
19
  <%= country_flag_icon(store_country_iso(store)) %>
20
- <%= store_link(store, class: "dropdown-item text-uppercase #{'font-weight-bold' if current_store == store}") %>
20
+ <%= store_link(store, class: "dropdown-item #{'font-weight-bold' if current_store == store}") %>
21
21
  </div>
22
22
  <% end %>
23
23
  <% else %>
@@ -4,7 +4,7 @@
4
4
  <%= link_to product_image(line_item.variant), spree.product_path(line_item.product) %>
5
5
  <div class="d-flex flex-column mt-2 mt-lg-0">
6
6
  <div><%= link_to line_item.name, spree.product_path(line_item.product) %></div>
7
- <ul class="checkout-confirm-order-details-line-items-line-item-name-options text-uppercase list-unstyled mb-0">
7
+ <ul class="checkout-confirm-order-details-line-items-line-item-name-options list-unstyled mb-0">
8
8
  <% line_item.variant.option_values.sort { |ov| ov.option_type.position }.each do |ov| %>
9
9
  <li>
10
10
  <% # TODO: rework option values so options_text method can be used here %>
@@ -6,7 +6,7 @@
6
6
  </label>
7
7
  <%= select_tag(:switch_to_locale,
8
8
  options_for_select(supported_locales_options, I18n.locale),
9
- class: 'custom-select w-100') %>
9
+ class: 'custom-select custom-select-sm w-100') %>
10
10
  <noscript><%= submit_tag %></noscript>
11
11
  </div>
12
12
  <% end %>
@@ -4,12 +4,12 @@
4
4
  <div id="password-credentials" class="mb-4">
5
5
  <div class="form-group mb-4">
6
6
  <p class="form-group checkout-content-inner-field">
7
- <%= f.email_field :email, class: 'spree-flat-input', placeholder: Spree.t(:email), value: params.dig(:spree_user, :email) %>
7
+ <%= f.email_field :email, class: 'form-control', placeholder: Spree.t(:email), value: params.dig(:spree_user, :email) %>
8
8
  </p>
9
9
  </div>
10
10
  <div class="form-group mb-4">
11
11
  <p class="form-group checkout-content-inner-field">
12
- <%= f.password_field :password, class: 'spree-flat-input', placeholder: Spree.t(:password) %>
12
+ <%= f.password_field :password, class: 'form-control', placeholder: Spree.t(:password) %>
13
13
  </p>
14
14
  </div>
15
15
  </div>
@@ -22,14 +22,14 @@
22
22
  <!-- Categories -->
23
23
  <% if child.container? && child.code?('category') %>
24
24
  <div class="category-links my-4 mx-2">
25
- <div class="category-links-header text-uppercase">
25
+ <div class="category-links-header">
26
26
  <%= child.name %>
27
27
  </div>
28
28
  <% if child.children.present? %>
29
29
  <ul class="pl-0">
30
30
  <% child.children.each do |category_link| %>
31
31
  <li>
32
- <%= spree_nav_link_tag(category_link, { class: "text-uppercase main-nav-bar-category-links dropdown-item truncate" }) %>
32
+ <%= spree_nav_link_tag(category_link, { class: "main-nav-bar-category-links dropdown-item truncate" }) %>
33
33
  </li>
34
34
  <% end %>
35
35
  </ul>
@@ -22,7 +22,7 @@
22
22
  <% stores.each do |store| %>
23
23
  <li class="d-flex justify-content-between align-items-center mobile-navigation-list-item">
24
24
  <%= country_flag_icon(store_country_iso(store)) %>
25
- <%= store_link(store, class: "dropdown-item text-uppercase d-flex #{'font-weight-bold' if current_store == store}") %>
25
+ <%= store_link(store, class: "dropdown-item d-flex #{'font-weight-bold' if current_store == store}") %>
26
26
  </li>
27
27
  <% end %>
28
28
  <% else %>
@@ -1,5 +1,5 @@
1
1
  <% if spree_menu.present? %>
2
- <div class="position-fixed text-uppercase d-xl-none mobile-navigation" role="navigation" aria-label="<%= Spree.t('nav_bar.mobile') %>">
2
+ <div class="position-fixed d-xl-none mobile-navigation" role="navigation" aria-label="<%= Spree.t('nav_bar.mobile') %>">
3
3
  <div class="container d-flex align-items-center justify-content-between header-spree" data-hook>
4
4
  <button class="m-0 p-0" id="mobile-navigation-back-button" aria-label="<%= Spree.t('nav_bar.go_to_previous_menu') %>">
5
5
  <%= icon(name: 'arrow-right',
@@ -4,8 +4,8 @@
4
4
  <button type="button" class="navbar-right-dropdown-toggle search-icons" aria-label="<%= Spree.t('nav_bar.show_search') %>">
5
5
  <%= icon(name: 'magnifying-glass',
6
6
  classes: 'd-inline-block',
7
- width: 36,
8
- height: 36) %>
7
+ width: 24,
8
+ height: 24) %>
9
9
  </button>
10
10
 
11
11
  <div id="search-dropdown" class="p-0 px-md-4 py-md-2 w-100 shadow navbar-right-search-menu-dropdown hide-on-esc">
@@ -19,8 +19,8 @@
19
19
  <button id="account-button" type="button" data-toggle="dropdown" class="navbar-right-dropdown-toggle account-icon" aria-label="<%= Spree.t('nav_bar.show_user_menu') %>">
20
20
  <%= icon(name: 'person',
21
21
  classes: 'd-inline-block',
22
- width: 41.4,
23
- height: 36) %>
22
+ width: 24,
23
+ height: 24) %>
24
24
  </button>
25
25
 
26
26
  <div id="link-to-account" class="dropdown-menu dropdown-menu-right text-right">
@@ -29,7 +29,7 @@
29
29
  </li>
30
30
  <% end %>
31
31
  <li id="link-to-cart">
32
- <%= render 'spree/shared/cart', class: 'd-inline-block cart-icon', size: 36, item_count: 0 %>
32
+ <%= render 'spree/shared/cart', class: 'd-inline-block cart-icon', size: 24, item_count: 0 %>
33
33
  </li>
34
34
  <%= render partial: 'spree/shared/internationalization_options' %>
35
35
  </ul>
@@ -15,7 +15,7 @@
15
15
  <% end %>
16
16
  <p>
17
17
 
18
- <div class="btn btn-primary text-uppercase font-weight-bold d-flex no-product-available-button" id="no-product-available-hide-button">
18
+ <div class="btn btn-primary font-weight-bold d-flex no-product-available-button" id="no-product-available-hide-button">
19
19
  <p class="d-flex m-auto no-product-available-button-text">
20
20
  <%= Spree.t(:ok) %>
21
21
  </p>
@@ -56,7 +56,7 @@
56
56
  <%= Spree.t(:products) %>
57
57
  </div>
58
58
  <div class="d-table" data-hook="order_details">
59
- <div class="d-none d-lg-table-row text-secondary text-uppercase" data-hook="order_details_line_items_headers">
59
+ <div class="d-none d-lg-table-row text-secondary" data-hook="order_details_line_items_headers">
60
60
  <p class="d-table-cell pb-1">
61
61
  <%= Spree.t(:product) %>
62
62
  </p>
@@ -82,7 +82,7 @@
82
82
  <%= link_to item.name, spree.product_path(item.product), class: 'checkout-confirm-order-details-line-items-line-item-name-link' %>
83
83
  </div>
84
84
  <% unless item.variant.is_master? %>
85
- <ul class="checkout-confirm-order-details-line-items-line-item-name-options text-uppercase list-unstyled mb-0">
85
+ <ul class="checkout-confirm-order-details-line-items-line-item-name-options list-unstyled mb-0">
86
86
  <% item.variant.option_values.sort { |ov| ov.option_type.position }.each do |ov| %>
87
87
  <li>
88
88
  <% # TODO: rework option values so options_text method can be used here %>
@@ -120,7 +120,7 @@
120
120
  <% unless @order.uneditable? %>
121
121
  <div data-hook="buttons">
122
122
  <% submit_label_key = @order.confirm? ? :place_order : :save_and_continue %>
123
- <%= submit_tag Spree.t(submit_label_key), class: 'btn btn-primary text-uppercase font-weight-bold w-100 checkout-content-save-continue-button' %>
123
+ <%= submit_tag Spree.t(submit_label_key), class: 'btn btn-primary font-weight-bold w-100 checkout-content-save-continue-button' %>
124
124
  </div>
125
125
  <% end %>
126
126
  </div>
@@ -47,14 +47,14 @@
47
47
  <div class="container-fluid">
48
48
  <div class="row pb-4 justify-content-center">
49
49
  <div class="col-12 col-lg-8">
50
- <%= link_to spree.checkout_path, class: 'btn btn-primary w-100 font-weight-bold text-uppercase product-added-modal-button', method: :get do %>
50
+ <%= link_to spree.checkout_path, class: 'btn btn-primary w-100 font-weight-bold product-added-modal-button', method: :get do %>
51
51
  <%= Spree.t(:checkout) %>
52
52
  <% end %>
53
53
  </div>
54
54
  </div>
55
55
  <div class="row justify-content-center">
56
56
  <div class="col-12 col-lg-8">
57
- <%= link_to spree.cart_path, class: 'btn btn-outline-primary w-100 font-weight-bold text-uppercase product-added-modal-button' do %>
57
+ <%= link_to spree.cart_path, class: 'btn btn-outline-primary w-100 font-weight-bold product-added-modal-button' do %>
58
58
  <%= Spree.t('pdp.view_cart') %>
59
59
  <% end %>
60
60
  </div>
@@ -1,12 +1,12 @@
1
1
  <div class="form-group mb-5">
2
- <%= f.email_field :email, class: 'spree-flat-input', placeholder: Spree.t(:email) %>
2
+ <%= f.email_field :email, class: 'form-control', placeholder: Spree.t(:email) %>
3
3
  </div>
4
4
 
5
5
  <div class="form-group mb-4">
6
- <%= f.password_field :password, class: 'spree-flat-input', placeholder: Spree.t(:password) %>
6
+ <%= f.password_field :password, class: 'form-control', placeholder: Spree.t(:password) %>
7
7
  </div>
8
8
 
9
9
  <div class="form-group mb-5">
10
- <%= f.password_field :password_confirmation, class: 'spree-flat-input', placeholder: Spree.t(:confirm_password) %>
10
+ <%= f.password_field :password_confirmation, class: 'form-control', placeholder: Spree.t(:confirm_password) %>
11
11
  </div>
12
12
  <div data-hook="signup_below_password_fields"></div>
@@ -1,5 +1,5 @@
1
1
  <% cache [base_cache_key, taxon, 'header'] do %>
2
- <div class="py-md-3 text-uppercase taxon-title">
2
+ <div class="py-md-3 taxon-title">
3
3
  <%= @taxon.name %>
4
4
  </div>
5
5
  <% unless @taxon.description.blank? %>
@@ -7,7 +7,7 @@
7
7
  <% child_taxons = [current_taxon, *current_taxon.children.where(hide_from_nav: false)] %>
8
8
  <% if current_taxon.level > 0 && child_taxons.size > 1 %>
9
9
  <div class="d-flex justify-content-center position-sticky sticky-top-90px taxon-subcategories-wrapper">
10
- <div class="py-1 text-uppercase d-none d-xl-flex overflow-x taxon-subcategories">
10
+ <div class="py-1 d-none d-xl-flex overflow-x taxon-subcategories">
11
11
  <% child_taxons.each_with_index.map do |subcategory, index| %>
12
12
  <%=
13
13
  link_to_unless subcategory == taxon,
@@ -1,4 +1,4 @@
1
- <p class="font-weight-bold text-center homepage-carousel-text text-uppercase">
1
+ <p class="font-weight-bold text-center homepage-carousel-text">
2
2
  <%= @taxon.name %>
3
3
  </p>
4
4
 
@@ -5,7 +5,7 @@
5
5
  <%= form_for Spree.user_class.new, as: @user, url: spree.user_path(@user), method: :put do |f| %>
6
6
  <%= render partial: 'spree/shared/user_form', locals: { f: f, remember_me_field: false } %>
7
7
  <div>
8
- <%= f.submit Spree.t(:update), class: 'btn btn-lg btn-block btn-primary text-uppercase font-weight-bold' %>
8
+ <%= f.submit Spree.t(:update), class: 'btn btn-lg btn-block btn-primary font-weight-bold' %>
9
9
  </div>
10
10
  <% end %>
11
11
  </div>
@@ -12,7 +12,7 @@
12
12
  <dd class="account-page-user-info-item-definition"><%= @user.email %></dd>
13
13
 
14
14
  <div class="d-lg-inline-block account-page-user-info-item-store-credits">
15
- <p class="my-0 text-uppercase text-center">
15
+ <p class="my-0 text-center">
16
16
  <%= Spree.t(:store_credit_name) %>
17
17
  <% @user.available_store_credits(current_store).each do |value| %>
18
18
  <br><b class="account-page-user-info-item-store-credits-amount"><%= value %></b>
@@ -0,0 +1,2 @@
1
+ pin "application-spree-frontend", to: "spree/frontend/application.js", preload: true
2
+ pin "@hotwired/turbo-rails", to: "turbo.min.js", preload: true
@@ -0,0 +1,37 @@
1
+ en:
2
+ spree:
3
+ pdp:
4
+ checkout: Checkout
5
+ description: Description
6
+ details: Details
7
+ products_included_in_promotion: Products included in the promotion
8
+ quantity: Quantity
9
+ view_cart: View cart
10
+ you_may_also_like: You may also like
11
+ plp:
12
+ best_selling: Best Selling
13
+ clear_all: Clear All
14
+ collection: Collection
15
+ color: Color
16
+ done: Done
17
+ default: Default
18
+ filter_by: Filter By
19
+ newest_first: Newest First
20
+ no_results: No results
21
+ no_results_found: No results found
22
+ not_found_filters1: We couldn’t find a match for these filters.
23
+ not_found_filters2: Please try another choose.
24
+ not_found_text1: We couldn’t find products for '%{keywords}'.
25
+ not_found_text2: Please try another search.
26
+ price: Price
27
+ price_high_to_low: Price (High - Low)
28
+ price_low_to_high: Price (Low - High)
29
+ name_a_z: Name (A-Z)
30
+ name_z_a: Name (Z-A)
31
+ result: Result
32
+ results_for: Results For
33
+ size: Size
34
+ sort_by: Sort By
35
+ top_sellers: Top Sellers
36
+ type: Type
37
+
@@ -23,8 +23,6 @@ module Spree
23
23
  directory 'homepage', './app/assets/images/homepage'
24
24
  # SCSS theming
25
25
  template 'variables.scss', './app/assets/stylesheets/spree/frontend/variables/variables.scss'
26
- # Sprockets 4 manifest
27
- template 'app/assets/config/manifest.js', force: Rails.env.test?
28
26
  # home page template
29
27
  directory 'home', './app/views/spree/home'
30
28
  end
@@ -4,7 +4,7 @@ module Spree
4
4
  preference :additional_filters_partials, :array, default: %w()
5
5
  preference :always_put_site_name_in_title, :boolean, default: true
6
6
  preference :coupon_codes_enabled, :boolean, default: true # Determines if we show coupon code form at cart and checkout
7
- preference :http_cache_enabled, :boolean, default: true
7
+ preference :http_cache_enabled, :boolean, default: false
8
8
  preference :layout, :string, default: 'spree/layouts/spree_application'
9
9
  preference :locale, :string, default: nil
10
10
  preference :products_filters, :array, default: %w(keywords price sort_by)
@@ -9,11 +9,15 @@ module Spree
9
9
  config.action_view.sanitized_allowed_tags = %w(a b del em i ins mark p small strong sub sup)
10
10
  config.action_view.sanitized_allowed_attributes = %w(href)
11
11
 
12
- # sets the manifests / assets to be precompiled, even when initialize_on_precompile is false
13
- initializer 'spree.assets.precompile', group: :all do |app|
14
- app.config.assets.precompile += %w[
15
- spree/frontend/all*
16
- ]
12
+ initializer "spree.frontend.assets" do |app|
13
+ app.config.assets.paths << root.join("app/javascript")
14
+ app.config.assets.precompile += %w[ spree_frontend_manifest ]
15
+ end
16
+
17
+ initializer 'spree.frontend.importmap', before: 'importmap' do |app|
18
+ app.config.importmap.paths << root.join('config/importmap.rb')
19
+ # https://github.com/rails/importmap-rails?tab=readme-ov-file#sweeping-the-cache-in-development-and-test
20
+ app.config.importmap.cache_sweepers << root.join('app/javascript')
17
21
  end
18
22
 
19
23
  initializer 'spree.frontend.environment', before: :load_config_initializers do |_app|
@@ -1,9 +1,9 @@
1
1
  module Spree
2
2
  module Frontend
3
- VERSION = '4.7.0'.freeze
3
+ VERSION = '4.8.0'.freeze
4
4
 
5
- def self.version
6
- VERSION
5
+ def gem_version
6
+ Gem::Version.new(VERSION)
7
7
  end
8
8
  end
9
9
  end
@@ -3,15 +3,17 @@ require 'spree_api'
3
3
 
4
4
  require 'sprockets/railtie'
5
5
 
6
+ require 'importmap-rails'
6
7
  require 'bootstrap'
7
8
  require 'glyphicons'
8
9
  require 'inline_svg'
9
10
  require 'popper_js'
10
11
  require 'canonical-rails'
11
12
  require 'jquery-rails'
12
- require 'jsbundling-rails'
13
13
  require 'turbo-rails'
14
+ require 'stimulus-rails'
14
15
  require 'responders'
16
+ require 'active_link_to'
15
17
 
16
18
  require 'spree/frontend/middleware/seo_assist'
17
19
  require 'spree/frontend/engine'
@@ -4,19 +4,19 @@ require_relative 'lib/spree/frontend/version'
4
4
  Gem::Specification.new do |s|
5
5
  s.platform = Gem::Platform::RUBY
6
6
  s.name = 'spree_frontend'
7
- s.version = Spree::Frontend.version
8
- s.authors = ['Sean Schofield', 'Spark Solutions']
7
+ s.version = Spree::Frontend::VERSION
8
+ s.authors = ['Sean Schofield', 'Spark Solutions Sp. z o.o.', 'Vendo Connect Inc.']
9
9
  s.email = 'hello@spreecommerce.org'
10
- s.summary = 'The default Storefront built with Rails and Turbo/Hotwire for Spree eCommerce platform'
10
+ s.summary = 'Spree Commerce Storefront built with Rails and Turbo/Hotwire'
11
11
  s.description = s.summary
12
12
  s.homepage = 'https://spreecommerce.org'
13
13
  s.license = 'BSD-3-Clause'
14
14
 
15
15
  s.metadata = {
16
- "bug_tracker_uri" => "https://github.com/spree/spree/issues",
17
- "changelog_uri" => "https://github.com/spree/spree/releases/tag/v#{s.version}",
18
- "documentation_uri" => "https://dev-docs.spreecommerce.org/",
19
- "source_code_uri" => "https://github.com/spree/spree/tree/v#{s.version}",
16
+ "bug_tracker_uri" => "https://github.com/spree/spree_rails_frontend/issues",
17
+ "changelog_uri" => "https://github.com/spree/spree_rails_frontend/releases/tag/v#{s.version}",
18
+ "documentation_uri" => "https://docs.spreecommerce.org/",
19
+ "source_code_uri" => "https://github.com/spree/spree_rails_frontend/tree/v#{s.version}",
20
20
  }
21
21
 
22
22
  s.required_ruby_version = '>= 3.0'
@@ -25,21 +25,23 @@ Gem::Specification.new do |s|
25
25
  s.require_path = 'lib'
26
26
  s.requirements << 'none'
27
27
 
28
- s.add_dependency 'spree_api', ">= #{s.version}"
29
- s.add_dependency 'spree_core', ">= #{s.version}"
28
+ s.add_dependency 'spree_api', "~> 4.7"
29
+ s.add_dependency 'spree_core', "~> 4.7"
30
30
 
31
31
  s.add_dependency 'babel-transpiler', '~> 0.7'
32
32
  s.add_dependency 'bootstrap', '~> 4.0'
33
33
  s.add_dependency 'glyphicons', '~> 1.0'
34
34
  s.add_dependency 'canonical-rails', '~> 0.2', '>= 0.2.10'
35
35
  s.add_dependency 'inline_svg', '~> 1.5'
36
- s.add_dependency 'jsbundling-rails'
37
36
  s.add_dependency 'jquery-rails', '~> 4.3'
38
37
  s.add_dependency 'sass-rails', '>= 5'
39
38
  s.add_dependency 'turbo-rails'
39
+ s.add_dependency 'stimulus-rails'
40
+ s.add_dependency 'importmap-rails'
40
41
  s.add_dependency 'responders'
41
42
  s.add_dependency 'sprockets', '~> 4.0'
42
43
  s.add_dependency 'flag-icons-rails', '~> 3.4'
44
+ s.add_dependency 'active_link_to'
43
45
 
44
46
  s.add_development_dependency 'capybara-accessible'
45
47
  end