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

Fix contact blocks in uk-benefits-abroad #1738

Merged
merged 2 commits into from Jun 24, 2015

Conversation

floehopper
Copy link
Contributor

This PR address problems with the contact blocks in the
uk-benefits-abroad flow:

  • Fix formatting of contacts. They've been missing HTML line-breaks since a change that was accidentally made about a month ago.
  • Make contact blocks consistent as per an email conversation with @lutgendorff.

See individual commit notes for further details.

Although the Govspeak docs [1] suggest that a contact block with generate HTML
line-break elements between each line, this doesn't appear to be the case (I
have raised a GitHub issue [2] asking about this).

It appears as if historically we've been working around this issue by adding
two trailing spaces to the lines within the contact blocks. This relies on a
feature of Kramdown which converts the two trailing spaces into HTML line break
elements [3].

Unfortunately the trailing spaces for the contact blocks in uk-benefits-abroad
were, almost certainly accidentally, lost in this commit [4].

Many developers have their editors set to automatically remove trailing
whitespace to make git history as clear as possible. I think this is generally
a good thing, but I suspect it may have been what led to these significant
trailing spaces being lost.

As a temporary solution, I've added two trailing backslashes to the relevant
lines. This is a Kramdown alternative to the two trailing spaces with the
advantage that hopefully they shouldn't get removed so easily by accident.

I think the correct longer-term solution is probably to fix Govspeak so that
it's behaviour matches the documentation, but since many projects use Govspeak,
it may take a while to get the change accepted.

[1]: https://github.com/alphagov/govspeak#contact
[2]: alphagov/govspeak#55
[3]: http://kramdown.gettalong.org/syntax.html#paragraphs
[4]: 1a96852
Based on an email from @lutgendorff, these two contact blocks should be the same:

* Both should say "Outside the UK:" instead of "Outside the UK call"
* Both should include the link to call-charges

In the longer term it would be good to DRY up the two contact blocks, but since
I'm about to convert the outcomes in this flow to use ERB templates, I'm going
to hold off on that for now.
@tadast
Copy link
Contributor

tadast commented Jun 24, 2015

Looks good. :shipit:

@floehopper floehopper merged commit 56a9358 into master Jun 24, 2015
@floehopper floehopper deleted the fix-contact-blocks-in-uk-benefits-abroad branch June 24, 2015 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants