Skip to content

Conversation

chaimann
Copy link
Contributor

@chaimann chaimann commented May 5, 2025

Summary

Implement interface to create/edit stores.

image image

Other changes

  • Rename :resource_modal turbo frame to :resource_form and add an overridable method #resource_form_frame in resources_controller, that returns default frame name :resource_form.
  • UI select component: add support for :include_blank option. Component now will only accept array for choices. Updated usage in a few places where a string has been passed instead of an array (user store credits) - split to [Admin][UI] Allow select to include blank option #6279.
  • Updated layout to accommodate alerts display. Added FlashHelper to differentiate between toast flashes and alert flashes - split to [Admin] Flashes helper and reorganization #6280.
  • Updated usages of flash[:success] to flash[:notice] to be consistent - split to [Admin] Flashes helper and reorganization #6280.

Checklist

Check out our PR guidelines for more details.

The following are mandatory for all PRs:

@github-actions github-actions bot added changelog:solidus_core Changes to the solidus_core gem changelog:solidus_admin labels May 5, 2025
@chaimann chaimann mentioned this pull request May 5, 2025
4 tasks
@chaimann chaimann force-pushed the admin-stores-add-edit branch 4 times, most recently from d954048 to 0e780db Compare May 13, 2025 15:00
@github-actions github-actions bot added changelog:solidus_legacy_promotions Changes to the solidus_legacy_promotions gem changelog:solidus_promotions Changes to the solidus_promotions gem labels May 13, 2025
@chaimann chaimann force-pushed the admin-stores-add-edit branch 3 times, most recently from 88e2517 to 806d939 Compare May 13, 2025 16:10
Copy link

codecov bot commented May 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.64%. Comparing base (2aed8c3) to head (40e76d7).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6228      +/-   ##
==========================================
- Coverage   88.86%   86.64%   -2.22%     
==========================================
  Files         857      520     -337     
  Lines       18415    11947    -6468     
==========================================
- Hits        16365    10352    -6013     
+ Misses       2050     1595     -455     

☔ 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.

@chaimann chaimann force-pushed the admin-stores-add-edit branch 2 times, most recently from 53f27b5 to 5bd82da Compare May 21, 2025 18:04
@chaimann chaimann force-pushed the admin-stores-add-edit branch 3 times, most recently from 7d44f5a to 40e76d7 Compare June 3, 2025 10:14
@chaimann chaimann marked this pull request as ready for review June 3, 2025 15:59
@chaimann chaimann requested a review from a team as a code owner June 3, 2025 15:59
@chaimann chaimann marked this pull request as draft June 5, 2025 10:24
@chaimann
Copy link
Contributor Author

chaimann commented Jun 5, 2025

going to split few changes into separate PRs

chaimann added 14 commits June 27, 2025 23:21
`flash[:notice]` is what is used commonly to display a
regular success toast, and we will reserve `:success` flash
for alerts.
Store deletion can be aborted if we are deleting a default
store, so we'll show alert in that case.
We don't have to use turbo_frames on these pages since we are not
loading content into it but always do a page visit to /new and /edit
routes, and when server responds with 422 and templates with validation
errors we can just place relevant "id" on the topmost element of the
page so its content will be replaced with turbo stream.
@chaimann chaimann force-pushed the admin-stores-add-edit branch 2 times, most recently from 9c875ee to e45a741 Compare June 27, 2025 21:26
@jarednorman
Copy link
Member

What's the status of this PR? It's a very large draft that I don't want to just leave sitting here.

@chaimann
Copy link
Contributor Author

@jarednorman it was waiting for flashes PR to be merged, so now I can move it forward

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.

2 participants