Skip to content

Conversation

@mamhoff
Copy link
Contributor

@mamhoff mamhoff commented Dec 23, 2025

Summary

Prices belong to variants, and variants are already soft-deletable. Prices do not need to be soft-deletable, and soft-deletable prices just make everything hard to understand.

Note especially how none of the specs that had to be changed offer any explanation on what "soft-deleting" a price semantically means. It's all just "ok prices have a deleted at, so how would that behave if ...", and that behavior is always extremely close to prices without soft-deletion.

Checklist

Check out our PR guidelines for more details.

The following are mandatory for all PRs:

The following are not always needed:

  • 📖 I have updated the README to account for my changes.
  • 📑 I have documented new code with YARD.
  • 🛣️ I have opened a PR to update the guides.
  • ✅ I have added automated tests to cover my changes.
  • 📸 I have attached screenshots to demo visual changes.

@mamhoff mamhoff requested a review from a team as a code owner December 23, 2025 22:53
@github-actions github-actions bot added the changelog:solidus_core Changes to the solidus_core gem label Dec 23, 2025
@codecov
Copy link

codecov bot commented Dec 23, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.49%. Comparing base (f8779d6) to head (ab48ab6).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6400      +/-   ##
==========================================
+ Coverage   89.48%   89.49%   +0.01%     
==========================================
  Files         980      981       +1     
  Lines       20438    20458      +20     
==========================================
+ Hits        18289    18309      +20     
  Misses       2149     2149              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

We've added Spree::SoftDeletable to maybe too many models. Especially
Spree::Price does not need soft-deletion, as variants already have it.

This adds a module that can be included instead of Spree::SoftDeletable,
that defines the methods that the Discard gem defines, and deprecates
all of these methods.
@mamhoff mamhoff force-pushed the remove-soft-delete-from-prices branch 2 times, most recently from 072edbc to 609f65e Compare December 23, 2025 23:21
@github-actions github-actions bot added the changelog:solidus_backend Changes to the solidus_backend gem label Dec 23, 2025
@mamhoff mamhoff force-pushed the remove-soft-delete-from-prices branch 3 times, most recently from b958563 to 1086995 Compare December 26, 2025 18:38
We don't need soft delete on a model that belongs to an already
soft-deleted model. It'll disappear anyway.
@mamhoff mamhoff force-pushed the remove-soft-delete-from-prices branch from 1086995 to ab48ab6 Compare December 28, 2025 00:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog:solidus_backend Changes to the solidus_backend gem changelog:solidus_core Changes to the solidus_core gem

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant