-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Use Address name attribute in views and APIs #3524
Use Address name attribute in views and APIs #3524
Conversation
c4462de
to
f6d7c55
Compare
f6d7c55
to
187464b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
187464b
to
e446ac9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great stuff again, but I left some other notes. Let me know what do you think!
e446ac9
to
4fd8b3b
Compare
4fd8b3b
to
6bb63de
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @filippoliverani. This thing is becoming a reality!
Thank you for your help @kennyadsl! 💪 |
@filippoliverani can you check the conflict here. I can't recall merging something in that file lately.. 🤔 |
Favor name attribute usage over firstname and lastname. To avoid internally relying on deprecated code for backwards compatibility, deprecated fields are rendered in API responses only when `show_deprecated_attributes` preference is set to true.
Favor name attribute usage over firstname and lastname attributes. To avoid internally relying on deprecated code for backwards compatibility, deprecated fields are rendered in HTML views instead of name field only when `show_deprecated_attributes` preference is set to true.
Favor name attribute usage in backend over firstname and lastname. To avoid internally relying on deprecated code for backwards compatibility, deprecated fields are rendered in HTML views and API responses instead of name field only when `show_deprecated_attributes` preference is set to true.
6bb63de
to
8b43d28
Compare
|
Since solidusio/solidus#3524 was merged, we need to verify if we're using the single "Name" field or the previous first/last name combination.
Since solidusio/solidus#3524 was merged, we need to verify if we're using the single "Name" field or the previous first/last name combination.
Since solidusio/solidus#3524 was merged, we need to verify if we're using the single "Name" field or the previous first/last name combination.
Because of addresses' firstname & lastname deprecations in solidusio/solidus#3584, solidusio/solidus#3524 and probably other PRs, the inputs where deleted in favor of a single `name` input. This is only on master for now, so it should be in 2.11 or 3.0.
Because of addresses' firstname & lastname deprecations in solidusio/solidus#3584, solidusio/solidus#3524 and probably other PRs, the inputs where deleted in favor of a single `name` input. This is only on master for now, so it should be in 2.11 or 3.0.
Because of addresses' firstname & lastname deprecations in solidusio/solidus#3584, solidusio/solidus#3524 and probably other PRs, the inputs where deleted in favor of a single `name` input. This is only on master for now, so it should be in 2.11 or 3.0.
Because of addresses' firstname & lastname deprecations in solidusio/solidus#3584, solidusio/solidus#3524 and probably other PRs, the inputs where deleted in favor of a single `name` input. This is only on master for now, so it should be in 2.11 or 3.0.
In solidusio/solidus#3524 we introduced a new preference that allows to use the combined version of firstname/lastname. This commit updates checkout feature specs to reflect this preference. Once the split version will be deprecated and removed, we can probably also revert this commit and use the combined version only.
In solidusio/solidus#3524 we introduced a new preference that allows to use the combined version of firstname/lastname. This commit updates checkout feature specs to reflect this preference. Once the split version will be deprecated and removed, we can probably also revert this commit and use the combined version only.
In solidusio/solidus#3524 we introduced a new preference that allows to use the combined version of firstname/lastname. This commit updates checkout feature specs to reflect this preference. Once the split version will be deprecated and removed, we can probably also revert this commit and use the combined version only.
@@ -103,6 +103,7 @@ class Application < ::Rails::Application | |||
Spree.config do |config| | |||
config.mails_from = "[email protected]" | |||
config.raise_with_invalid_currency = false | |||
config.use_combined_first_and_last_name_in_address = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should have been false
, because we still tested v2.11 here, that has this set to false
(see above)
That way specs are misleadingly green and issues like #4094 didn't came up in the specs for v2.11
I am proposing to revert this in v2.11 branch
Description
This PR is a step to solve #3234 and a continuation of #3458
The PR allows to start using the new
Spree::Address#name
attribute instead offirstname
andlastname
by adding ashow_address_deprecated_attributes
preference and providing alternate HTML and JSON views.The old attributes are not deprecated yet, but this PR discourages their usage and enables
name
usage everywhere.Checklist: