Commit Graph

1952 Commits

Author SHA1 Message Date
Chris Hill-Scott
2ddf3d5cfe Link to notification from API integration
It’s useful to be able to see what the email or text message looks like,
especially if you’ve sent it with a test API key (so it isn’t in your
inbox or on your phone). We already have the page for this, so we just
need to link to it.
2018-09-06 10:50:18 +01:00
Chris Hill-Scott
01fdcb8998 Use NHS.UK branding is for all NHS services
Anyone choosing ‘NHS’ for their organisation type gets should get the
NHS branding. We don’t want to hard-code an ID for NHS branding anywhere
because it won’t be consistent between environments.

So instead we can say that anyone who chooses ‘NHS’ as their
organisation type should get whatever branding has `nhs.uk` as its
domain.

This allows us to easily manage the branding the same way we do other
brands, but gives us the efficiency of having it auto applied.
2018-09-05 10:32:44 +01:00
Chris Hill-Scott
243fdb0260 Assign email branding based on user’s email domain
When a user creates a service we can take a pretty good guess at what
organisation they’re from.

For many organisations, especially local councils, GOV.UK branding is
not appropriate for their service. But right now every service:
- gets created with GOV.UK branding
- has to ask us to change it, even if they’ve already done so for other
  services they run

This commit starts using the `domain` field on the email branding table
to lookup what email branding to assign to a service automatically,
where we’re sure there’s a sensible default.
2018-09-05 10:32:44 +01:00
Chris Hill-Scott
2e7ae91029 Persist canonical domain in email branding
When saving an email branding it’s possible we might not enter the
canonical domain for an organisation into the domain field. Because
we’re going to use the canonical domain to look up the brandings this
will cause a mismatch.

Rather than validate this and show an error, let’s just save the correct
thing instead. From the user’s perspective this means everything will
just work (ie a user with a given email address will automatically get
the right branding for their organisation).
2018-09-05 10:32:44 +01:00
Chris Hill-Scott
80423dfb3f Don’t allow adding unknown domains to branding lookup
We should make sure we’re not putting typos in the branding list. We can
validate what gets entered here against our known list of public-sector
domains.
2018-09-05 10:32:43 +01:00
Chris Hill-Scott
47c9b71fa8 Add canonical domain info to agreement class
Because we alias domains (eg `foo.gsi.gov.uk` to `foo.gov.uk`, or where
a local council has multiple domains) it could be hard to look up a
brand (which has one domain field).

Therefore we need a way of getting the canonical domain from a user’s
email address, which we can later use to look up their branding.
2018-09-05 10:32:43 +01:00
Chris Hill-Scott
d80b735b2b Refactor some of the logic into form
It’s messy having a lot of logic in the view methods. Handling the form
stuff can be better encapsulated inside the `Form` subclass itself.
2018-09-05 10:25:39 +01:00
Chris Hill-Scott
f387f1e6ba Merge pull request #2268 from alphagov/request-to-go-live-better-data
Make the data we get from the go live requests more useful
2018-09-04 16:25:59 +01:00
Chris Hill-Scott
28b80856df Cache email branding in Redis
If we’re going to be referring to email branding as part of the service
creation journey then we should make sure it doesn’t slow things down
too much by adding an extra API call. Caching things in Redis is a way
of avoiding unneeded API calls.
2018-09-03 14:46:48 +01:00
Tom Byers
3655e63d34 Merge pull request #2262 from alphagov/remove_branding_type_from_set_email_branding_page
Remove branding type from set email branding page
2018-08-31 13:56:44 +01:00
Chris Hill-Scott
7f458ad066 Explain text message sender
We sometimes have to do this over support tickets as part of the go-live
process; now we’re directing people to add a sender (as part of the task
list) we can explain what it is in context.
2018-08-31 10:50:59 +01:00
Tom Byers
d12fa00066 Update tests to allow new 'GOV.UK' label 2018-08-30 16:03:20 +01:00
Tom Byers
4f67502806 Add tests for changes to brand request page
Tests the new code that gets the brand type from
the email_branding model. Includes checks for a
service without the email_branding field set.

It also amends the test for a POST from that page,
removing mocking of the email_branding client.
This test runs against the default service which
has its email_branding field set to None so no
call is made to the client. It's testing the
brand_type values selected so doesn't need the
service to have an email_branding already set.
2018-08-30 15:54:28 +01:00
Chris Hill-Scott
3c563ddca6 Use commas not tabs to delimit service info
Zendesk strips out the tabs. Commas are the next best thing because
Excel will automatically use them if you select ‘Split text into
columns’.
2018-08-30 15:31:46 +01:00
Chris Hill-Scott
86ad77e545 Add question about research consent
Since GDPR came into effect it’s less clear about whether we can
contact teams for user research purposes.

If we make people opt-in (or not) we know we’re safe to contact them (or
not).

Since we mostly care about how services are using Notify for real (ie
live services) or services that are considering adopting it (ie those
who have contacted us with a question) it feels like the go-live process
is the most appropriate place to collect this consent.
2018-08-30 15:31:46 +01:00
Chris Hill-Scott
12e0e12ced Replace channels and volumes with volumes/channel
Now that we’re a more mature platform we don’t care so much about the
load that one service might put on our platform.

We do care about intended volumes for two reasons:
- modelling the benefits that services get from using Notify
- managing stocks of envelopes (while our letter volumes are small
  enough that they could be skewed by one new service)

Changing to the ‘how many per year’ question also has the benefit of
mapping directly to the data we store in the ‘beta partners’
spreadsheet.
2018-08-30 15:31:46 +01:00
Chris Hill-Scott
80339046df Remove question about which features people use
This is an optional question. We don’t really use the answer to it now
that we have some adoption of all these features.
2018-08-30 15:31:45 +01:00
Chris Hill-Scott
9d720fd4bd Add data to copy into beta partners spreadsheet
Currently we keep track of live services in the ‘beta partners’
spreadsheet:
https://docs.google.com/spreadsheets/d/1JYhE5sJaOJUVMPPDenO2eKqElC75Rygxb1_2mpRKy98/edit#gid=503930061

Every time a service goes live we need to enter some data into the
spreadsheet about that service. Most of that data is copied from the
request to go live ticket.

This commit adds a line to the ticket with all the data needed by the
spreadsheet. It’s in the same order as in the spreadsheet, and it’s
tab-delimted so it should paste right on in there.
2018-08-30 15:31:45 +01:00
Chris Hill-Scott
2ff81ea59d Reword templates line on go live task list
This version might read a little clearer and look a little neater.
2018-08-30 14:36:40 +01:00
Tom Byers
1d3b5fda62 Update brand request tests 2018-08-29 16:16:21 +01:00
Tom Byers
55f5cc8e1e Update tests for changes
Removes any checks for branding_type from tests
for set_email_branding page.

Updates tests for email preview page (usually
iframed) so non-default brand_type is got from the
email_branding model instead of a GET param.
2018-08-29 16:16:21 +01:00
Chris Hill-Scott
5b5aada3b7 Merge pull request #2261 from alphagov/robots.txt
Serve robots.txt from the admin app
2018-08-29 16:04:26 +01:00
Chris Hill-Scott
09876532ae Serve robots.txt from the admin app
We’re getting rid of the PaaS proxy, which is where this file is
currently served from.

Values copied from 3632313fdf/ansible/roles/nginx/files/robots.txt
2018-08-29 15:54:17 +01:00
Chris Hill-Scott
fab754a535 Merge pull request #2260 from alphagov/remove-govuk-from-brand-type
Remove GOV.UK as option when creating a branding
2018-08-29 15:53:19 +01:00
Chris Hill-Scott
87040c153c Merge pull request #2250 from alphagov/task-list-go-live
Try to get more users to do the things we require before going live
2018-08-29 15:53:10 +01:00
Chris Hill-Scott
d7f42a868c Merge pull request #2244 from alphagov/request-letter-branding
Tell people they can have their logo on letters
2018-08-29 15:52:58 +01:00
Chris Hill-Scott
278f7e534c Remove GOV.UK as option when creating a branding
It doesn’t make sense to create a brand which doesn’t get shown.

This will make it safe to remove this option from the database.
2018-08-29 12:42:42 +01:00
Chris Hill-Scott
7c6627254b Update content to work in task list pattern
We probably don't need to use a lead-in for a task list / table.

Also moves the line about making the service live within one day to the
next screen.
2018-08-29 11:29:44 +01:00
Chris Hill-Scott
45eb16b4db Check text message sender before going live
We often check that a service has an appropriate text message sender as
a condition of them going live. We don’t mention this anywhere.

The services for whom GOVUK is definitely not an appropriate sender are
those in local government. As we have more of these teams starting to
use Notify, we should streamline the process by making this check
automated.

This commit adds that check, for teams who:
- have text message templates
- have self-declared as NHS or local government
2018-08-29 11:29:44 +01:00
Chris Hill-Scott
fbd2102832 Use task list pattern for request to go live
We’ve found a significant property of users (about 25%) who request to
go live aren’t completing all the items on the checklist.

In 1 of 6 (17%) of the usability testing sessions we did on this process
we saw someone skip straight past the checklist page because of big
green button syndrome. While 1 in 6 people would normally be a small
number[1] in the context of a usability testing session, it’s enough to
cause a big workload for our team (assuming it is the sole cause of
people not completing the items on the checklist).

The initial reason for using the tick cross pattern for the checklist
was:
- it was coherent with the rest of Notify
- the task list pattern didn’t have a way of showing that something
  still needed doing – it put more visual emphasis on the things
  the user had already done

There’s been some interesting discussion on the GOV.UK Design System
backlog about users failing to complete items in the task list. A few
people have tried different patterns for communicating that items in the
task list still need ‘completing’.

So this commit:
- adds a task list pattern
- uses the task list pattern for the request to go live checklist

The task list is adapted from the one in the design system in that:
- the ‘completed’ label has a black, not blue background (because Notify
  often uses blocks of blue to indicate something that’s clickable)
- it adds an explicit ‘not complete’ label which is visually not
  filled in (sort of how ticked/unticket radio buttons work)

1. With the caveat that looking only at task completion, or quantifying
   qualitative not good practices and the intention here is to show that
   the numbers are close enough to say that they could be symptomatic of
   the same problem. Leisa Reichelt’s Mind the Product talk is good on
   this https://vimeo.com/284015765
2018-08-29 11:29:43 +01:00
Rebecca Law
be050657f6 Default the brand_type for new email brands 2018-08-24 13:11:40 +01:00
Rebecca Law
2b08b84c9e Merge branch 'master' into add-brand-type-to-email-branding 2018-08-24 11:09:31 +01:00
Rebecca Law
f7f202b670 Fix the EmailBranding 2018-08-23 17:44:34 +01:00
Chris Hill-Scott
9b9acfa291 Select a branding with a link, not form
Selecting a branding just takes you to a new page, it doesn’t change
any state.

Links are generally the way you go from one page to another on the web.
2018-08-23 09:52:50 +01:00
Chris Hill-Scott
0e7ed2b0cf Put ‘add new’ button at top of page
One of the most frequent tasks done on this page is adding a new
branding.

Current to do this you have to:
- scroll to the bottom
- scan for the ‘Create a new email branding’ option that visually looks
  just like all the other brandings
- submit a form

This commit makes change it to one clearly differentiated button at the
top of the page. This is consistent for how we let users add templates
and team members.
2018-08-23 09:49:23 +01:00
Tom Byers
7d6714ed68 Add live-search visibility test for conversations
It is only shown if the number of messages don't
fit onto the screen.
2018-08-22 19:03:52 +01:00
Tom Byers
3bc7c1c224 Add test for live-search on templates page
Includes addition of a mock for a list of
templates long enough to need a live-search.
2018-08-22 19:03:52 +01:00
Tom Byers
3b4c49a2c3 Add test helper to generate service templates 2018-08-22 19:03:52 +01:00
Tom Byers
3ea94128c6 Add live-search to set-email-branding page 2018-08-22 19:03:38 +01:00
Tom Byers
0015f086ea Add test helper to mock email brandings 2018-08-22 18:25:02 +01:00
Chris Hill-Scott
864e732c38 Merge pull request #2241 from alphagov/add-colours-and-domain-to-email-branding
New columns for email branding
2018-08-22 16:29:42 +01:00
Rebecca Law
473c8378fc Created a method to decide which colour to pass into the notifications-utils method to preview the template.
Removed the ServiceCreateEmailBranding form - it is identical to the other form.
2018-08-22 12:56:08 +01:00
Chris Hill-Scott
0b86a12fdd Tell people they can have their logo on letters
At the moment there’s nothing in Notify that says the logo on letter
templates can be changed from ‘HM Government’. While some people guess
that it’s possible, or are motivated enough to enquire, others might be
assuming that the branding can’t be changed (and thus deciding Notify
letters aren’t for them).

In the future we should make this process slicker (eg with a file
upload) but the easiest, quickest improvement to make for now is:
- let people know that the branding can be changed
- direct them to support if they do want to change it
2018-08-21 09:56:20 +01:00
Chris Hill-Scott
7530fbf731 Fix the tests and catch a few more examples 2018-08-20 18:05:46 +01:00
Rebecca Law
3fda171f80 New columns for email branding
Added banner_colour, single_id_colour and domain to email branding view. Now able to set the fields.

However, the new fields are not being used yet.
2018-08-20 13:27:17 +01:00
Katie Smith
1b6c357dea Use new value of SMS_CHAR_COUNT_LIMIT from utils
Admin, API and utils were all defining a value for SMS_CHAR_COUNT_LIMIT.
This value has been updated in notifications-utils to allow text
messages to be 4 fragments long and notifications-admin now gets the value of
SMS_CHAR_COUNT_LIMIT from notifications-utils instead of defining it in
config.
2018-08-16 16:56:32 +01:00
Tom Byers
6249f4826b Merge pull request #2235 from alphagov/sort-branding-radios-alphabetically
Sort branding radios alphabetically
2018-08-16 16:49:12 +01:00
Alexey Bezhan
3a00574034 Merge pull request #2224 from alphagov/notifications-page-data-retention-period
Notifications page data retention period
2018-08-16 13:55:55 +01:00
Tom Byers
f85a9306a6 Move brandings sort into email_branding_client 2018-08-16 13:40:24 +01:00
Tom Byers
bdde98e9ba Add tests for sort order of branding radios 2018-08-15 16:13:28 +01:00