Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Admin promotion categories add/edit #6101

Merged
merged 4 commits into from
Feb 14, 2025

Conversation

chaimann
Copy link
Contributor

@chaimann chaimann commented Feb 7, 2025

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

image image image

Checklist

@chaimann chaimann self-assigned this Feb 7, 2025
@github-actions github-actions bot added changelog:solidus_admin changelog:solidus_legacy_promotions Changes to the solidus_legacy_promotions gem changelog:solidus_promotions Changes to the solidus_promotions gem labels Feb 7, 2025
Copy link

codecov bot commented Feb 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.45%. Comparing base (ec1c421) to head (c87a012).
Report is 25 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

@github-actions github-actions bot added changelog:solidus_core Changes to the solidus_core gem changelog:solidus_admin labels Feb 7, 2025
@chaimann chaimann force-pushed the admin-promotion-categories-add-edit branch from 33bf831 to 79c935a Compare February 10, 2025 13:51
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.
@chaimann chaimann force-pushed the admin-promotion-categories-add-edit branch from 79c935a to c9791ca Compare February 11, 2025 09:12
@@ -44,7 +44,7 @@ bundle exec rails solidus_promotions:migrate_existing_promotions

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:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

quite sure this was a typo as the code below is situated in config/initializers/spree.rb, commented out after generator run

Comment on lines +2 to +4
solidus_admin:
promotion_categories:
title: "Promotion Categories"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was needed for page title to display correctly

Comment on lines +2 to +4
solidus_admin:
promotions:
title: "Promotions"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for page title to display correctly

@chaimann chaimann marked this pull request as ready for review February 11, 2025 12:22
@chaimann chaimann requested a review from a team as a code owner February 11, 2025 12:22
Copy link
Member

@kennyadsl kennyadsl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@mamhoff
Copy link
Contributor

mamhoff commented Feb 13, 2025

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.

@chaimann
Copy link
Contributor Author

@kennyadsl my understanding is that since legacy promotions is the default dependency which users use until they migrate to solidus_promotions, we need to make sure its UI is uniform with other admin pages, that are/will be updated with modal forms.
As @mamhoff mentioned, both categories systems UI are easy to add changes to since UI is the same, while promotions UI is not part of this ticket and won't be changed

Copy link
Member

@kennyadsl kennyadsl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👌

Copy link
Member

@tvdeyen tvdeyen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Thanks 👍🏻

@tvdeyen tvdeyen added this to the 4.5 milestone Feb 14, 2025
@tvdeyen tvdeyen merged commit a25b831 into solidusio:main Feb 14, 2025
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog:solidus_admin changelog:solidus_core Changes to the solidus_core gem changelog:solidus_legacy_promotions Changes to the solidus_legacy_promotions gem changelog:solidus_promotions Changes to the solidus_promotions gem
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Admin][Settings] Introduce promotion category creation and modification capability
4 participants