Commit Graph

7170 Commits

Author SHA1 Message Date
Chris Hill-Scott
5a52eafb84 Fix ‘Back’ link from first step of fix one off
If you skip past the templates page (because you don’t have the edit
permission) but then click back you end up in a loop which redirects you
to the page you’re already on.

This commit makes sure that you’re sent back a step further, so you
don’t get stuck in that loop.
2018-08-10 09:16:18 +01:00
Chris Hill-Scott
fdf3670661 Remove basic view setting and preview 2018-08-09 17:51:34 +01:00
Chris Hill-Scott
5b616d55db Merge pull request #2207 from alphagov/5th-permission
Make sending messages quicker for everyone without it being a separate view
2018-08-09 16:06:12 +01:00
Leo Hemsted
f279bbbd33 bump utils to fix slow notification rendering 2018-08-09 14:07:06 +01:00
Chris Hill-Scott
61507fda8f Make the permission labels shorter
They were feeling a bit heavy on the _Team members_ page. We can remove
some words without losing any meaning.
2018-08-09 13:49:06 +01:00
Chris Hill-Scott
347912876c Relabel existing permissions
Since we have added a new, 5th permission the existing permissions
should be relabelled so that the five make sense as a coherent set.

We especially want to make sure that:
- the labels work against the checkboxes and against the tick/crosses on
  the manage users page (a long time ago this page was layed out
  differently so didn’t have space for full labels)
- there is no confusion between usage and reports

This commit also:
- re-adds a line about what all users can see (‘sent messages’) but
  continues to omit the additional bullet points about templates and
  team members (because we think this is clear enough from reading the
  permissions)
- refactors the `Form` subclass so that the content and order of the
  permissions only have to be defined once
- brings back the ‘permissions’ legend on the `fieldset`
2018-08-09 13:49:06 +01:00
Chris Hill-Scott
5108187cab Show letters in basic view
We were taking letters away from basic view because there’s no one-off
sending of letters.

But now that basic view isn’t an opt-in thing but something we’re
rolling out to all users who only have the ‘send’ permission it feels
like too drastic a change to remove letters.
2018-08-09 13:49:06 +01:00
Chris Hill-Scott
3e14e5e52b Don’t skip template page for letters
It’s too jarring to go straight from the list of templates to the upload
addresses page. So while we don’t have sending a one-off letter as a
thing, let’s keep the template page.
2018-08-09 13:49:06 +01:00
Chris Hill-Scott
dda93e64de Don’t show ‘use my …’ link to send-only users
Since they’re not going to be testing the content of the messages this
isn’t feature that they need.
2018-08-09 13:49:06 +01:00
Chris Hill-Scott
646ba6e8c3 Add a ‘See dashboard’ permission
Our research and prototyping around ‘basic view’ found that:
- a lot of users who send messages rarely or never look at the dashboard
  (yet it’s the first page they see when they sign in)
- team managers like the idea of taking away things that users don’t
  need in order to make the interface simpler

We’ve disentangled the simpler way of sending messages from being part
of ‘basic view’. This means we can give managers the option of taking
away the dashboard as an independent choice, not something that’s
wrapped up in a separate ‘view’.

I think that this checkbox is a more straightforward proposition than
‘basic view’ ever was (despite all the work we did to explain it and
develop the nested checkbox pattern). In research users would often
explain the feature back to us as being about hiding the dashboard – we
should try to make Notify operate in terms of concepts that come
naturally to people wherever possible.
2018-08-09 13:49:06 +01:00
Chris Hill-Scott
55d051d95a Sort services alphabetically when copying template
If you have a lot of services it’s hard to find the one you’re looking
for if the sort order is a mixture of `created_by` and which ones belong
to an organisation.

Since the templates within the services are sorted alphabetically it
makes sense to also sort the services alphabetically.
2018-08-09 13:33:08 +01:00
Chris Hill-Scott
d2fc613270 Put counts back on notifications page
We think there is some need for users who don’t need to see the
dashboard to quickly find out which messages have failed.

So this commit brings back the status filters for all users (previously
those with ‘basic view’ wouldn’t have had them).

This makes it less of a drastic change when the `view_activity`
permission is removed from a user.
2018-08-09 11:56:16 +01:00
Chris Hill-Scott
bbdbe61cad Let users with empty permissions see certain pages
We’re going to make it possible for some users to be members of a
service, but not have any permissions (not even `view_activity`).

There are some pages that these users should still be able to see
These are the pages that a user with ‘basic view’ would have been able
to see, excluding those that let them send messages.
2018-08-09 11:56:15 +01:00
Chris Hill-Scott
e34ca2a8ee Make it clear which template you’re sending
The one downside of skipping the template page is that you no longer
get such strong confirmation that you’ve picked the correct template.
You still see the preview of the template, but it’s further down the
page, and the name of the template has disappeared.

This commit adds the name of the template to the page title, to:
- have some continuity from the previous page
- make it easier to double-check you’ve chosen the correct template
2018-08-09 11:56:15 +01:00
Chris Hill-Scott
147ea75177 Skip template page for users who only send
If you only send messages then there’s no longer much point in the
template page. It now, for you, only has one action – ‘Send’.

This commit changes the journey for these users so they go straight from
clicking the name of the template to the page where you enter the phone
number or email address.

This is better because it reduces the number of steps a user has to
click through to send a message.

This journey is what we were previously calling ‘basic view’. But this
changes makes it automatically available to anyone who would benefit
from it. It removes the complexity of:
- having to opt in to basic view at a service level
- having to choose on a per-user basis who has basic view
- understanding the nuance between basic view and only choosing the
  ‘Send messages’ permission

Users who will still see the template page are:
- those who can edit templates – they need the ‘edit’ link
- users with the manage API keys permission – they need a place to get
  the template ID
2018-08-09 11:56:15 +01:00
Chris Hill-Scott
8c92d0a3c2 Remove other references to ‘upload recipients’
For consistency.
2018-08-09 11:56:14 +01:00
Chris Hill-Scott
3b5bd0bd9a Centre text in pill navigation
Now the text is smaller (fewer words) it looks a bit wrong bunched up
on the left. the only other page this affects is ‘API integration’.
2018-08-09 11:56:14 +01:00
Chris Hill-Scott
bcf538fa10 Remove separation between upload and send
Now that you can access upload from within the send one off message
flow, it doesn’t need its own linkbutton on the template page.
2018-08-09 11:56:14 +01:00
Chris Hill-Scott
3bd62c2aef Offer link to upload
‘Upload recipients’ and ‘Send to one recipient’ have always been
slightly clunky phrases.

Now that basic view jumps straight into the ‘Send to one recipient’
flow there’s no way for users to get to the ‘Upload recipients’ flow.

By adding a link to it from the ‘Send to one recipient’ flow it’s
possible for users of basic view to access it.

But we don’t want to introduce too much inconsistency between basic view
and admin view because users will be migrating from one to another. They
might also be talking to their manager, who wouldn’t be able to tell
them where to click if they were looking at two completely different
interfaces.

This also means that we can keep the left-hand navigation in basic view
nice and simple with the two options (‘Templates’ and ‘Sent messages’),
rather than trying to introduce something like ‘Send one message’ and
‘Send lots of messages’ later on.
2018-08-09 11:56:13 +01:00
Chris Hill-Scott
2dde1ad36f Merge pull request #2193 from alphagov/pyup-update-notifications-python-client-4.10.0-to-5.0.0
Update notifications-python-client to 5.0.0
2018-08-09 09:38:22 +01:00
Chris Hill-Scott
b9b0d0870b Merge pull request #2210 from alphagov/revert-track-basic-view
Revert "Track event when someone previews basic view"
2018-08-09 09:37:54 +01:00
Chris Hill-Scott
015d656d34 Merge pull request #2208 from alphagov/label-message-type-search
Label the search box dependent on message type
2018-08-09 09:37:01 +01:00
Chris Hill-Scott
4256c56b7a Merge pull request #2202 from alphagov/hide-branding-request-api-permission
Hide email branding change link if the user doesn’t have the manage service permission
2018-08-09 09:36:54 +01:00
Tom Byers
75d04a38db Merge pull request #2211 from alphagov/pin-govuk-elements-sass
Pin patch version of govuk-elements-sass
2018-08-08 16:44:30 +01:00
Tom Byers
f69bf3357b Merge pull request #2213 from alphagov/fix-test-breaking-on-url-format
Change test on URL to use urllib methods
2018-08-08 16:39:55 +01:00
Tom Byers
dcc0eb1e52 Change test on URL to use urllib methods
Checking the raw string was breaking the test
sometimes due to it expecting the query parameters
to be in a different order.
2018-08-08 16:24:52 +01:00
Tom Byers
155f6b9626 Merge pull request #2209 from alphagov/add-email-branding-preview
Preview the email branding before setting it
2018-08-08 15:25:25 +01:00
Chris Hill-Scott
214bfa9873 Label the search box dependent on message type
It doesn’t make sense to say ‘Search by email address or phone number’
when you’re only looking at emails.
2018-08-08 14:58:58 +01:00
Chris Hill-Scott
bb4c77fd59 Merge pull request #2212 from alphagov/domains-update
Added a few contract / MOU to the signed list
2018-08-08 14:49:53 +01:00
Tom Byers
d931966e5a Add CSS for email preview iframe 2018-08-08 14:23:38 +01:00
Pete Herlihy
f9cacf606c Added a few contract / MOU to the signed list 2018-08-08 12:30:07 +01:00
Katie Smith
fb95e08f97 Pin patch version of govuk-elements-sass
Version 3.1.3 changed heading classes to display block - https://github.com/alphagov/govuk_elements/pull/552
This is a breaking change for us since we are using the heading classes
to make font bold - 3.1.3 adds line breaks in places where we don't want
them and causes some functional tests to fail.

Since we will be replacing govuk-elements with the new design system,
this commit pins the version of govuk-elements instead of updating all
the code to work with the lastest version.
2018-08-08 11:21:39 +01:00
Tom Byers
e7ead052ce Add tests for /_email page 2018-08-08 11:21:30 +01:00
Chris Hill-Scott
7b1d4136bf Revert "Track event when someone previews basic view"
This reverts commit 77d96032bf.
2018-08-08 08:55:06 +01:00
Tom Byers
d8d48ea801 Add tests for preview step
Includes moving code that tests an API call to
update the service with the new branding to the
preview step submission.

Also includes a change to the HTTP params sent by
the set-email-branding step. Think it was missed
out of this PR:

https://github.com/alphagov/notifications-admin/pull/1843

...so was never changed to 'branding_style'.
2018-08-07 17:05:30 +01:00
Tom Byers
eb72f43b3f Fixes for tests broken by changes
- corrects target page for set_email_branding to
  new preview step instead of itself
- removed check for helper method being called in
  email page test
- updates expected result for test of global
  headers to include changes to `frame-src`
- updates navigation config with brand preview page
2018-08-07 16:56:37 +01:00
Tom Byers
386105954e Add JS to embed email preview into page 2018-08-07 16:56:37 +01:00
Tom Byers
c7610f359a improve range of params email page can take
Can now deal with no query params and has a
default format of the GOV.UK branding.
2018-08-07 16:56:37 +01:00
Tom Byers
a2a02a5185 Add preview step to branding selection flow
Gives platform admins a chance to preview the
combination of brand type and custom brand
(coloured banner and logo) set for service before
saving.
2018-08-07 16:56:37 +01:00
Tom Byers
7b955ffad2 Add 'self' to 'frame-src' header
Allows iframes to contain pages from the same
domain as the parent page.
2018-08-07 16:56:36 +01:00
Rebecca Law
6a06d4d714 Merge pull request #2171 from alphagov/flexible-data-retention
Flexible data retention
2018-08-07 14:27:31 +01:00
Chris Hill-Scott
c07a36b283 Merge pull request #2206 from alphagov/insolvency.gov.uk
Mark agreement signed by The Insolvency Service
2018-08-07 09:49:53 +01:00
Chris Hill-Scott
367dc05952 Mark agreement signed by The Insolvency Service
Crown according to: http://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/uk-government-licensing-framework/crown-copyright/uk-crown-bodies/#azi

Signed agreement: https://drive.google.com/open?id=0ByP6zL-gKn64NEpHWEdxWnYySnJVZnkyd2RDMDByaEkwT1Nj
2018-08-07 09:27:05 +01:00
Rebecca Law
18750585c4 Reduced the size of the pull request by only dealing with adding the data retention form. 2018-08-06 16:04:31 +01:00
Rebecca Law
ae1f1c95d6 Merge branch 'master' into flexible-data-retention 2018-08-06 15:37:11 +01:00
Rebecca Law
b0da7887a8 Merge branch 'master' of github.com:alphagov/notifications-admin 2018-08-06 15:32:14 +01:00
Chris Hill-Scott
4f7388f9b6 Merge pull request #2203 from alphagov/corby.gov.uk
Mark agreement signed by Corby borough council
2018-08-06 12:06:18 +01:00
Chris Hill-Scott
f4c96d5d54 Mark agreement signed by Corby borough council 2018-08-06 11:42:47 +01:00
Chris Hill-Scott
cecfe86e73 Hide email branding change if not manage service
If you have the API keys permission you can see the settings page. But you 
can’t change or request stuff, like email branding. So we shouldn’t show the 
link that suggests you can.
2018-08-06 11:25:19 +01:00
Chris Hill-Scott
84b05ab29c make freeze-requirements 2018-08-03 16:13:41 +01:00