Commit Graph

7170 Commits

Author SHA1 Message Date
Chris Hill-Scott
677cad51d8 Merge pull request #1199 from alphagov/fix-broken-links-template-stats
Fix broken links on template statistics page
2017-03-22 14:49:31 +00:00
Chris Hill-Scott
e622a264bc Merge pull request #1201 from alphagov/back-to-templates-link
Add a back to template link on job page
2017-03-22 14:49:25 +00:00
Chris Hill-Scott
aa4237b934 Rationalise the spacing on the job page
Having two different margin sizes here meant that the page jumped
slightly once the report was ready to download. No good reason in favour
of it.
2017-03-22 10:57:38 +00:00
Chris Hill-Scott
3f1b5603f6 Add a back to template link on job page
When you’ve sent message(s) using a template, often the next thing you
want to do is go and send the same template again, or edit it.

Currently there’s no way of getting to a template from a job except for
going back to the list of templates and re-finding it.

This commit adds a link at the bottom of the job page that gives you a
shortcut back to the individual template, where you can find actions
like edit/send/etc.
2017-03-22 10:55:15 +00:00
Andras Ferencz-Szabo
4306892b6e Merge pull request #1200 from alphagov/paas_production
Paas production
2017-03-21 15:29:32 +00:00
bandesz
0f0d567ae6 PaaS run script: redirect stderr to stdout 2017-03-21 15:04:08 +00:00
bandesz
af576378a2 Add 'production' alias for live environment 2017-03-21 14:44:25 +00:00
Chris Hill-Scott
d1d13c23c5 Fix broken links on template statistics page
Tests assumed that the API returns the template `id` as part of the
object. It doesn’t – it returns it as the key used to look up the
object. The `id` was missing from the transformation into the format
used by the front end.

For some reason Flask is fine building the URL with `template_id=None`,
but obviously this doesn’t generate a valid link.
2017-03-20 17:37:59 +00:00
Rebecca Law
a0afe55d3c Merge pull request #1198 from alphagov/fix-view-letter-job
Fix format_notification_status to handle the letter status.
2017-03-20 16:46:22 +00:00
Rebecca Law
f26c8e3ce1 Fix format_notification_status to handle the letter status.
Not sure what temp and perm failure should look like so I left them for now.
2017-03-20 16:25:07 +00:00
Chris Hill-Scott
9de6046da7 Merge pull request #1195 from alphagov/better-template-management
Make it easier to find and preview templates
2017-03-20 15:49:16 +00:00
Chris Hill-Scott
f03de94e9e Merge pull request #1197 from alphagov/put-template-ids-back-on-dashboard
Put template IDs back on the dashboard
2017-03-20 14:01:08 +00:00
Chris Hill-Scott
2f68dc613c Put template IDs back on the dashboard
Removed as part of refactoring the code to generate the graphs of
template usage on the dashboard:
4a226a7a29 (diff-cf78cb5c29a2d3c4d45b61d8617824b7L29)

Didn’t realise that they were used by the functional tests.

This commit puts them back while keeping the code reuse.
2017-03-20 12:27:37 +00:00
Chris Hill-Scott
8a4c8526fa Use 19px not 16px type in more places
Making the navigation narrower means that we have more space on every
page. So on pages where we had to use 16px type just to fit stuff on the
page we can now bump the type size up to something less miserly. This is
mainly the team and settings pages.

We still need to use 16px on pages which list notifications or previews
of spreadsheets, because we’re still trying to fit a lot of information
onto these pages, so every little space-saving helps.
2017-03-20 11:59:12 +00:00
Chris Hill-Scott
96f505a7e7 Make blank letter template on adding
When adding a letter it’s hard to know how the stuff you’re typing is
going to look. So rather than go straight to the edit form let’s show
users a blank letter. They can then choose which part of it they want
to edit first. And will have a better idea of how their changes are
going to show up.

In research we also saw nervousness around saving a template and wanting
to ‘preview’ it first. Hopefully this flow will make people feel less
precious about saving a template because they’ve already done it once
just by creating the template.
2017-03-20 11:58:35 +00:00
Chris Hill-Scott
2ba8ff479c Redirect to individual template page after adding
When you add a new template the next thing you want to do is probably:
- send a test
- edit it after seeing what it looks like

So let’s redirect you straight to the page where you can do these
things.

This is especially important for letters where we want to tighten the
edit/feedback loop.
2017-03-20 11:57:56 +00:00
Chris Hill-Scott
89d3a116b9 Put versions at bottom of single template page
Like the template ID this is an infrequently-used action on a template
and doesn’t belong at the same level as ‘Upload recipients’ or
‘Send yourself’ a test. We don’t think it’s information that’s useful to
working out which template you want to interact with, so it shouldn’t be
on the choose template page any more.
2017-03-20 11:57:11 +00:00
Chris Hill-Scott
b908a38264 Remove back to all templates link
The all templates page is linked to from the navigation, and clutters
up this footer area of the template page, which now has some extra info.
2017-03-20 11:56:23 +00:00
Chris Hill-Scott
44a3a81305 Put template ID on the single template page
Not necessary to have it on its own page – it’s one line of stuff. And
definitely not as frequent use as the ‘Upload recipients’ or ‘Send
yourself a test’ links.
2017-03-20 11:55:48 +00:00
Chris Hill-Scott
89bd03d9f0 Show recipient emails on individual template page
Because we have space there’s no need to hide this now. Makes it less
confusing to have parts of the email appear/disappear as you’re clicking
through the flow.
2017-03-20 11:55:03 +00:00
Chris Hill-Scott
1bfa302fce Add a border around the email template
The email looks a lot like the normal content of a page (black on white
text, same font, rendered by the browser). It needed differentiating
visually.

This commit adds a border and spacing around the email to separate it
from the things on the page that you’re supposed to be interacting with.
2017-03-20 11:53:49 +00:00
Chris Hill-Scott
cf4a19e979 Add a loading indicator to the letter preview
Letter previews take a few seconds to load.

Good to let the user know that something is happening and that they
should wait.
2017-03-20 11:49:58 +00:00
Chris Hill-Scott
846f9913fa Remove the cheesy skeumorphism from letter preview
This isn’t needed any more because:

- we’re moving toward not clicking the letter to preview it, so there’s
  no need for a (not very intuitive) indication that it’s clickable

- we’re not showing letter templates on the same page as email and text
  message templates, so there’s less need to visually differentiate them
  (which also worked to limited effect)
2017-03-20 11:48:56 +00:00
Chris Hill-Scott
05fca0536c Make letter full-height and increase resolution
Previously we only showed the top half of a letter template, in order
to conserve space and fit multiple letter templates on one page. Now
that we have only one template per page there is space to spare. So
this commit changes the letter preview to show the full height of the
A4 page.

This also requires increasing the resolution at which the preview is
rendered so that it still looks clean at the bigger size.
2017-03-20 11:47:31 +00:00
Chris Hill-Scott
f2f1dca99b Make left-hand navigation into a 1/4 width column
Since we’ve simplified the left hand nav so much it doesn’t need 1/3 of
the width of the page. By making it smaller we have more space to show
previews of email and letter templates.
2017-03-20 11:46:35 +00:00
Chris Hill-Scott
dfcfe6a91e Add multiple ‘edit’ links for letter templates
Letter templates have (or will have) multiple different editable
regions. I think that the most intuitive way for this to work is to have
- an edit link for each of these areas
- positioned next to the thing to be edited

Again, this isn’t fully hooked up, but since no-one is using letters
live yet this is a good way of getting research feedback and pointing
towards where we want the feature to go.

Uses percentages for the positioning so that the alignment is maintained
on mobile.
2017-03-20 11:45:27 +00:00
Chris Hill-Scott
e391c7092a Call ‘send test’ ‘generate preview’ for letters
We think that sending a test for letters will mean downloading or being
emailed a PDF version of the populated template. While we haven’t
changed the app to do this yet, renaming the button is a good way to get
feedback about it from research.
2017-03-20 11:44:06 +00:00
Chris Hill-Scott
14bd05c8a5 Put actions at the top on single template page
The links to the right of the template take up valuable horizontal
space. This means that the preview of email and letter templates isn’t
as big as it could be. By making the letter preview bigger it removes
the need to click through to the PDF to see a preview.

Reuses the navigation style used on the API integration page, because I
think it damages consistency to create another new button style.
2017-03-20 11:43:17 +00:00
Chris Hill-Scott
de30558d57 Only show find as you type if enough templates
The find as you type only becomes useful once you have too many
templates to quickly scan visually on the page. I reckon that 7 is the
number where this starts becoming tricky. About 5 fit on the page
without scrolling (on my Macbook).
2017-03-20 11:42:30 +00:00
Chris Hill-Scott
04a5833d30 Autofocus the choose template search box
So you can just start typing as soon as you land on this page. Should
mean one less click, so fast for repeat use.
2017-03-20 11:41:35 +00:00
Chris Hill-Scott
f3c7a167df Add find-as-you-type on the choose template page
Not everyone knows how to use `ctrl` + `f`, and it’s not scoped to
just the list of templates.

The template you want to work with is often not the first one in the
list, but ordering by created at is useful for other reasons (mainly
around first time use).

This commit adds a find as you type control which aims to give users a
quick way of getting to the template they want to work with.
2017-03-20 11:40:19 +00:00
Chris Hill-Scott
1365265fc6 Make choose template a list of template names
When a team has lots of templates the choose template page gets very
long. It gets hard to find the template that you are looking for.

Our initial reckon was that teams would not be giving their templates
very useful names, and therefore a preview would be helpful. What we
have found is that:

- teams actually do give their templates useful names, and refer to
  these template names elsewhere

- the previews are less useful for emails and text messages, because
  they have so much content (which for emails also makes it harder to
  `ctrl` + `f` the template name)

The other problem we found was that this page presented the user with
a _lot_ of options. For each template there were 4 actions, plus the
click-to-preview action for letters, plus the ‘see previous version’
action for templates that had been edited multiple times. It was a very
busy page.

And the final problem (that we recently introduced) was that there was
no way, other than the visual cues, to know whether a template was a
letter, email, or text message.

So this commit strips back the choose template page to be very focused
on finding the right template, by only showing the template name and
type. The user can then click through to a page that shows just a single
template, and perform actions relevant to that template from that page.
2017-03-20 11:35:30 +00:00
Chris Hill-Scott
a762e8173f Merge pull request #1196 from alphagov/remove-unwanted-sass
Remove unwanted SASS
2017-03-20 11:28:09 +00:00
Chris Hill-Scott
5cfc7b1d88 Merge pull request #1194 from alphagov/40-41
40 - 41 for GOV.UK Blogs
2017-03-20 10:42:57 +00:00
Chris Hill-Scott
bc89208978 Merge pull request #1142 from alphagov/yearly-template-usage
Show template usage broken down by month
2017-03-20 10:34:26 +00:00
Chris Hill-Scott
84ef532b9a Remove unwanted SASS
None of this SASS is used by the app any more. But we’re still shipping
it to every user. Let’s save some filesize by not doing so.
2017-03-20 10:20:09 +00:00
Chris Hill-Scott
5568da2439 Remove the ‘phone’ component
This was used on the old product page to do the graphic of three phones
showing three different messages. We don’t have this any more, so this
‘component’ is unused.

Also removes some unused imports which were a hangover from previous
versions of the product page.
2017-03-20 10:19:20 +00:00
Pete Herlihy
9990795a8e 40 - 41 for GOV.UK Blogs 2017-03-17 10:20:04 +00:00
Chris Hill-Scott
c122a5b3d7 Add unit tests for dashboard template functions
Although we integration test the pages that depend on these, it’s
probably a good idea to unit test them as well, to make sure, for
example, that all the different statuses are counted when working out
how many messages have been sent from a template.
2017-03-16 14:49:22 +00:00
Chris Hill-Scott
619fa61ea3 Relabel show more links on the dashboard
- ‘messages sent per month’ is a better description of what will appear
  on the page than ‘activity breakdown’
- ‘templates used by month’ instead of ‘this year’ for consistency

I think ‘usage breakdown’ still works for the remaining link – it’s more
than a monthly breakdown, it also breaks down the spend.

Doesn’t need to say ‘by month’ in the `<h1>`s themselves, because you
can see from looking at the page that it’s broken down by month.
2017-03-16 14:04:41 +00:00
Chris Hill-Scott
4a226a7a29 Show template usage broken down by month
This follows on from:
- https://github.com/alphagov/notifications-admin/pull/1094
- https://github.com/alphagov/notifications-admin/pull/1109

It depends on:
- [ ] https://github.com/alphagov/notifications-api/pull/829

A year is too long. Month-by-month is a better timeframe for making
decisions or seeing patterns in your usage.
2017-03-16 14:04:37 +00:00
bandesz
973b6621df PaaS rollback: check if the rollback app is in a started state 2017-03-16 12:29:16 +00:00
Chris Hill-Scott
7fc5d41531 Merge pull request #1192 from alphagov/smarter-back-to-service-link
Only show back to service link if you have service
2017-03-15 14:39:22 +00:00
Chris Hill-Scott
f2d0f75fce Only show back to service link if you have service
It doesn’t make sense to show the back to service link if, for example,
you are in the onboarding flow and haven’t created a service yet.
2017-03-15 14:26:04 +00:00
Chris Hill-Scott
c53e714db6 Merge pull request #1191 from alphagov/pin-six
Pin six to a version that’s more likely to work
2017-03-15 13:17:07 +00:00
Chris Hill-Scott
77b41aa851 Pin six to a version that’s more likely to work
Everything is fine and happy locally and on Jenkins.

Getting a `cannot import name viewkeys` error on AWS.

Based on some Googling, it’s possible that this will fix it.
2017-03-15 13:13:14 +00:00
Chris Hill-Scott
9045b1a8c6 Merge pull request #1190 from alphagov/38-40
38-40 with Tax appeal tribunal and Data Publishing
2017-03-15 11:47:16 +00:00
Chris Hill-Scott
c5bd763953 Merge pull request #1189 from alphagov/dont-expire-csrf
Make CSRF tokens last as long as the session
2017-03-15 11:47:08 +00:00
Chris Hill-Scott
24b4b91e05 Merge pull request #1187 from alphagov/back-to-service
Add back to service link
2017-03-15 11:46:58 +00:00
Chris Hill-Scott
d889e674f0 Merge pull request #1186 from alphagov/quis-patch-1
🖨
2017-03-15 11:46:50 +00:00