Skip to content
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

Address Field Order - Postcode #833

Open
brianWreaves opened this issue Jan 7, 2019 · 13 comments
Open

Address Field Order - Postcode #833

brianWreaves opened this issue Jan 7, 2019 · 13 comments
Labels
1. to develop Accepted and waiting to be taken care of enhancement New feature or request

Comments

@brianWreaves
Copy link

brianWreaves commented Jan 7, 2019

Describe the bug

Within the Address section of each contact, the field order doesn't render the "postcode" field after the "State or Province" but before "Country" field but instead between "Address" and "City" fields (See attached screenshot).

To Reproduce
Simply view a contact with an address entered.

Expected behavior
"Postcode" field should render after "State or province" but before "Country" field.

Actual behavior
"Postcode" field renders between "Address" and "City" fields.

Screenshots
Attached below with annotations.

nc14_contacts_app_address_field_order_02

Operating system: High Sierra & Android

Web server: Apache

Database: MySQL

PHP version: 7.1

Nextcloud version: 14.0.4

Contacts version: 2.1.8

Updated from an older Nextcloud or fresh install: Updated from older

Client configuration

Browser: FF64+

Operating system: High Sierra or Android 8+

CardDAV-clients: High Sierra interface


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@nextcloud-bot
Copy link
Member

GitMate.io thinks possibly related issues are #302 (Missing Fields), #803 (two address fields are connected after adding a phone number), #72 (Handle line-breaks in address field), #109 (Suggestion : XMPP field), and #57 (Address field escaped characters not showing).

@nextcloud-bot nextcloud-bot added the bug Something isn't working label Jan 7, 2019
@skjnldsv skjnldsv added the 1. to develop Accepted and waiting to be taken care of label Jan 7, 2019
@skjnldsv skjnldsv added this to the 3.0.2 milestone Jan 7, 2019
@skjnldsv
Copy link
Member

skjnldsv commented Jan 7, 2019

Hum, in Europe this is how we format the addresses: https://www.bitboost.com/ref/international-address-formats.html

It seems that it's also the case in a lot of various area. The postal code goes before the city :)

@skjnldsv skjnldsv added discussion Being discussed and removed 1. to develop Accepted and waiting to be taken care of bug Something isn't working labels Jan 7, 2019
@skjnldsv skjnldsv removed this from the 3.0.2 milestone Jan 7, 2019
@brianWreaves
Copy link
Author

Given such a diversity, the user needs an option to select format.

@skjnldsv
Copy link
Member

skjnldsv commented Jan 9, 2019

@jancborchardt opinion? :)

@jancborchardt
Copy link
Member

This could automatically be sorted based on the region format from the user settings. People shouldn’t need to manually select an additional option.

@skjnldsv
Copy link
Member

skjnldsv commented Jan 9, 2019

@jancborchardt I mean, I don't see myself maintaining a list of every country and the address layout ^^

@brianWreaves
Copy link
Author

brianWreaves commented Jan 9, 2019

@jancborchardt which "region format from the user settings" are you referring:

  • NC's Settings > Personal > Personal Info > Address field?
  • NC's Settings > Personal > Personal Info > Locale field?
  • The device's settings?
  • The browser's settings?
  • Something else?

Fair point, @skjnldsv! I reckon you could lean on a resource/API from another entity such as Maps or Contacts from Google.

Another option would be to allow users to drag & drop fields into the order they prefer within NC, in the Contacts app to create a default.

Then there are the suggestions in #309 which appears to be scheduled for v3.1.0.

@jancborchardt
Copy link
Member

I mean, I don't see myself maintaining a list of every country and the address layout ^^

Sure, with my remark I just meant that’s the solution we should go for if we do anything about this. The other solution is to leave it as it is.

Another option would be to allow users to drag & drop fields into the order they prefer within NC, in the Contacts app to create a default.

No, as this would be a lot to implement for a minor issue and would need to be tested to ensure it works.

@brianWreaves I am referring to:

NC's Settings > Personal > Personal Info > Locale field

Also thanks for referring #309 – this seems to be a duplicate of that.

@brianWreaves
Copy link
Author

The other solution is to leave it as it is.

That's not a solution at all, that's ignoring the issue.

...seems to be a duplicate of that.

Certainly has similar aspects to this post but is stating the opposite in that the contact format is labelled as "US-centric" by the poster. In-fact it's European as mentioned above. As well, it goes a bit further than this post with additional suggestions which I would be keen on e.g. Moving PO Box to drop-down selection.

@skjnldsv
Copy link
Member

skjnldsv commented Jan 11, 2019

From @olantrust

There are several issues caused by the current address layout:

Currently

  1. It is US-centric and doesn't reflect the many varied address layouts globally, making it hard for most of the world to use.
  2. The Post Office Box section is almost redundant in most of the world, and takes up unnecessary space.

Solution
A simple and graceful but powerful improvement would make the app look and work better for users around the globe: To relieve problematic issues with users having to distort address layouts, and postal printing, etc... dependant upon their country:

  1. Have a back-end of address layouts stored in the code, per country (Universal Postal Union has this listed, we're happy to do the work to put them in a file and upload).
  2. Provide an Option to set which address layout to use by default for each Administrator/User.
  3. If User changes the 'Country' field in a contact's address, change the address layout for that address to the appropriate style for that country.
  4. Remove Post Office Box from the standard layouts.
    When adding address, allow the user to choose from 'Home', 'Work', 'Other', and 'POBox' in case they need to use that format of address.

@stephengraf
Copy link

Could the locale field from the user settings be used to trigger the correct layout? Canada and the USA have the same format and I think most of Europe has a common format. Just a handful of layouts might be required, with a default.

@skjnldsv
Copy link
Member

Could the locale field from the user settings be used to trigger the correct layout

We do that for other stuff on contacts, so yes, it definitely could.
But the locale settings in nextcloud does not include data for address layout :)

@skjnldsv
Copy link
Member

We could use a library, I found two:

  1. https://github.com/arcreative/node-address-format
  2. https://github.com/Shopify/quilt

The first one is completely dead.
I'll see what we can do with the latest.

@skjnldsv skjnldsv added enhancement New feature or request 0. to triage Pending approval or rejection. This issue is pending approval. and removed discussion Being discussed labels Jan 21, 2019
@skjnldsv skjnldsv added 1. to develop Accepted and waiting to be taken care of and removed 0. to triage Pending approval or rejection. This issue is pending approval. labels Aug 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Accepted and waiting to be taken care of enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants