Skip to content

Conversation

@chaimann
Copy link
Contributor

@chaimann chaimann commented Mar 17, 2025

Split from #6160 (commit 062b248)

Summary

Changes description:

  • introduced @include_name_field flag that controls whether to show "Name" field on the form;
  • renamed keyword address to addressable to better reflect the nature of the passed object;
  • renamed keyword name to form_field_name to avoid confusion with "Name" field, whereas form_field_name is 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:

  • 📖 I have updated the README to account for my changes.
  • 📑 I have documented new code with YARD.
  • 🛣️ I have opened a PR to update the guides.
  • ✅ I have added automated tests to cover my changes.
  • 📸 I have attached screenshots to demo visual changes.

@chaimann chaimann marked this pull request as ready for review March 17, 2025 18:06
@chaimann chaimann requested a review from a team as a code owner March 17, 2025 18:06
@chaimann
Copy link
Contributor Author

chaimann commented Apr 1, 2025

@tvdeyen please have a look, this addresses your change request 🙏 #6160 (review)

@chaimann chaimann requested a review from tvdeyen April 7, 2025 09:29
@tvdeyen tvdeyen force-pushed the admin-update-address-component branch from e0a3486 to 8f1093f Compare April 8, 2025 14:39
chaimann added a commit to chaimann/solidus that referenced this pull request Apr 8, 2025
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.

Thanks

chaimann added a commit to chaimann/solidus that referenced this pull request Apr 9, 2025
@chaimann chaimann force-pushed the admin-update-address-component branch from fc49c32 to b3717df Compare April 9, 2025 07:24
chaimann added a commit to chaimann/solidus that referenced this pull request Apr 9, 2025
@chaimann chaimann force-pushed the admin-update-address-component branch from b3717df to 55380c9 Compare April 9, 2025 15:54
- 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).
@chaimann chaimann force-pushed the admin-update-address-component branch from 55380c9 to 4ff6e68 Compare April 11, 2025 13:01
@codecov
Copy link

codecov bot commented Apr 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.79%. Comparing base (63d01f1) to head (4ff6e68).
Report is 8 commits behind head on main.

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

@tvdeyen is it good to be merged?

@tvdeyen tvdeyen merged commit c010cae into solidusio:main Apr 25, 2025
23 checks passed
@tvdeyen
Copy link
Member

tvdeyen commented Apr 25, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants