Admin promotion categories add/edit#6101
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6101 +/- ##
==========================================
+ Coverage 86.62% 92.45% +5.83%
==========================================
Files 511 391 -120
Lines 11809 8035 -3774
==========================================
- Hits 10229 7429 -2800
+ Misses 1580 606 -974 ☔ View full report in Codecov by Sentry. |
33bf831 to
79c935a
Compare
Introduces changes to legacy promotions UI based on solidusio#6046
Introduces changes to new solidus promotions UI based on solidusio#6046. Had to override few methods in controller and components due to differences in routing and naming in solidus_promotions. Copied capybara driver setup from legacy_promotions.
79c935a to
c9791ca
Compare
| This will create equivalents of the legacy promotion configuration in SolidusPromotions. | ||
|
|
||
| Now, change `config/initializers/solidus_promotions.rb` to use your new promotion configuration: | ||
| Now, change `config/initializers/spree.rb` to use your new promotion configuration: |
There was a problem hiding this comment.
quite sure this was a typo as the code below is situated in config/initializers/spree.rb, commented out after generator run
| solidus_admin: | ||
| promotion_categories: | ||
| title: "Promotion Categories" |
There was a problem hiding this comment.
this was needed for page title to display correctly
| solidus_admin: | ||
| promotions: | ||
| title: "Promotions" |
There was a problem hiding this comment.
for page title to display correctly
kennyadsl
left a comment
There was a problem hiding this comment.
Not sure I fully understand why we need to change the legacy promotion code. We already had a promotion categories CRUD in there, so what's the need to change it? Maybe I'm missing something, and tagging @mamhoff who probably has the best understanding of that part.
|
Promotion categories are easy enough to do for both extensions. The more common stuff we have in the new admin the better I think. The one thing I would not touch is the promotion form for legacy promotion. That is just too much work. |
|
@kennyadsl my understanding is that since legacy promotions is the default dependency which users use until they migrate to |
Summary
Addresses #6102
Continuation of the work on new Admin UI, to convert add/edit pages into modal forms, this will add modal forms for both old and new promotion categories, as well as changing index page to render turbo-links to items
Checklist