Commit Graph

3879 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
55054b81b5 Include test key data by default on platform admin
This is the existing behaviour. It’s broken by this issue in WTForms
2.2.1: https://github.com/wtforms/wtforms/issues/401

This commit hand-crafts the default value, because WTForms is ignoring
the `default` argument on the form object attribute.

Not really sure how this ever worked 🤔
2018-08-03 14:53:40 +01:00
Chris Hill-Scott
dd2364654a Merge pull request #2166 from alphagov/basic-view-description
Revise how we talk about what basic view is
2018-08-02 17:41:26 +01:00
Chris Hill-Scott
26823b6122 Fix straight apostrophe 2018-08-02 17:35:37 +01:00
karlchillmaid
8eaf7caa05 Updated hint text
Updated hint text
2018-08-02 17:31:16 +01:00
karlchillmaid
48ddce8410 Removed reference to 'their' sent messages
Removed reference to 'their' sent messages – because users will be able to see all sent messages
2018-08-02 17:09:20 +01:00
karlchillmaid
5c5fe54cb4 Updated content to include next steps
Updated content to explain what users need to do next.

Includes explicit instructions and a repetition of 'team members'.
2018-08-02 16:58:43 +01:00
Chris Hill-Scott
cabb0a74c1 Fix broken keys for basic view event tracking
Bad copy/paste…
2018-08-02 16:44:15 +01:00
Chris Hill-Scott
d92340b7cf Merge pull request #2197 from alphagov/track-basic-view
Track onboarding of basic view in Google Analytics
2018-08-02 16:17:14 +01:00
Chris Hill-Scott
c655826b17 Merge pull request #2195 from alphagov/geo.gov.uk
Add Government Equalities Office to domain list
2018-08-02 15:24:30 +01:00
Chris Hill-Scott
fc5f3ee132 Merge pull request #2192 from alphagov/jobs-one-off
Show uploaded files in basic view
2018-08-02 15:23:58 +01:00
Chris Hill-Scott
8e6efadb23 Track virtual page view when enabling basic view
So we can see what pages people go to after turning it on.
2018-08-02 15:23:52 +01:00
Chris Hill-Scott
77d96032bf Track event when someone previews basic view
We’re interested to know which services are looking at the basic view
preview (even if they’re not turning it on).

This commit logs their service IDs as events into Google Analytics.
2018-08-02 15:23:52 +01:00
Chris Hill-Scott
291b919e78 Add Government Equalities Office to domain list
They have been using Notify for the Gender Pay Gap service for ages.
2018-08-01 12:54:36 +01:00
Chris Hill-Scott
c551ce9a42 Show jobs in basic view
There are some teams who send jobs on a daily/weekly basis. They have
team members who only use Notify for this purpose. So they would
probably benefit from basic view, because they don’t need to see the
dashboard.

This commit:
- adds a new item (uploaded files) to the basic view navigation for
  teams that have sent at least one job
- makes the job pages visible to basic view users

I think we should do this now, rather than as a later enhancement to
basic view. We only have one chance to announce the feature, so teams
who do send jobs may otherwise discount it as not useful for them and
the opportunity to have them use it is lost.
2018-08-01 10:45:02 +01:00
Rebecca Law
d512f330cd Edit, don’t duplicate, existing templates 2018-07-31 16:23:46 +01:00
Chris Hill-Scott
b35f6e9d5f Merge pull request #2180 from alphagov/service-model
Make a service model
2018-07-31 13:31:09 +01:00
karlchillmaid
6b33bc7956 Remove reference to 'one-off' messages
Basic view should work for sending multiple messages too.
2018-07-31 12:35:36 +01:00
Chris Hill-Scott
45579c59cd Store boolean values in Redis as valid JSON
Calling `.set()` with `True` stores the byte string `'True'` which
cannot subsequently be decoded from JSON (because boolean values in
JSON are lowercase, ie `true`).
2018-07-31 12:17:28 +01:00
Chris Hill-Scott
1073b8f178 Merge pull request #2178 from alphagov/cache-has-jobs
Check if any jobs exist before querying jobs
2018-07-31 11:17:42 +01:00
Chris Hill-Scott
eb8e433820 Rename variable to be more descriptive
> "normal" is a word that does not really tell much, could we maybe name
> this constant better?

‘Non-scheduled’ more explicitly describes that statues in this set.
2018-07-31 09:57:55 +01:00
Chris Hill-Scott
41e0f7941f Refactor to avoid duplicated method definitions
Each of these methods does the same thing, so this refactors into an
attribute lookup, which saves writing boilerplate code and makes it
easier to add new properties.
2018-07-30 14:56:36 +01:00
Chris Hill-Scott
92a258dc41 Use model for template previews 2018-07-30 14:56:36 +01:00
Chris Hill-Scott
1304561a70 Use service model to look up service attributes
This is better than just keying into the JSON because it means you get
an exception straight away when looking up a key that doesn’t exist
(which via mocking you could ordinarily miss).
2018-07-30 14:56:36 +01:00