-
Notifications
You must be signed in to change notification settings - Fork 74
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
Location details page is not displaying certain phone number attributes #415
Comments
Extension has been added, but not vanity_number. Here is a location that should have its vanity number displayed: http://ohana-web-search-demo.herokuapp.com/locations/admin-test-org/admin-test-location |
What's up with the languages spoken value on http://ohana-web-search-demo.herokuapp.com/locations/admin-test-org/admin-test-location? Is that an Ohana Web Search bug? |
Before this is implemented in the view |
(Referencing #172) |
Rails provides a number_to_phone formatter, so we don't have to write our own. It works best when the input only contains digits, so we can either ensure that format on the client side, or update the API app to either enforce that format, or have the API make the transformation. To achieve the format we have now, you would do something like this:
Vanity numbers cannot be handled because they are not formatted consistently. They usually contain words of varying length that are meant to be together. For example, you would not want to format So, as far as this issue is concerned, simply adding HTML to display the vanity number as it is returned by the API is what's needed. |
Are you saying this should be used in place of https://github.com/codeforamerica/ohana-web-search/blob/master/app/helpers/detail_format_helper.rb#L26 and that helper should be removed? (Perhaps in this PR.)
Ah yes, makes sense. Is there any consistency in the area code? That would always be digits, right? The example vanity number you referenced earlier looks like Right now the demo entry looks like:
Without the area code formatting its confusing to even tell that first number is a phone number because it's formatted to look like a serial number or something. |
Hm, I guess the area code wouldn't HAVE to be digits. But I think this could still be formatted. For example given
|
Let's not overthink this. People should be free to format phone numbers however they want, so yes, we should replace our current helper with the one Rails provides. That way, if one instance wants to format the phones like
|
Fixes #415 - adds vanity number to phone partial and test spec.
Fixes #415 - adds vanity number to phone partial and test spec.
There are a few phone attributes that are not being displayed on the details page.
The text was updated successfully, but these errors were encountered: