-
Notifications
You must be signed in to change notification settings - Fork 116
[Order details] Capitalize addresses and surname by word #15611
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
[Order details] Capitalize addresses and surname by word #15611
Conversation
|
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.
Tests OK; small suggestion in-line.
All good, but I'd argue we should go further here:
- First name: words
- Company: words
- City: words
- Postcode: characters
- State: words
- Billing email: never
This is just a setting for the default shift key behaviour; those seem like safe options even though some users will need to override, it probably minimises it for most users.
@@ -31,6 +32,7 @@ struct TitleAndTextFieldRow: View { | |||
editable: Bool = true, | |||
fieldAlignment: TextAlignment = .trailing, | |||
keyboardType: UIKeyboardType = .default, | |||
textInputAutocapitalization: TextInputAutocapitalization = .sentences, |
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.
Nit: you could probably make this a little neater by just calling it autocapitalization
. I'm not sure that "text input" provides additional clarity.
It does match the SwiftUI view modifier, but I think that can be applied to a fairly wide array of controls and so might need the extra clarity.
Closes: WOOMOB-136
Description
This PR adds a new property to
TitleAndTextFieldRow
which allows us to capitalize words on a text field case by case if needed, in this case, we want to capitalize addresses and surnames by word. The original issue mentions only addresses, but surnames make sense as well. Happy to add more capitalization rules but I think that's good by default.Testing information
Changes are only on 586a651 , the rest of commits are to clean up some string duplications I found within the same path.
RELEASE-NOTES.txt
if necessary.Reviewer (or Author, in the case of optional code reviews):
Please make sure these conditions are met before approving the PR, or request changes if the PR needs improvement: