-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Admin stores add edit #6228
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
base: main
Are you sure you want to change the base?
Admin stores add edit #6228
Conversation
d954048
to
0e780db
Compare
88e2517
to
806d939
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
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. 🚀 New features to boost your workflow:
|
53f27b5
to
5bd82da
Compare
7d44f5a
to
40e76d7
Compare
going to split few changes into separate PRs |
Since store form will not be in a modal, change the turbo frame name to be more general :resource_form
`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.
9c875ee
to
e45a741
Compare
What's the status of this PR? It's a very large draft that I don't want to just leave sitting here. |
@jarednorman it was waiting for flashes PR to be merged, so now I can move it forward |
Summary
Implement interface to create/edit stores.
Other changes
: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- split to [Admin][UI] Allow select to include blank option #6279.:include_blank
option. Component now will only accept array forchoices
. Updated usage in a few places where a string has been passed instead of an array (user store credits)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- split to [Admin] Flashes helper and reorganization #6280.flash[:success]
toflash[:notice]
to be consistentChecklist
Check out our PR guidelines for more details.
The following are mandatory for all PRs: