Commit Graph

7170 Commits

Author SHA1 Message Date
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
c554e9e32d Put template content or subject in tables
In tables where we show rows and rows of information we used to give
some meta information about the notification, or at least as much as we
could give in the very limited space available.

This information is now on the notifications page, so the information we
show in these tables should just be whatever helps users identify the
right message. I reckon that this is:
- the content of the message for text messages
- the subject for emails and letters

This also makes these pages consistent with:
- the inbound SMS page
- the way the people’s inboxes work for their text
  messsages/Whatsapps/emails

For consistency’s sake this makes the job page work the same way. It may
be slightly less useful here because on the job page every message is
sent from the same template, so will have broadly the same content.
2017-06-21 17:57:20 +01:00
Chris Hill-Scott
f5b49b16e9 Don’t link to ‘Report’ jobs
‘Report’ jobs are what we used to have for one-off messages. The page
for a report job doesn’t contain any extra info from what’s on the
notification page. We will still have ‘Report’ jobs while we transition
to sending one-off messages through the API. So while we still have
these jobs, let’s hide any links to them because they’re not useful
pages.
2017-06-21 17:57:20 +01:00
Chris Hill-Scott
1eb3a5aca0 Link to the relevant job from notification page
If a notification has been sent from a job then that’s important context
to know about it. So we should surface that information on the page.

It also gives users an easy way of going back, if that’s the page
they’ve come from.
2017-06-21 17:56:08 +01:00
Ken Tsang
c5e1de9b33 Enable update of url / bearer_token inbound api 2017-06-21 17:34:22 +01:00
Chris Hill-Scott
929e2b841f Put notification meta above message, remove AJAX
The meta info about a notification (who sent it, when they sent it)
won’t ever change, so there’s no need for it to reload it using AJAX.

Putting it above the message and under the `<h1>` makes it match how
this information is displayed on the job page.

On the job page this information is bold, but visually the job page is
using too much bold now (nothing is emphasised/differentiated if
everything is bold). So this commit also makes this line of info regular
on both the notification and job pages.
2017-06-21 16:21:34 +01:00
Chris Hill-Scott
974953a64f Remove file name from single notification page
Having a file name for single messages made sense when they were called
‘Test message’. They made a bit of sense when single messages still had
a file, which had to be called _something_.

Now that individual messages don’t come from a file, and don’t land you
on a page that looks like a ‘report’.
2017-06-21 16:20:49 +01:00
Chris Hill-Scott
67b2937123 Show full message content on notification page
We’ve had a few teams talk about wanting to go back and check what their
users are sending out, including the content of any placeholders.

We already provide this functionality through the API, this commit makes
it the default in the admin app too.

We couldn’t do this before because we didn’t have the individual
notification page.

It’s better to do this by re-hydrating the template than pulling the
content from the API, because things like letters have multiple areas
of content – this is more complex than what we can get from API at the
moment.
2017-06-21 16:20:45 +01:00
Chris Hill-Scott
5e4aff2a7b Refactor test to match subsequent line
Easier to read these asserts if they’re formatted the same.
2017-06-21 15:17:11 +01:00
Chris Hill-Scott
b578c3589b Put status under message
Since we’ve removed the table of notifications from the single
notification page there’s no way of knowing the status of a
notification.

This re-adds it in a way that’s similar to how it looks on inbound
messages.
2017-06-21 15:15:13 +01:00
Chris Hill-Scott
a964417555 Show recipient on notification page
Since we removed the notifications table from this page we need a
different way of showing who the message was sent to.

Our `Template` classes already have a way of doing this, and we have a
flag to switch this on (which is what this PR changes).
2017-06-21 15:09:45 +01:00
Chris Hill-Scott
16d92b9a62 Remove notifications table from notification page
This table will only over show one notification.

There’s a better way to display who the recipient was, and what the
status of the notification is.
2017-06-21 15:09:44 +01:00
Chris Hill-Scott
742173dd33 Remove counts from notification page
The counts on the notification page will only ever show 1 thing. Which
feels like overkill, especially if you’re only sending one-off messages.

It’s also confusing when you come from the job/activity pages which
have one set of numbers to then be confronted with a different set of
numbers.

The important stuff on this page is:
- what the message was
- some meta information about it

Sorry Leo 😢
2017-06-21 15:09:44 +01:00
Chris Hill-Scott
7d0aed0ae8 Link to each recipient on activity and job pages
We have a page for individual notifications now.

On the job and activity pages each row of the table represents an
individual notification. So it makes sense for these things to be linked
together, so that a user can navigate from one to the other.

This will make more sense once we make some more changes to the
individual notification page.
2017-06-21 15:09:43 +01:00
Chris Hill-Scott
2ee5880e0c Change URL of notification page
This page is going to be used to show all notifications now, not just
ones sent as one-offs.
2017-06-21 15:09:40 +01:00
Leo Hemsted
250c64c4fb Merge pull request #1324 from alphagov/one-off
One off status page
2017-06-21 15:05:55 +01:00
Ken Tsang
ba8ee3e60a Add test for elided inbound api urls 2017-06-21 13:43:52 +01:00
Ken Tsang
3b47ff28f0 Refactored tests for inbound api 2017-06-21 12:15:53 +01:00
Chris Hill-Scott
7a07252854 Increase resolution of the TFL DAR logo
We’re showing these kinds of logos bigger as of this PR:
https://github.com/alphagov/notifications-utils/pull/170

If we don’t increase the resolution of the asset to be bigger then it
will look blurry.

New image is `108px` high, which is `2 * 54px`, in order for it to look
as good as possible on retina screens.
2017-06-21 10:53:32 +01:00
Ken Tsang
b2d07f1bb3 Refactor test to use flag 2017-06-20 17:51:58 +01:00
Ken Tsang
d3d0c0c0b6 Add create_service_inbound_api 2017-06-20 13:29:20 +01:00
Ken Tsang
827c6ccc99 Refactor inbound api html and processing 2017-06-20 13:24:01 +01:00
Ken Tsang
5d5bb69f0e Refactored set inbound api page 2017-06-20 13:07:50 +01:00
Ken Tsang
d9286b036f Add get and update service inbound api 2017-06-20 13:06:46 +01:00
Ken Tsang
5b54dd53a2 Change bearer input to password 2017-06-20 13:03:28 +01:00
Leo Hemsted
d47c2cdf9f remove dupe fixture 2017-06-20 10:51:25 +01:00
Chris Hill-Scott
02f8e4e14b Remove unused CSS
This stuff if leftover from when we used to have the sidebar of links
next to each template.
2017-06-20 10:06:15 +01:00
Chris Hill-Scott
18e8b570d7 Make click areas bigger on template picker
Generally, bigger click areas are better[1], as long as they don’t cause
ambiguity.

This commit expands the clickable area of links to templates to include
hint text underneath which states the type of template.

1. https://en.wikipedia.org/wiki/Fitts%27s_law
2017-06-20 10:05:21 +01:00
Leo Hemsted
580c225ca2 Change client_request so its kwargs look more like url_for 2017-06-19 12:31:14 +01:00
Rebecca Law
f40448f80e Remove print 2017-06-19 11:35:25 +01:00
Chris Hill-Scott
ec57fdfc3b Merge pull request #1321 from alphagov/dar-logo
Add TFL Dial-A-Ride logo
2017-06-19 10:41:44 +01:00
Chris Hill-Scott
efe2dd86a7 Merge pull request #1322 from alphagov/55-56
55-56 for GOV.UK Registers
2017-06-19 10:38:05 +01:00
Pete Herlihy
6544c0833e Got to 57 before merged.... Horizon - DIT 2017-06-16 15:30:53 +01:00
Leo Hemsted
20bb34849d add tests for notification status page 2017-06-16 15:29:34 +01:00
Leo Hemsted
09dc85e5bc Clean up code to remove unnecessary paths.
Status code was overcomplex, given how we control the inputs. Now, it
expects a single value, rather than a comma separated list, and if you
give something it doesn't expect it just returns all. Note, it won't
select the correct box - but if you've been manually editing the URL
that's your own problem ¯\_(ツ)_/¯

Also, as this page will only ever be shown from the tour (tutorial),
it doesn't need some non-help things - such as the download csv button
and associated endpoint.
2017-06-16 15:28:17 +01:00
Leo Hemsted
c5f92eabfb add add one-off notification status
completely mimicks the job status page, and as such, all the code and
templates have been taken from the job page. This page performs
exactly the same as the job page for now

* total, sending, delivered, failed blue boxes (though they'll just
  read 0/1 for now.
* download report button (same as with job download, except without job
  or row number in file)
* removed references to scheduled
* kept references to help (aka tour/tutorial) as that'll eventually
  change over from a job to a one-off too
2017-06-16 15:28:17 +01:00
kentsanggds
388bb312c8 Merge pull request #1323 from alphagov/ken-letter-recipients-ascii
Update requirements to get latest utils for address validation
2017-06-16 13:59:32 +01:00
Ken Tsang
54f65fa57b Added utf-8 support, refactored test 2017-06-16 13:58:56 +01:00
Ken Tsang
8061d3f29d Added assert to check row error message 2017-06-16 13:58:56 +01:00
Ken Tsang
8997c95512 Refactor non ascii test 2017-06-16 13:58:56 +01:00
Ken Tsang
11ce2bfa39 Updated test to include correct mocks 2017-06-16 13:58:56 +01:00
Ken Tsang
99ab7ddadd Updated test 2017-06-16 13:58:56 +01:00
Ken Tsang
7d8ccc4cb5 Update requirements to get latest utils 2017-06-16 13:58:56 +01:00
Ken Tsang
5f8266ede6 Update test 2017-06-16 13:58:29 +01:00
Ken Tsang
6e3bedb633 Refactored non ascii letter recipients test 2017-06-16 13:58:29 +01:00
Ken Tsang
c8f72bc513 Refactor to use address validation in utils 2017-06-16 13:58:29 +01:00
Ken Tsang
338df098a8 Add check for ascii only in recipients file 2017-06-16 13:58:29 +01:00
Pete Herlihy
a6fc184351 55-56 for GOV.UK Registers 2017-06-16 10:26:10 +01:00
Rebecca Law
703b48b157 [WIP]
Page and form to persist the inbound api data for a service.
2017-06-15 16:20:07 +01:00
Chris Hill-Scott
2ae80b5039 Add TFL Dial-A-Ride logo 2017-06-15 12:11:27 +01:00