Skip to content

armgit / spree

Public Imported from GitHub
0

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.

Drop asset pipeline leftovers (#14388)

Damian Legawiecc881132be28f
diff --git a/CLAUDE.md b/CLAUDE.md
index e673abde17..e40a8480ee 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -99,7 +99,6 @@ Day-to-day from the repo root: `pnpm server:dev` (foreground — streams web log
|---|---|
| Ruby code in `spree/*` gems | Nothing — bind-mounted, reloads on next request |
| Hosted React Dashboard at `/dashboard` (single-node test) | `pnpm server:dashboard` — rebuilds `packages/dashboard-starter/dist` with `VITE_BASE_PATH=/dashboard/`; served immediately through the monorepo mount (no restart). For dashboard *development* keep using Vite on :5173 (`cd packages/dashboard && pnpm dev`). |
-| Tailwind classes in `spree/admin` templates/helpers/JS | Nothing — a watcher in the web container rebuilds the admin CSS within ~15s. If changes still don't reach the browser, delete `server/public/assets/.manifest.json` (stale precompile output that freezes asset serving) and restart web — `pnpm server:dev` boots handle this automatically. |
| New migration in a gem | Nothing — the next `pnpm server:dev` boot runs `spree:install:migrations db:prepare` (or `cd server && pnpm exec spree migrate` while running) |
| Gem dependencies (gemspec / Gemfile / starter `Gemfile.lock` drift after a pull) | Nothing — the next `pnpm server:dev` boot self-heals (`bundle check || bundle install` into the `bundle_cache` volume); while running: `cd server && pnpm exec spree bundle install` |
| Compose files / `server/.env` | `pnpm server:dev` (force-recreates web + worker) |
diff --git a/scripts/docker-compose.edge.yml b/scripts/docker-compose.edge.yml
index fe4aec803b..1c2b034e46 100644
--- a/scripts/docker-compose.edge.yml
+++ b/scripts/docker-compose.edge.yml
@@ -46,14 +46,8 @@ services:
# or 500 on ActiveRecord::PendingMigrationError after every such pull.
# `bundle check` is sub-second when clean; the rails invocation is one
# boot (~5s) that no-ops when nothing changed.
- #
- # rm -f of the propshaft manifest: if public/assets/.manifest.json exists
- # (left behind by any assets:precompile — image builds, test prep, a
- # one-off rake run), Propshaft silently switches to its static resolver
- # and serves that frozen snapshot instead of app/assets/builds. Dev must
- # always resolve live.
command:
[
"sh", "-c",
- "(bundle check || bundle install) && rm -f public/assets/.manifest.json && bin/rails spree:install:migrations db:prepare && exec bin/rails server -b 0.0.0.0 -p 3000"
+ "(bundle check || bundle install) && bin/rails spree:install:migrations db:prepare && exec bin/rails server -b 0.0.0.0 -p 3000"
]
diff --git a/spree/core/app/views/spree/shared/_purchased_items_styles.html.erb b/spree/core/app/views/spree/shared/_purchased_items_styles.html.erb
index e552c0ba33..10422fb63f 100644
--- a/spree/core/app/views/spree/shared/_purchased_items_styles.html.erb
+++ b/spree/core/app/views/spree/shared/_purchased_items_styles.html.erb
@@ -24,6 +24,13 @@
border-radius: 12px;
}
+ .item .item_thumb_placeholder {
+ width: 80px;
+ height: 80px;
+ background-color: #E4E4E4;
+ border-radius: 12px;
+ }
+
.item .item_info {
padding: 8px 16px 8px 8px;
}
diff --git a/spree/core/lib/generators/spree/dummy/dummy_generator.rb b/spree/core/lib/generators/spree/dummy/dummy_generator.rb
index feb97921f2..19bbcbf8a6 100644
--- a/spree/core/lib/generators/spree/dummy/dummy_generator.rb
+++ b/spree/core/lib/generators/spree/dummy/dummy_generator.rb
@@ -55,6 +55,8 @@ module Spree
args << '--skip-dev-gems'
args << '--skip-action-mailbox'
args << '--skip-jbuilder'
+ args << '--skip-hotwire'
+ args << '--skip-action-cable'
# API mode (implies skip-asset-pipeline, skip-javascript, skip-hotwire)
args << '--api' if options[:api]
@@ -73,7 +75,6 @@ module Spree
template 'rails/application.rb', "#{dummy_path}/config/application.rb", force: true
template 'rails/routes.rb', "#{dummy_path}/config/routes.rb", force: true
template 'rails/test.rb', "#{dummy_path}/config/environments/test.rb", force: true
- template "app/assets/config/manifest.js", "#{dummy_path}/app/assets/config/manifest.js", force: true unless options[:api]
end
def test_dummy_inject_extension_requirements
diff --git a/spree/core/lib/generators/spree/dummy/templates/app/assets/config/manifest.js b/spree/core/lib/generators/spree/dummy/templates/app/assets/config/manifest.js
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/spree/dashboard/Gemfile b/spree/dashboard/Gemfile
index 2e9d1966b8..bcb6bab621 100644
--- a/spree/dashboard/Gemfile
+++ b/spree/dashboard/Gemfile
@@ -2,6 +2,4 @@ eval_gemfile('../common_spree_dependencies.rb')
gem 'spree', path: '../'
-gem 'sprockets-rails', '>= 3.5.2'
-
gemspec
diff --git a/spree/emails/Gemfile b/spree/emails/Gemfile
index 2e9d1966b8..bcb6bab621 100644
--- a/spree/emails/Gemfile
+++ b/spree/emails/Gemfile
@@ -2,6 +2,4 @@ eval_gemfile('../common_spree_dependencies.rb')
gem 'spree', path: '../'
-gem 'sprockets-rails', '>= 3.5.2'
-
gemspec
diff --git a/spree/emails/app/assets/config/spree_emails_manifest.js b/spree/emails/app/assets/config/spree_emails_manifest.js
deleted file mode 100644
index ac907b3677..0000000000
--- a/spree/emails/app/assets/config/spree_emails_manifest.js
+++ /dev/null
@@ -1 +0,0 @@
-//= link_tree ../images
diff --git a/spree/emails/app/assets/images/logo/spree_50.png b/spree/emails/app/assets/images/logo/spree_50.png
deleted file mode 100644
index 81e10ac368..0000000000
Binary files a/spree/emails/app/assets/images/logo/spree_50.png and /dev/null differ
diff --git a/spree/emails/app/assets/images/noimage/mini.png b/spree/emails/app/assets/images/noimage/mini.png
deleted file mode 100644
index ae0e527a85..0000000000
Binary files a/spree/emails/app/assets/images/noimage/mini.png and /dev/null differ
diff --git a/spree/emails/app/assets/images/noimage/noimage/large.png b/spree/emails/app/assets/images/noimage/noimage/large.png
deleted file mode 100644
index fd0e9b6bee..0000000000
Binary files a/spree/emails/app/assets/images/noimage/noimage/large.png and /dev/null differ
diff --git a/spree/emails/app/assets/images/noimage/noimage/mini.png b/spree/emails/app/assets/images/noimage/noimage/mini.png
deleted file mode 100644
index ae0e527a85..0000000000
Binary files a/spree/emails/app/assets/images/noimage/noimage/mini.png and /dev/null differ
diff --git a/spree/emails/app/assets/images/noimage/noimage/product.png b/spree/emails/app/assets/images/noimage/noimage/product.png
deleted file mode 100644
index fd0e9b6bee..0000000000
Binary files a/spree/emails/app/assets/images/noimage/noimage/product.png and /dev/null differ
diff --git a/spree/emails/app/assets/images/noimage/noimage/small.png b/spree/emails/app/assets/images/noimage/noimage/small.png
deleted file mode 100644
index 0b5b8cd2a1..0000000000
Binary files a/spree/emails/app/assets/images/noimage/noimage/small.png and /dev/null differ
diff --git a/spree/emails/app/assets/images/noimage/small.png b/spree/emails/app/assets/images/noimage/small.png
deleted file mode 100644
index 0b5b8cd2a1..0000000000
Binary files a/spree/emails/app/assets/images/noimage/small.png and /dev/null differ
diff --git a/spree/emails/app/views/spree/shared/_item_thumbnail_link.html.erb b/spree/emails/app/views/spree/shared/_item_thumbnail_link.html.erb
index 1fba790cb8..af96165779 100644
--- a/spree/emails/app/views/spree/shared/_item_thumbnail_link.html.erb
+++ b/spree/emails/app/views/spree/shared/_item_thumbnail_link.html.erb
@@ -3,5 +3,16 @@
<% if image.present? && image.attached? %>
<%= link_to spree_image_tag(image, variant: :small, alt: alt, width: 80, class: 'item_thumb'), product_url %>
<% else %>
- <%= link_to image_tag('noimage/small.png', alt: alt, width: 80, class: 'item_thumb'), product_url %>
+ <%# Table + inline styles, not a styled div: Outlook collapses empty block
+ elements and ignores class-based height, and a div inside <a> is invalid
+ under the XHTML doctype the mailer layout declares. %>
+ <table class="item_thumb_placeholder" width="80" height="80" cellpadding="0" cellspacing="0" role="presentation"
+ style="width: 80px; height: 80px; background-color: #E4E4E4; border-radius: 12px;">
+ <tr>
+ <td width="80" height="80" style="width: 80px; height: 80px; line-height: 80px; font-size: 0;">
+ <%= link_to '&#160;'.html_safe, product_url, 'aria-label': alt,
+ style: 'display: block; width: 80px; height: 80px; line-height: 80px; text-decoration: none;' %>
+ </td>
+ </tr>
+ </table>
<% end %>
diff --git a/spree/emails/config/initializers/assets.rb b/spree/emails/config/initializers/assets.rb
deleted file mode 100644
index 475b396339..0000000000
--- a/spree/emails/config/initializers/assets.rb
+++ /dev/null
@@ -1,3 +0,0 @@
-if Rails.application.config.respond_to?(:assets)
- Rails.application.config.assets.precompile << 'spree_emails_manifest.js'
-end