Skip to main content

Week 117: Phoning it in

As I’ve alluded to in previous weeknotes, my team has had a frustrating few weeks where progress has been slow. Steve has summarised it well, so I won’t go over the same ground. For me, it’s meant that side-of-desk projects have taken up most of the desk, along with technical chores and helping other folk where I can. But we’ve identified a new parallel quest to explore a largely ignored area of the app and slay a few dragons. Should be fun.

Telephone numbers

My rabbit-hole of the week was looking at how telephone numbers are formatted. Both the NHS style guide and the GOV.UK style guide say to split up the number into groups using spaces. This is good, it makes numbers easier to remember, copy down or dial - especially for those with dyscalculia.

However, UK phone numbers are not consistent. They’re nearly always 11 digits (except when they’re not), but the area code can be 3, 4 or 5 digits long. This means that to automatically format a number into groups where the area code is the first group, you need a list of all the area codes in use. Luckily there are well-maintained libraries like Google’s libphonenumber which have this. But that library doesn’t split the second part into 2 groups like our style guide, so that bit needs custom code. There are also the special cases of memorable phone numbers like 116 123 (Samaritans) which aren’t supported by default either.

The deepest bit of the rabbit-hole was trying to understand the conventions of phone numbers in other countries. France seems to consistently display them in groups of 2, but some other countries don’t have strong conventions at all. (At this point I backed out and just accepted whatever format Google’s library picks for each country.)

This apparently simple task kept me up until midnight, at which point I had a formatPhoneNumber filter ready to add to the next release of the prototype kit, so that other designers don’t have to think about this quite so much.

Design history posts this week:

And some news articles about the NHS that caught my eye:


Went to see My Neighbour Totoro in the West End with my daughter this weekend. So good! Catch it before it closes in early Jan!