Merge pull request #3119 from alphagov/retire-old-static-content

Retire old static content pages
This commit is contained in:
Chris Hill-Scott
2019-09-23 13:19:01 +01:00
committed by GitHub
5 changed files with 5 additions and 219 deletions
+2 -2
View File
@@ -96,7 +96,7 @@ def delivery_and_failure():
@main.route('/design-patterns-content-guidance') @main.route('/design-patterns-content-guidance')
def design_content(): def design_content():
return render_template('views/design-patterns-content-guidance.html') return redirect('https://www.gov.uk/service-manual/design/sending-emails-and-text-messages', 301)
@main.route('/_email') @main.route('/_email')
@@ -228,7 +228,7 @@ def integration_testing():
@main.route('/callbacks') @main.route('/callbacks')
def callbacks(): def callbacks():
return render_template('views/callbacks.html') return redirect(url_for('main.documentation'), 301)
# --- Features page set --- # # --- Features page set --- #
@@ -19,7 +19,7 @@
<p> <p>
When you send an email or text message, we can tell you if Notify was able to deliver it. When you send an email or text message, we can tell you if Notify was able to deliver it.
Check the <a href="{{ url_for('.callbacks') }}"> callback documentation </a> for more information. Read the Callbacks section of our <a href="{{ url_for('main.documentation') }}">API documentation</a> for more information.
</p> </p>
{% call form_wrapper() %} {% call form_wrapper() %}
-70
View File
@@ -1,70 +0,0 @@
{% from "components/table.html" import mapping_table, row, text_field, edit_field, field, row_heading with context %}
{% extends "withoutnav_template.html" %}
{% block per_page_title %}
Callback documentation
{% endblock %}
{% block maincolumn_content %}
<div class="grid-row">
<div class="column-two-thirds">
<h1 class="heading-large">Callback documentation</h1>
<p>A callback lets you receive messages from Notify to a URL you choose.</p>
<p>Youll need to provide a bearer token, for security. Well add this to the authorisation header of the callback request.</p>
<p>The callback message is in JSON.</p>
<h2 class="heading-medium">Email and text message delivery receipts</h2>
<p>When you send an email or text message through Notify, we can send a receipt to your callback URL to tell you if we were able to deliver it or not.</p>
<div class="bottom-gutter-3-2">
{% call mapping_table(
caption='Callback message format',
field_headings=['Key', 'Description', 'Format'],
field_headings_visible=True,
caption_visible=False
) %}
{% for key, description, format in [
('id', 'Notifys id for the status receipts', 'UUID'),
('reference', 'The reference sent by the service', '12345678'),
('to', 'The email address of the recipient', 'hello@gov.uk'),
('status', 'The status of the notification', 'delivered | permanent-failure | temporary-failure | technical-failure'),
('created_at', 'The time the service sent the request', '2017-05-14T12:15:30.000000Z'),
('completed_at', 'The last time the status was updated', '2017-05-14T12:15:30.000000Z'),
('sent_at', 'The time the notification was sent', '2017-05-14T12:15:30.000000Z or nil'),
('notification_type', 'The notification type', 'email | sms | letter')
] %}
{% call row() %}
{% call row_heading() %} {{ key }} {% endcall %}
{{ text_field(description) }}
{{ text_field(format) }}
{% endcall %}
{% endfor %}
{% endcall %}
</div>
<h2 class="heading-medium">Text messages you receive</h2>
<p>If your service receives text messages in Notify, we can forward them to your callback URL as soon as they arrive.</p>
<div class="bottom-gutter-3-2">
{% call mapping_table(
caption='Callback message format',
field_headings=['Key', 'Description', 'Format'],
field_headings_visible=True,
caption_visible=False
) %}
{% for key, description, format in [
('id', 'Notifys id for the received message', 'UUID'),
('source_number', 'The phone number the message was sent from', '447700912345'),
('destination_number', 'The number the message was sent to (your number)', '07700987654'),
('message', 'The received message', 'Hello Notify!'),
('date_received', 'The UTC datetime that the message was received by Notify', '2017-05-14T12:15:30.000000Z')
] %}
{% call row() %}
{% call row_heading() %} {{ key }} {% endcall %}
{{ text_field(description) }}
{{ text_field(format) }}
{% endcall %}
{% endfor %}
{% endcall %}
</div>
{% endblock %}
@@ -1,145 +0,0 @@
{% from "components/banner.html" import banner_wrapper %}
{% extends "withoutnav_template.html" %}
{% block per_page_title %}
Design patterns and content guidance
{% endblock %}
{% block maincolumn_content %}
<div class="grid-row">
<div class="column-two-thirds">
<h1 class="heading-large">
Design patterns and content guidance
</h1>
{% call banner_wrapper(type='warning') %}
<h2 class="heading-medium">This content is a work in progress</h2>
<p>It should not be relied upon</p>
{% endcall %}
<section id="contents">
<h2 class="heading-medium" id="contents">Contents</h2>
<ul class="list list-bullet">
<li><a href="#when-to-send-notifications">When to send notifications</a></li>
<li><a href="#design-patterns">Design patterns</a></li>
<li><a href="#content-guidance">Content guidance</a></li>
</ul>
</section>
<section id="contents">
<h2 class="heading-medium" id="when-to-send-notifications">When to send notifications</h2>
<h3 class="heading-small" id="send-notifications-to-reduce-anxiety">Send notifications to reduce anxiety</h3>
<p>Talk to your call centre staff to find out why people call this is probably why they are anxious. For example:</p>
<ul class="list list-bullet">
<li>I made a claim online did it go through?</li>
<li>I sent you an application did you receive it?</li>
<li>I sent you some supporting documents did you receive them?</li>
<li>Did you approve my application?</li>
<li>Have you sent my new passport yet?</li>
<li>Has my application got lost or stuck somewhere?</li>
</ul>
<h3 class="heading-small" id="tell-users-if-they-need-to-do-something">Tell users if they need to do something</h3>
<p>If someone needs to do something, tell them. For example:</p>
<p>Your MOT expires on 28 September get an MOT</p>
<p>The deadline for tax returns is 31 January complete your self assessment tax return</p>
<p>Your passport photo didn&#8217;t meet our standards take a new photo</p>
<h3 class="heading-small" id="security-checks">Security checks</h3>
<p>When someone does something important, send a security check to the people who might be affected. For example:</p>
<ul class="list list-bullet">
<li>We registered a Lasting Power of Attorney in your name</li>
<li>You no longer own the freehold for 1 Candle Street, Mile End, London</li>
<li>Sainsburys Ltd applied for planning permission for 3 Candle Street, Mile End, London</li>
</ul>
<h3 class="heading-small" id="2-factor-code">2-factor code</h3>
<p>When someone wants to sign in, send a 2-factor authentication code to the number you have on file. For example: Your GOV.UK verification code is 123 456</p>
</section>
<section id="design-patterns">
<h2 class="heading-medium">Design patterns</h2>
<h3 class="heading-small" id="collecting-contact-preferences">Collecting contact preferences</h3>
<p>Use radio buttons to ask the user how they&#8217;d like to be contacted:</p>
<ul class="list list-bullet">
<li>by post</li>
<li>be email</li>
<li>by text message</li>
<li>by phone call</li>
</ul>
<p>When the user selects a contact method, dynamically prompt them for contact details (if you don&#8217;t already have them)</p>
<p>Ask the user to pick <strong>one</strong> primary contact method. Users dont like duplicate notifications.</p>
<p>You can still contact them by other contact methods if appropriate.</p>
<p>Collect these using the patterns in the <a href="https://www.gov.uk/service-manual/user-centred-design/resources/patterns/index.html">Government Service Manual</a> and the <a href="https://designpatterns.hackpad.com">Hackpad</a>.</p>
<h3 class="heading-small" id="telltheusertheyregoingtoreceivenotifications">Tell the user they&#8217;re going to receive notifications</h3>
<p>Tell the user that you will send them notifications. For example: </p>
<blockquote>
<p>We will email you about this petition, and nothing else. You can unsubscribe at any time</p>
</blockquote>
</section>
<section id="content-guidance">
<h2 class="heading-medium">Content guidance</h2>
<h3 class="heading-small" id="include-one-important-message">Include one important message</h3>
<p>Don&#8217;t explain the whole process just tell the user what will happen next.</p>
<ul class="list list-bullet">
<li>If the user needs to do something, tell them what they have to do. Include a link if possible  see our <a href="">Information security guidelines</a></li>
<li>When will the next thing happen? If the next step is important, tell them when it will happen. For example, we&#8217;ll make a decision by 28th October.</li>
<li>How long until they are done? If the next step isn&#8217;t important, just tell them when they&#8217;ll be completely finished. For example, you&#8217;ll get your new passport by 2nd November.</li>
</ul>
<p>Dont send a message for steps that arent important to the user. For example, you dont need to tell the user about background checks unless they fail one of the checks.</p>
<h3 class="heading-small" id="writing-for-notifications">Writing for notifications</h3>
<ul class="list list-bullet">
<li><strong>Write tailored content. You&#8217;re writing to just one person so tell them exactly what they need to know</strong></li>
<li>Write as if youre speaking use personal language (you, we etc)</li>
<li>Tell the user when youll do something (by Tuesday, by 28th October) not how long youll take (within 3 working days, within 6 weeks)</li>
<li>Follow <a href="https://www.gov.uk/topic/government-digital-guidance/content-publishing">GOV.UK content guidance</a></li>
</ul>
<h3 class="heading-small" id="writing-for-sms">Writing for SMS</h3>
<ul class="list list-bullet">
<li>Get the most important message in the first sentence</li>
<li>Write one idea per sentence</li>
<li>Make it as short as possible but dont use jargon or acronyms without explanation</li>
<li>Don&#8217;t say Dear or Hi just launch straight in</li>
</ul>
<h3 class="heading-small" id="writing-for-emails-and-letters">Writing for emails and letters</h3>
<p>Say Dear, not Hi some people prefer Hi and some prefer Dear, but only the people who prefer Dear care enough to complain when we say Hi</p>
</div>
</div>
{% endblock %}
+2 -1
View File
@@ -72,7 +72,7 @@ def test_robots(client):
@pytest.mark.parametrize('view', [ @pytest.mark.parametrize('view', [
'cookies', 'privacy', 'pricing', 'terms', 'roadmap', 'cookies', 'privacy', 'pricing', 'terms', 'roadmap',
'features', 'callbacks', 'documentation', 'security', 'features', 'documentation', 'security',
'message_status', 'features_email', 'features_sms', 'message_status', 'features_email', 'features_sms',
'features_letters', 'how_to_pay', 'features_letters', 'how_to_pay',
]) ])
@@ -94,6 +94,7 @@ def test_static_pages(
('information_security', 'using_notify'), ('information_security', 'using_notify'),
('old_using_notify', 'using_notify'), ('old_using_notify', 'using_notify'),
('delivery_and_failure', 'message_status'), ('delivery_and_failure', 'message_status'),
('callbacks', 'documentation'),
]) ])
def test_old_static_pages_redirect( def test_old_static_pages_redirect(
client, client,