Commit Graph

1392 Commits

Author SHA1 Message Date
Chris Hill-Scott
ceef77b2af Fix ‘help’ appearing when it shouldn’t
Steps to reproduce:
- make a template with a placeholder
- click ‘send yourself a test’
- leave fields blank
- click ‘check’
- see error, click ‘back’

Expected: previous page

Actual: previous page with blue help sidebar

When the URL contains `help=0`, `request.args.get('help')` returns '0'.
Doing `if '0':` is the same as doing any `if <non empty string>:` which
returns `True`.

So we should only display the help when the help query parameter is:

- not missing
- AND a string that isn’t `'0'`
2016-06-24 10:26:45 +01:00
Chris Hill-Scott
68cb76a12e Merge pull request #715 from alphagov/fancy-homepage
Make it clearer what Notify is for from homepage
2016-06-22 15:01:17 +01:00
Chris Hill-Scott
41ef6de666 Add a reference number to the example texts
To show that the personalisation can include any kind of information,
not just name.
2016-06-22 14:37:02 +01:00
Chris Hill-Scott
18963f4645 Redirect to homepage after signout 2016-06-22 14:37:02 +01:00
Chris Hill-Scott
1667996716 Make it clearer what Notify is for from homepage
Uses some graphic design to communicate what Notify is:

- for sending messages to lots of people
- messages can be personalised
2016-06-22 14:37:02 +01:00
Leo Hemsted
cabf6cb6b1 Merge pull request #717 from alphagov/service-status
Add live/trial flag on platform-admin page
2016-06-22 14:28:44 +01:00
Chris Hill-Scott
285a7c2d5a Merge pull request #721 from alphagov/remove-from-job-page
Remove email from address on the job page
2016-06-22 14:24:27 +01:00
Chris Hill-Scott
2aabc4a7e9 Merge pull request #719 from alphagov/dashboard-link
Add a ‘dashboard’ link to the navigation
2016-06-22 14:12:27 +01:00
Chris Hill-Scott
0c31931876 Fix background colours on big numbers without links 2016-06-22 13:40:55 +01:00
Chris Hill-Scott
a385c2ff76 Make table on platform admin page more scannable 2016-06-22 13:01:53 +01:00
Chris Hill-Scott
6dd0064a47 Remove email from address on the job page
- it’s just taking up space
- it’s too late to change it if it’s wrong
- it’s not accurate if you’ve changed your service name since creating
  the job
2016-06-22 11:48:51 +01:00
Chris Hill-Scott
3ffeec6fbb Use tabular numbers for all big numbers
Reimplements https://github.com/alphagov/notifications-admin/pull/169

> Tabular numbers have numerals of a standard fixed width. As all
> numbers have the same width, sets of numbers may be more easily
> compared. We recommend using them where different numbers are likely
> to be compared, or where different numbers should line up with each
> other, eg in tables.

— 5f38012f94/docs/mixins.md (tabular-numbers)
2016-06-22 09:56:17 +01:00
Chris Hill-Scott
743c747688 Refactor navigation SASS
Moves the right-padding from being on the container and each element
to just being on the container.

No visual changes.
2016-06-22 09:34:21 +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
Leo Hemsted
c5f8e1a259 Add live/trial flag on platform-admin page
Show 'Live' or 'Trial' under each service to easily identify services
2016-06-21 12:27:49 +01:00
Adam Shimali
d4103767d2 Merge pull request #712 from alphagov/notification-stats-day-admin
Daily limit bugfix
2016-06-21 11:09:11 +01:00
Adam Shimali
8e688d989b Use short date of utcnow to query notifications to align with
date stored in db for notification.
2016-06-21 10:54:30 +01:00
Chris Hill-Scott
a6219ecda2 Merge pull request #711 from alphagov/template-guidance
Give users more help about what to put in their templates
2016-06-20 16:23:22 +01:00
Chris Hill-Scott
d2b4dd5007 Revert "Add character count as you type"
This reverts commit fbc4abf85d.
2016-06-20 16:03:21 +01:00
Chris Hill-Scott
be80c501d7 Use less confusing terminology than yes/no
Yes/no is quite ambiguous. Correct/incorrect is more formal, but
clearer.

Right/wrong doesn’t feel quite right. Good/bad is definitely not right.
2016-06-20 16:01:53 +01:00
Chris Hill-Scott
cc95f52f3f Use HTTPS in the URL example
HTTPS protocol is best protocol.
2016-06-20 16:01:27 +01:00
Chris Hill-Scott
c975e0f671 Remove placeholder hint JS
This was used for an older iteration of placeholder guidance. Not used
anywhere now.
2016-06-20 14:45:59 +01:00
Chris Hill-Scott
fbc4abf85d Add character count as you type
Text messages have a maximum length, which we tell the users. We
shouldn’t expect people to count the characters in the message
themselves.

This commit borrows [the word counter from the Digital Marketplace
frontend toolkit](9d17690de5/toolkit/javascripts/word-counter.js)
and adapts it to count characters instead.

Things I’m still not sure about with this:

- what should it say when the message goes over the length of one text
  message
- what’s the interaction with placeholders, which will change the length
  of the message

This commit also adds a line to the pricing page which explains that
service name counts towards the length of the message.
2016-06-20 14:45:59 +01:00
Chris Hill-Scott
3fa0e3aa66 Give more guidance about what to put in templates
There are some common questions that keep coming up when users are
editing or creating templates. This commit adds a pattern for sections
of guidance which can be shown/hidden.

It then modifies the guidance as follows.

Change:

- guidance about placeholders; give an example about what to do and what
  not to do (because the mistake we keep seeing people make is putting
  the thing itself, not the name of the thing)

Add (pretty basic at the moment but a need for these has come out of
research):

- guidance about links
- guidance about message length for text messages
2016-06-20 14:05:25 +01:00
Chris Hill-Scott
eed554ebb8 Give the textbox on edit template a better label
‘Message content’ is very much _our_ name for the thing. ‘Message’ is
more human-friendly.
2016-06-20 14:04:36 +01:00
Adam Shimali
f030d1cb8a Move check_messages in admin over to using get notification stats for
day.
2016-06-20 13:49:47 +01:00
Chris Hill-Scott
e44d9895ce Tidy up ‘change service name’ page
- Make service name repopulate in textbox
- More spacing between sections of the page
2016-06-20 13:33:29 +01:00
Chris Hill-Scott
8ca7832541 Filter test messages from jobs on the dashboard
While test messages technically have a file and are a job, there’s not
much reason to ever revisit them. So all they end up doing is cluttering
the dashboard and making it harder to find the actual files you’ve
actually uploaded from your computer.

So this commit:

- abstracts the name of test messages into config
- filters out any files whose filename represents a test message
- adds some more thorough tests for the jobs on the dashboard
2016-06-20 09:31:20 +01:00
Chris Hill-Scott
87a8906f1a Merge pull request #701 from alphagov/label-template-statistics
Add some words to the template statistics on the dashboard
2016-06-20 09:27:28 +01:00
Chris Hill-Scott
4c5622a019 Merge pull request #700 from alphagov/tour-into-templates
Redirect to the templates page after the tour
2016-06-17 16:35:00 +01:00
Chris Hill-Scott
5a95f4a7dd Tighten up spacing for better visual grouping 2016-06-17 16:30:02 +01:00
Chris Hill-Scott
077e90d4ff Say templates ‘used’ instead of templates ‘sent’
You _use_ a template to _send_ a message
2016-06-17 16:30:02 +01:00
Chris Hill-Scott
fa7345e9d0 Make template statistics on the dashboard a table
It was a `<dl>` before which is kinda weird. Especially when the jobs
table was a real `<table>`.

It also means we can give it column headings so that new and invited
users have a better idea of what it is.
2016-06-17 16:30:02 +01:00
Chris Hill-Scott
fb6cf3b3f4 Removed unused get template call 2016-06-17 16:15:51 +01:00
Chris Hill-Scott
d01039b9c7 Merge pull request #699 from alphagov/rearrange-breaking-change
Reorder the breaking change page
2016-06-17 16:10:18 +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
1d68aa87ea Reorder the breaking change page
The table on this page looked too much like something you were supposed
to interact with. To understand what’s expected of you from this page,
you need to know:

- what you’ve done to make this page happen (you changed some stuff)
- what actions are available now (confirm, back)

The rest of the information is supplemenatary—it helps you make a
descision, but it’s not key to understanding what the decision _is_.

This also matches what we do on the upload file page, where the
non-essential example is under the button.
2016-06-17 14:24:00 +01:00
Leo Hemsted
539950d772 when not logged in, redirect to sign-in
parts of the initial setup/login stages were throwing 500s if user
not already in process (ie: user directly navigated to url):
* /resend-email-verification
* /text-not-received
* /send-new-code
* verify
2016-06-17 13:53:48 +01:00
Chris Hill-Scott
4bc1cad416 Highlight failure rate on the jobs page
Forgot to do this as part of
56d9c29e91
2016-06-16 11:06:57 +01:00
Chris Hill-Scott
c544e1a830 Fix unpacking syntax for Python 3.4
Python 3.5 introduced the ability to do unpacking before keyword
arguments, eg
```
my_method(**dictionary, foo=bar)
```

This was introduced in https://www.python.org/dev/peps/pep-0448/

This is not valid syntax in Python 3.4, which is what’s running on our
boxes.

This commit changes an instance of this syntax which was introduced in
56d9c29e91
2016-06-16 10:10:36 +01:00
Chris Hill-Scott
56d9c29e91 Highlight failing jobs on the dashboard
> When we have jobs that have over 3% failure rates we should highlight
> those so that peoples attention is drawn to deal with the failure.
>
> They would then go to the job view to see what the details are where
> they could filter by failure, but that's a different story...
>
> This is just about calculating and highlighting those that need their
> attention.

— https://www.pivotaltracker.com/story/show/121206123

This commit:

- calculates the failure rate for each job
- makes jobs with a failure rate of > 3% go red on the dashboard
2016-06-15 10:25:48 +01:00
Chris Hill-Scott
c3a060eb8f Fix incorrect width on empty tables
Empty tables shouldn’t have `table-display: fixed` because it stops them
filling the width of their container.
2016-06-15 09:56:45 +01:00
Chris Hill-Scott
f57f004687 Merge pull request #676 from alphagov/big-number-no-show-more
Remove ‘show more’ from big number pattern
2016-06-15 09:51:22 +01:00
Chris Hill-Scott
eed11ea561 Remove ‘show more’ from big number pattern
This isn’t used anywhere.
2016-06-15 09:44:18 +01:00
Chris Hill-Scott
18578af75c Merge pull request #686 from alphagov/no-jump-email
Stop page jumping on first load with a long email
2016-06-15 09:38:56 +01:00
Chris Hill-Scott
7a7fe7fec1 Merge pull request #681 from alphagov/tables-of-notifications
Make dashboard and activity pages consistently clickable
2016-06-15 09:37:35 +01:00
Chris Hill-Scott
ee8ad47e29 Merge pull request #685 from alphagov/delete-template-bug
fix bug - calling wrong template_statistic endpoint causing 500 error…
2016-06-15 09:37:29 +01:00
Chris Hill-Scott
66a33e4e47 Stop page jumping on first load with a long email
A long email message needs to be collapsed to only show the first few
lines. The problem is that we were doing this by adding a class with
Javascript, meaning that the email wasn’t being collapsed until the
script in the footer ran.

This caused a jump in the page because the browser was painting the
whole email message, then repainting it once it was collapsed.

This commit takes advantage of the `.js-enabled` class added to the
`<body>` by a script in the `<head>` of GOV.UK template.

This means that the email message is collapsed with CSS before the first
paint of the page, so no jump.

This introduces some complexity in how we determine which emails get the
expander toggle. Because they’re already collapsed we can’t get their
height and work out if they’re long enough to need collapsing.

So we need to take a copy of the message, put it off-screen, expand it,
get its height, then remove it from the DOM. Bit of a faff.

Because of this there’s still a quick flash of the toggle if you see an
email message that’s too short to need collapsing. I think this is the
lesser of two evils—very short email messages will be few and far
between in the real world.
2016-06-15 09:35:55 +01:00
Adam Shimali
e2b855e7ae Merge pull request #682 from alphagov/resend-verification-code
Resend verification code
2016-06-14 12:02:41 +01:00
Chris Hill-Scott
6d7d5a4e46 Make jobs filterable by notification status
We can filter all notifications by status already. This commit reuses
the same code to filter the notifications for a job by status.

This means that, visually we can show the count on a job the same as
we do for all notifications, which is similar to how we show the counts
on the dashboard, so hopefully it feels like a bit more of a solid
thing.

This also applies to CSV downloads and AJAX updates, which will inherit
any filtering that their parent page has applied.
2016-06-14 11:12:46 +01:00