Commit Graph

103 Commits

Author SHA1 Message Date
Chris Hill-Scott
45b1b11abb Refactor go-live readyness into service model
All this info is info about the service. So it’s better to put it on
the service model because:
- encapsulation
- later reuse
2018-09-24 14:52:30 +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
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
Chris Hill-Scott
ca9fe6c8f6 Rename ‘Send a message’ to ‘Templates’ in basic view
From Karl:

> Templates – this should be consistent with Admin view. Users may
> switch from Basic to Admin view (or vice versa), they will also
> interact with users who have a different view or permissions to them.
> Neither should have to learn new interfaces and language if possible.

> ‘Send a message’ was a nice, active label – but Notify options aren’t
> usually actions. If we’re going to change this we should be consistent
> across both Admin and Basic views.

> For the same reason, I have rejected ‘see’, ‘search’ and ‘view sent
> messages’. It will be interesting to see in user testing whether users
> read ‘sent messages’ as ‘send messages’.
2018-07-13 17:02:27 +01:00
Chris Hill-Scott
b0cb9ff58e Add sent notifications page for caseworkers
The other task that caseworkers have to do (much less often than sending
messages) is look at the messages which they’ve sent. The reason for
doing this is usually to find a specific message which someone has
complained about.

This commit adds:
- a page where they can do that
- a navigation item so they can get to that page

We reckon that because this is about finding specific messages, not
reporting that it’s fine to mush all the channels (email, text, letter)
into one table.
2018-07-05 11:53:42 +01:00
Chris Hill-Scott
84de1c5625 Let caseworkers send one off messages
The main task that we think ‘caseworker’ users do is send one off
messages.

So this commit:
- makes sure users who don’t have the `view_activity` permission (ie
  not ‘admin’ users) can still send messages
- adds navigation so that these users have a place to go from which to
  start the process of sending a one off message
2018-07-05 11:53:42 +01:00
Chris Hill-Scott
e1fd63e184 Rewrite navigation as a class
Because we have multiple navigations, which will share the same methods
(by subclassing) but different mappings of navigation items to endpoints
by overriding the `.mapping` and `.exclude` attributes.
2018-04-25 11:15:13 +01:00
Chris Hill-Scott
1fba5d186d Highlight selected navigation item
In research I’ve sometimes seen people click the wrong nav item. I
reckon that people’s concept of which pages live behind which navigation
items isn’t very strong.

We can reinforce this relationship by showing, for every page, which is
the corresponding nav item. The conventional way of doing this is either
with some kind of emphasis, typically colour or bold. I’ve gone for bold
because colour would be weird.

---

The implementation of this is quite loosely coupled to our application
code because:
- our application code is not well structured (eg we don’t make any use
  of blueprints)
- spreading this change across lots of files in our application would
  make it harder to test without actually hitting each endpoints; such
  tests would be slow and verbose

So I’ve gone for more of a meta approach. Rather than testing that each
endpoint has a specific navigation item selected, I’ve gone for
validating that:
- all endpoints being mapped to are real
- all endpoints have _a_ selected navigation item (or are specifically
  excluded)

This means that it’s impossible to add, change or remove an endpoint
without also updating which navigation item should be selected. And the
actual mapping is so declarative that it testing it would be redundant.
2018-04-25 09:37:35 +01:00
Leo Hemsted
3afc193624 remove any_ from has_permissions
we branch on any_ to either say "require ALL these permissions" or
"require ANY of these permissions". But we only ever call the decorator
with one permission, or with any_=True, so it's unnecessary
2018-03-06 13:08:07 +00:00
Leo Hemsted
4a08cf81e7 remove admin_override from all has_permissions usage
as previously pointed out, it's not used anywhere.
2018-03-06 13:08:07 +00:00
Leo Hemsted
09824078dd remove all instances of db style permissions
lots of renaming of send_texts/emails/letters to send_messages, and
manage_settings/users to manage_service
2018-03-06 13:08:06 +00:00
Leo Hemsted
bd54dbb40c remove unnecessary invocations of has_permissions(..., any_=True)
when added to a service, all users are given the view_activity
permission. So, if that's included in the list, we don't need `any_`,
and we don't need any of the other permissions.
2018-03-06 13:08:06 +00:00
chrisw
5d26d4457f manage api keys permission should be able to see senders 2018-02-08 11:25:49 +00:00
Chris Hill-Scott
d9a63c07a9 Refactor user permissions to use args, not list
This makes the interface a bit cleaner and less verbose.
2018-01-16 11:22:57 +00:00
Chris Hill Scott
8eed32620d Fix link to dashboard from end of tour
The notification page was different to the job page in that it
passed through the whole template, not just the ID.
2017-07-03 15:29:11 +01:00
Chris Hill-Scott
9f20ea4b7e Revert "Merge pull request #1336 from alphagov/revert-show-notifications"
This reverts commit 7e354ff341, reversing
changes made to 6f3bcff32f.
2017-06-30 14:01:18 +01:00
Chris Hill-Scott
b450a349a3 Revert "Merge pull request #1328 from alphagov/notification-page-reworked"
This reverts commit 1797162248, reversing
changes made to 95b4d9eb31.
2017-06-23 15:56:25 +01:00
Chris Hill-Scott
ba93be5ea5 Remove template from job page
Showing the template on the job page was semi-useful when you couldn’t
see the contents of each individual message. It was still a bit weird
because it just showed the template, never the actual messages that
went out, with the placeholders.

Now that users can click through to see individual messages, and can see
a short preview of the content on each row I think we can safely lose
the template preview on this page.
2017-06-21 17:57:20 +01:00
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
Chris Hill-Scott
eab943d353 Add usage link to navigation
We’ve seen services that have a lot of activity on their dashboard
miss the usage feature because the link gets pushed a long way down the
page.

We don’t want to move it up the page, because for most users the
templates/jobs stuff is more useful. And we don’t want to remove it
because it’s a useful part of the onboarding to understand the Notify
proposition.

So this commit adds it as a link to the nav, to make users more aware of
it, and as a quick way of getting into it for the small subset of users
who will care about it (a lot).

Order of the links is determined by what’s likely to be most useful for
first time users surfing the nav. Usage is more interesting than
settings, but less interesting than team members.
2017-02-08 11:35:35 +00:00
Chris Hill-Scott
9e5529bea5 Fix highlighted step on tour in IE8
We grey-out the non-current step in the tour so the user knows whether
they’re at step 1, 2, or 3.

This is done using CSS opacity.

IE8 doesn’t support the standard CSS opacity syntax. But it does support
the weird, old, Microsoft-specific `filter:` syntax. So this commit:

- makes the greying out a class rather than an inline style, to reduce
  duplication
- adds the filter syntax so the greying out works in IE8
2017-01-23 12:53:44 +00:00
Chris Hill-Scott
ee78d0bf59 Move switch service out of black header
Also following the pattern work that Tim and Stephen have done.
2016-11-18 12:00:01 +00:00
Chris Hill-Scott
5772fd34fe Remove placeholder letters page
👋 emoji
2016-11-14 14:51:28 +00:00
Leo Hemsted
4a7f136cab add placeholder letters page 2016-10-26 16:51:36 +01:00
Chris Hill-Scott
46426217f9 Give platform admin users visibilty of API pages
Platform admins should be able to see what’s going on with a service’s
API integration, including:
- messages sent
- contents of whitelist
- names of keys

They should also be able to revoke keys in an emergency.

The only thing they _shouldn’t_ be able to do is create new keys
(because then they’d be able to send messages as the service).
2016-09-29 12:57:57 +01:00
Chris Hill-Scott
d9cc936972 Add an index page for the API integration
This commit adds a placeholder page which, for now, just has links to
the API keys page and links to the clients.

There’s more stuff to come on this page, but this commit just does the
reorganising so that it’s easier to review.
2016-09-28 17:00:45 +01:00
Chris Hill-Scott
99ec0fd8d7 Make it clear who you’re sending the example to
It’s not one of your colleagues. You’re not inviting someone. We’ve seen
people get confused about this.
2016-08-05 09:32:58 +01:00
Chris Hill-Scott
d33c254fa5 Merge pull request #743 from alphagov/hide-delivery-download-tour
Hide download CSV link when in the tour
2016-07-08 16:31:16 +01:00
Chris Hill-Scott
ddef996f34 Rename ‘API keys’ page to ‘API integration’
Since this page is more than just your API keys, it should be named
something else.

Hopefully the word ‘integration’ will give non-techical users a clue
that it’s possible to use Notify without doing the CSV dance.
2016-07-06 10:12:20 +01:00
Chris Hill-Scott
80e0832f7d Make a function for parsing help query param
Our templates are a littered with `request.args.get('help', '0')`.
This commit refactors these into a single helper method, which can be
used by the view functions, then passed to the template.

This makes the templates cleaner, and should make it easier to refactor
`help` out of the query parameters entirely in the future.
2016-07-05 17:29:41 +01:00
Chris Hill-Scott
721212816d Redirect to the dashboard after the tour
After the tour we should ground users by dropping them on the dashboard.

In the background, we delete the example text message template. This
means that users start from a clean slate when they go to add their own
templates

This also means some wording changes to the tour so it still makes
(some) sense:

- 1, 2 and 3 should refer to the current step, not describe the next
  one
- the link should take you to the dashboard
- change from ‘Get started’ to ‘Try this example’ because we’re using
  ‘Get started on the dashboard’
2016-07-01 13:47:51 +01:00
Chris Hill-Scott
9abd19e092 Add a ‘dashboard’ link to the navigation
It’s been unclear that:

- the dashboard exists
- that you click the name of the service to get back to it

So this commit:

- takes the link off the service name
- adds a link labelled ‘Dashboard’ to the navigation
2016-06-22 09:31:37 +01:00
Chris Hill-Scott
fb6cf3b3f4 Removed unused get template call 2016-06-17 16:15:51 +01:00
Chris Hill-Scott
a6ad829947 Redirect to the templates page after the tour
When you’re dropped straight into the ‘edit template’ page it’s still
a bit confusing what the thing you’re typing is—the mental model isn’t
quite there yet.

I think it will help (rather than redirect to the dashboard) to redirect
to the choose template page. You can then choose to edit the example or
add your own template.

This should help people understand that the example is one of a number
of templates that you create.
2016-06-17 14:32:32 +01:00
Chris Hill-Scott
aebdc747b7 Don’t show help once tour is done 2016-05-26 09:15:13 +01:00
Chris Hill-Scott
c41944080c Make the tour interactive
_The code for this is quite hacky and light on tests. But I’d really like to get
it in the app for the research tomorrow to see how well the feature works._

This commit changes the tour from being a set of static screens to some help
which guides you through the process of sending your first test message.

The theory behind this is that what users are really struggling with is the
concept of a variable, rather than the relationship between the placeholders and
the column headers. And like learning to program, the best way to learn is by
taking an example and modifying it to your own needs.

This means that when someone adds their first service we set them up an
example email template and an example text message template. Then there is a
guided, three step process where _all_ the user can do is send a test message to
themselves.

Once the message is sent, the user still has the example templates which they
can edit, rather than having to remember what they’re supposed to be doing.
2016-05-25 13:14:09 +01:00
Leo Hemsted
ecf0dd7ebb move platform admin links platform admin page
removed "View providers" and "List all services" from the choose service page and the left-hand nav bar
2016-05-25 10:36:47 +01:00
Martyn Inglis
6699442f6b Added provider management pages in.
- see priority
- change priority
2016-05-11 09:43:55 +01:00
Chris Hill-Scott
744064e840 Remove activity from the nav
We saw lots of people in the lab clicking activity hoping for…
something. But it’s not really where you go to do a thing, so they
weren’t finding what they were looking for.

Since you can now get to the activity from the dashboard, let’s remove
the link in the nav, to make thing less ambiguous.
2016-04-29 16:03:57 +01:00
Adam Shimali
a627cf9002 Change activity to view to request 7 days data.
Cleaned up filters a bit so that if you want both templates
email and sms is passed.

Added mock assertion to test.
2016-04-28 15:52:20 +01:00
Chris Hill-Scott
8d3fa79180 Reorder navigation to put emails before SMS
Elsewhere (eg the dashboard, the activity page) we have email first.
Emails are also anticipated to be slightly more popular in terms of the
number of services sending them.

Therefore it makes sense to have emails first in the main navigation.
2016-04-19 15:31:19 +01:00
Chris Hill-Scott
9b4933f16b Make activity page use new nomenclature for status
Statuses used to be:
- failed
- complaint
- bounce
- sent
- delivered

Now they are:
- sent
- sending
- delivered

This change broke the notifications page on the admin app.

It also made me realise that we should be ignoring ‘sending’ messages in
the history page—it should only show messages we’ve tried to deliver.

The code for this is a bit of a bodge, but it will get things working
again for now.
2016-04-13 17:10:05 +01:00
Chris Hill-Scott
e526852f53 Remove keylines from nav
We have lots of keylines in our pages, eg tables, email message previews

This makes the pages look quite cluttered, especially because the
keylines don’t always align.

I think it looks much cleaner without the keylines in the nav, and we
have few enough nav items that we don’t need to chunk them up.
2016-04-11 17:20:24 +01:00
Chris Hill-Scott
2b9e016d14 ‘History’/‘Notifications activity’ → ‘Activity’ 2016-04-08 10:55:08 +01:00
Nicholas Staples
c31c55666b Added current_service to flask context and template context.
Fix all tests and conflicts.

Removed comment line.
2016-04-04 17:01:20 +01:00
Nicholas Staples
a41dda8884 Working functionality for filtering notifications and all tests passing. 2016-04-04 16:34:06 +01:00
Chris Hill-Scott
42cb4b0d99 Remove the verbs from the navigation
Because ‘Send text messages’ isn’t very helpful if you’re looking to
edit a template.

It also helps front-load the navigation, ie ‘Team’ is the first word,
rather than the more generic ‘Manage’.
2016-04-04 09:33:29 +01:00
Chris Hill-Scott
71bc1e616a Fix logic around team on navigation
In the navigation you should see either:
- manage team
- view team members

This depends on which permissions you have. You shouldn’t see both at
once. There was a bug which meant you could see both. This commit fixes
that bug.

https://www.pivotaltracker.com/story/show/116608291
2016-03-31 09:49:09 +01:00
Rebecca Law
e67bb5f716 Fix main_nav for platform admin
Renamed or_ to any_
2016-03-30 11:30:18 +01:00
Rebecca Law
99bd94799e Remove access_developer_docs permission, it doesn't make sense to need it.
Add view_activity permission when the permissions are being editted.
2016-03-29 17:33:12 +01:00