Files
notifications-admin/app/templates/main_nav.html
Chris Hill-Scott 43a922638b Merge email, text message + letter templates pages
Right now we have separate pages for email and text message templates.
In the future we will also have a separate page for letter templates.

This commit changes Notify to only have one page for all templates.

What is the problem?
---

The left-hand navigation is getting quite crowded, at 8 items for a
service that can send letters. Research suggests that the number of
objects an average human can hold in working memory is 7 ± 2 [1]. So
we’re at the limit of how many items the navigation should have.

In the future we will need to search/sort/filter templates by attributes
other than type, for example:
- show me the ‘confirmation’ templates
- show me the most recently used templates
- show me all templates containing the placeholder `((ref_no))`

These are hypothetical for now, but these needs (or others) may become
real in the future. At this point pre-filtering the list of templates
by type would restrict what searches a user could do. So by making this
change now we’re in a better position to iterate the design in the
future.

What’s the change?
---

This commit replaces the ‘Email templates’, ‘Text message templates’ and
‘Letter templates’ pages with one page called ‘Templates’.

This new templates page shows all the templates for the service, sorted
by most recently created first (as before).

To add a new template there is a new page with a form asking you what
kind of template you want to create. This is necessary because in the
past we knew what kind of template you wanted to create based on the
kind you were looking at.

What’s the impact of this change on new users?
---

This change alters the onboarding process slightly. We still want to
take people through the empty templates page from the call-to-action on
the dashboard because it helps them understand that to send a message
using Notify you need a template. But because we don’t have separate
pages for emails/text messages we will have to send users through the
extra step of choosing what kind of template to create. This is a bit
clunkier on first use but:

- it still gets the point across
- it takes them through the actual flow they will be using to create new
  templates in the future (ie they’re learning how to use Notify, not
  just being taken through a special onboarding route)

I’m not too worried about this change in terms of the experience for new
users. Furthermore, by making it now we get to validate whether it’s
causing any problems in the lab research booked for next week.

What’s the impact of this change on current services?
---

Looking at the top 15 services by number of templates[2], most are using
either text messages or emails. So this change would not have a
significant impact on these services because the page will not get any
longer. In other words we wouldn’t be making it worse for them.

Those services who do use both are not using as many templates. The
worst-case scenario is SSCS, who have 16 templates, evenly split between
email and text messages. So they would go from having 8 templates per
page to 16, which is still less than half the number that HMPO or
Digital Marketplace are managing.

References
---

1. https://en.wikipedia.org/wiki/The_Magical_Number_Seven,_Plus_or_Minus_Two

2. Template usage by service

Service name                           | Template count | Template types
---------------------------------------|----------------|---------------
Her Majesty's Passport Office          |             40 | sms
Digital Marketplace                    |             40 | email
GovWifi-Staging                        |             19 | sms
GovWifi                                |             18 | sms
Digital Apprenticeship Service         |             16 | email
SSCS                                   |             16 | both
Crown Commercial Service MI Collection |             15 | email
Help with Prison Visits                |             12 | both
Digital Future                         |             12 | email
Export Licensing Service               |             11 | email
Civil Money Claims                     |              9 | both
DVLA Drivers Medical Service           |              9 | sms
GOV.UK Notify                          |              8 | both
Manage your benefit overpayments       |              8 | both
Tax Renewals                           |              8 | both
2017-03-01 15:17:06 +00:00

63 lines
2.6 KiB
HTML

{% from "components/banner.html" import banner_wrapper %}
{% if help %}
{% call banner_wrapper(type='tour') %}
<p class="heading-medium">Try sending yourself this example</p>
<div class="grid-row bottom-gutter {% if help != '1' %}greyed-out-step{% endif %}">
<div class="column-one-sixth">
<p class="heading-large" style="float: left;">1.</p>
</div>
<div class="column-five-sixths">
<p>
Every message is sent from a template
</p>
</div>
</div>
<div class="grid-row bottom-gutter {% if help != '2' %}greyed-out-step{% endif %}">
<div class="column-one-sixth">
<p class="heading-large">2.</p>
</div>
<div class="column-five-sixths">
<p>
The template pulls in the data you provide
</p>
</div>
</div>
<div class="grid-row bottom-gutter {% if help != '3' %}greyed-out-step{% endif %}">
<div class="column-one-sixth">
<p class="heading-large">3.</p>
</div>
<div class="column-five-sixths">
<p>
Notify delivers the message
</p>
{% if help == '3' %}
<a href='{{ url_for(".go_to_dashboard_after_tour", service_id=current_service.id, example_template_id=template.id) }}'>
Now go to your dashboard
</a>
{% endif %}
</div>
</div>
{% endcall %}
{% else %}
<nav class="navigation">
<ul>
<li><a href="{{ url_for('.service_dashboard', service_id=current_service.id) }}">Dashboard</a></li>
{% if current_user.has_permissions(['view_activity', 'manage_templates', 'manage_api_keys'], admin_override=True, any_=True) %}
<li><a href="{{ url_for('.choose_template', service_id=current_service.id) }}">Templates</a></li>
{% endif %}
{% if current_user.has_permissions(['manage_users', 'manage_settings'], admin_override=True) %}
<li><a href="{{ url_for('.manage_users', service_id=current_service.id) }}">Team members</a></li>
<li><a href="{{ url_for('.usage', service_id=current_service.id) }}">Usage</a></li>
<li><a href="{{ url_for('.service_settings', service_id=current_service.id) }}">Settings</a></li>
{% elif current_user.has_permissions(['view_activity']) %}
<li><a href="{{ url_for('.manage_users', service_id=current_service.id) }}">Team members</a></li>
{% endif %}
{% if current_user.has_permissions(['manage_api_keys'], admin_override=True) %}
<li><a href="{{ url_for('.api_integration', service_id=current_service.id) }}">API integration</a></li>
{% endif %}
</ul>
</nav>
{% endif %}