Refactor ui/forms/address component#6191
Merged
tvdeyen merged 3 commits intosolidusio:mainfrom Apr 25, 2025
Merged
Conversation
Contributor
Author
|
@tvdeyen please have a look, this addresses your change request 🙏 #6160 (review) |
e0a3486 to
8f1093f
Compare
tvdeyen
reviewed
Apr 8, 2025
admin/app/components/solidus_admin/orders/show/address/component.html.erb
Outdated
Show resolved
Hide resolved
chaimann
added a commit
to chaimann/solidus
that referenced
this pull request
Apr 8, 2025
As per this discussion solidusio#6191 (comment).
chaimann
added a commit
to chaimann/solidus
that referenced
this pull request
Apr 9, 2025
As per this discussion solidusio#6191 (comment).
fc49c32 to
b3717df
Compare
chaimann
added a commit
to chaimann/solidus
that referenced
this pull request
Apr 9, 2025
As per this discussion solidusio#6191 (comment).
b3717df to
55380c9
Compare
- change `address` to `addressable` to better reflect that the passed object can not only be an `Address` but any object with address fields (e.g. `StockLocation`); - change `name` to `fieldset_name` to avoid confusion with "Name" field, whereas `fieldset_name` is a name to be used for the form (e.g. "users[billing_address_attributes]");
With default `true`, this flag allows to control whether to show "Name" field on the form (will be used for stock location form where "Name" is the only field not used).
As per this discussion solidusio#6191 (comment).
55380c9 to
4ff6e68
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6191 +/- ##
=======================================
Coverage 88.78% 88.79%
=======================================
Files 839 839
Lines 18215 18216 +1
=======================================
+ Hits 16173 16174 +1
Misses 2042 2042 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
Author
|
@tvdeyen is it good to be merged? |
Member
|
Yes. Usually we have a two approvals from core team members rule, but since this is the new admin, which is still in beta and many core team members are away right now, it should be fine. |
4 tasks
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Split from #6160 (commit 062b248)
Summary
Changes description:
@include_name_fieldflag that controls whether to show "Name" field on the form;addresstoaddressableto better reflect the nature of the passed object;nametoform_field_nameto avoid confusion with "Name" field, whereasform_field_nameis a name to be used for the form (e.g. "users[billing_address_attributes]");Motivation:
This change allows to reuse this component in location stock form component, where the only difference between forms is that "Name" field is not there for location stock address.
Checklist
Check out our PR guidelines for more details.
The following are mandatory for all PRs:
The following are not always needed: