-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[Admin] Enable creation and editing of option type and management of related option values #6236
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
Draft
chaimann
wants to merge
35
commits into
solidusio:main
Choose a base branch
from
chaimann:admin-add-edit-option-types
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
d5c97a5
to
f2d2c8e
Compare
f2d2c8e
to
06ac254
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6236 +/- ##
==========================================
+ Coverage 88.86% 88.97% +0.10%
==========================================
Files 857 865 +8
Lines 18415 18463 +48
==========================================
+ Hits 16365 16427 +62
+ Misses 2050 2036 -14 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
c1f6435
to
540ad6a
Compare
9e289b0
to
8bf5466
Compare
Since forms might be not only in modals, change the turbo frame name to be more general :resource_form
Sortable URL parameter, which is required for sorting to work properly, was not present for option types table after changing the index table to use explicit links rather than `row_url`s, due to condition in the table component template. Here we move `data-sortable-url` attribute out of the condition, so it's applicable to any index page that defines `sortable_options`.
If embedded, table container won't have a border, this will allow for a table to be rendered inside a panel section without unnecessary spacing.
`xlink:href` is deprecated per https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Attribute/xlink:href, recommendation is to use `href` attribute instead. Leaving `xlink:href` as a fallback option just in case.
This replicates legacy admin flow where newly created option type is shown with ability to add option values.
Option values table was not meant to be nested inside the form.
Adds modals for option value add/edit
This will help turbo stream responses to render flashes correctly.
Since we have a form for option type above the option values table, and users might have unsaved changes in that form, it's a good idea to not do a full page re-render on create and only target the table that was changed (plus clearing the modal frame and showing appropriate flash).
DRY actions, resources_controller.rb can now respond to turbo stream if inheriting controller opts in with #prefer_turbo_stream? override.
Allows for more customization, with ability to override resources paths, expected redirection paths, and specify endpoints to skip (e.g. if route is not defined).
Following 38c5b69 this file is obsolete and can be deleted.
To create separate nested groups, so that different shared examples don't share same context.
This just doesn't seem to be sensible to have since resources_controller defines all the CRUD actions, and as soon as all our controllers inherit from resources_controller, they won't be rubocop compliant because of this.
8bf5466
to
988b9a1
Compare
4 tasks
going to split few changes to separate PRs |
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
changelog:solidus_admin
changelog:solidus_legacy_promotions
Changes to the solidus_legacy_promotions gem
changelog:solidus_promotions
Changes to the solidus_promotions gem
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #6125
Summary
Screen.Recording.2025-05-30.at.18.30.04.mov
Other changes
embedded
option to UI table to allow it perfectly fit inside a UI panel;add- split to [Admin] ExtractMoveable
concern to contain the logic for resources that allow sorting;#move
action into concern #6282move flashes to its own layout component- split to [Admin] Flashes helper and reorganization #6280;prefer_turbo_stream?
option to resources_controller for children controllers to override when they'd prefer to respond to turbo stream format rather than default html.Checklist
Check out our PR guidelines for more details.
The following are mandatory for all PRs: