Commit Graph

9555 Commits

Author SHA1 Message Date
Pea M. Tyczynska
8ecccca6c2 Merge pull request #3348 from alphagov/no-embedded-images-in-SVG-logo-files
Do not allow to upload SVG logos with embedded raster images in them
2020-03-04 15:41:03 +00:00
Pea Tyczynska
44519fcf8e Do not allow to upload SVG logos with embedded raster images in them
Those are for example png or jpg images. They do not render properly.
2020-03-04 15:35:12 +00:00
Chris Hill-Scott
b64c5ae78a Merge pull request #3344 from alphagov/uploads-navigation
Fix navigation around uploads and jobs
2020-03-04 12:14:08 +00:00
Chris Hill-Scott
beb3c5b00d Merge pull request #3346 from alphagov/no-extra-space-empty-templates
Use normal paragraphs for empty templates page
2020-03-04 11:47:17 +00:00
Rebecca Law
2c6ac387f9 Merge pull request #3347 from alphagov/make-sms-char-count-consistent
Update notifications-utils library
2020-03-04 11:05:18 +00:00
Rebecca Law
ef3a4c860b Update notifications-utils library.
The SMS character count validation has been updated to exclude the service name when validating the message.
The upload CSV was the only place we were doing this.

Still to come: update the API to use the same method from the SMSTemplate class to check the message lenghth.
2020-03-04 10:52:17 +00:00
Leo Hemsted
8ccf97b029 Merge pull request #3339 from alphagov/remove-png-letter-logos
don't convert letter logo svgs to pngs
2020-03-04 10:18:19 +00:00
Chris Hill-Scott
1d92ecc7fc Use normal paragraphs for empty templates page
We don’t need the extra spacing, and it’s inconsistent with the uploads page.
2020-03-03 17:54:50 +00:00
Chris Hill-Scott
22d1b353d5 Merge pull request #3341 from alphagov/hide-postage-validation-failed
Don’t show the postage when validation has failed
2020-03-03 14:37:14 +00:00
Chris Hill-Scott
3df3db1609 Fix navigation around uploads and jobs
The uploads and jobs page should start showing in the _Uploads_ menu on
the left hand side.

If you’ve navigated to a job from the uploads page (ie you haven’t got
to that page because you’ve just sent the job) then you should see a
link back to the uploads page.
2020-03-03 14:33:20 +00:00
Chris Hill-Scott
e155794cbc Merge pull request #3333 from alphagov/uploads-page-ready
Redesign the uploads page to accommodate different kinds of uploads
2020-03-03 13:44:38 +00:00
Chris Hill-Scott
f1a04d9b1e Show guidance on how to upload a letter
Once we’ve launched the feature we want the guidance to be discoverable.
2020-03-03 13:29:45 +00:00
Chris Hill-Scott
b236df523c Don’t show the postage when validation has failed
The postage covers up some of the letter, so it can hide the problem. It
also implies that the letter has been put in an envelope, which will
never happen if it fails validation.

This matches what we do for uploaded letters.
2020-03-03 12:57:43 +00:00
David McDonald
d3c8b35aa9 Rearrange makefile 2020-03-03 12:05:56 +00:00
David McDonald
162734c7a7 Remove unused makefile commands
These are either not used at all or we have superseeded them with
commands written directly into concourse jobs
2020-03-03 12:05:15 +00:00
David McDonald
aa9446f752 Remove jenkins related code 2020-03-03 12:04:32 +00:00
Chris Hill-Scott
fdd17e30bf Merge pull request #3340 from alphagov/org-usage-empty
State when organisation has no live services
2020-03-03 11:08:48 +00:00
Chris Hill-Scott
7a780d115e Test that addresses display on uploads page
We didn’t have a test that checked for the first two lines of the
address being displayed when rendering one-off letters on the uploads
page.

I double checked in the database and we store addresses in the `to`
field with newlines, not commas.
2020-03-03 10:50:07 +00:00
Chris Hill-Scott
58176d5fa0 State when organisation has no live services
The page looks broken otherwise.
2020-03-03 10:34:20 +00:00
Chris Hill-Scott
b1a97b0d69 Implement __radd__ on ModelList to make addition commutative
Because ModelList implements `__add__` we can do the following:

```python
ImmediateJobs() + ScheduledJobs()
ImmediateJobs() + []
```

Both of these call the `__add__` method of `ImmediateJobs`.

What we can’t do is this:
```python
[] + ScheduledJobs()
```

That tries to call the `__add__` method of list, which doesn’t know what
to do with an instance of `ModelList`.

The Pythonic way to deal with this is to implement `__radd__` (right
add) which is invoked when our instance is on the right hand side of the
addition operator.
2020-03-03 10:11:42 +00:00
Leo Hemsted
a3ccd9660b don't convert letter logo svgs to pngs
https://github.com/alphagov/notifications-template-preview/pull/371
stops using png logos when rendering png previews of templated letters.

when that is merged we no longer need to convert to pngs when we upload
a new letter logo.
2020-03-02 18:00:26 +00:00
Chris Hill-Scott
57c5c298d4 Add govuk-body class to paragraphs
per https://design-system.service.gov.uk/styles/typography/#paragraphs
2020-03-02 17:35:13 +00:00
Chris Hill-Scott
3cfceda0b8 Merge pull request #3326 from alphagov/remove-coverage
Tidy up command that runs unit tests
2020-03-02 10:52:09 +00:00
Chris Hill-Scott
5f4d2ed2e2 Merge pull request #3336 from alphagov/org-usage-tweaks
Tweak the appearance of the org usage page
2020-03-02 10:51:35 +00:00
Chris Hill-Scott
39c3d14350 Fix incorrect numbers for free text message count
We were looking at the wrong field in the JSON.
2020-02-28 16:38:35 +00:00
Chris Hill-Scott
d2d5510376 Add a search as you type form
As in other places where we have a long list of things where you might
want to jump to a specific thing. We use this pattern where there are
more than 7 things, per the magical number 7[1]

1. https://en.wikipedia.org/wiki/The_Magical_Number_Seven,_Plus_or_Minus_Two
2020-02-28 16:24:42 +00:00
Chris Hill-Scott
74dbd2b439 Add some more spacing below service name
The service name is often about 1/3 of the width of the page, and was
awkwardly grouping with the numbers in the text messages column.

This commit adds a bit more vertical space to pull the two further apart
which makes it easier to scan down the page.
2020-02-28 15:43:01 +00:00
Chris Hill-Scott
3c140ecdbf Add some subheadings
This helps differentiate the totals from the rest of the page, and it
harmonises it with the per-service usage page.
2020-02-28 15:41:59 +00:00
Chris Hill-Scott
a5ec009fd0 Merge pull request #3335 from alphagov/style-org-usage
Style the organisation usage page
2020-02-28 14:53:33 +00:00
Chris Hill-Scott
5a8d8fcdcf Merge pull request #3334 from alphagov/govuk-link-returned-letters
Fix wrong link colour on returned letters
2020-02-28 14:53:24 +00:00
Chris Hill-Scott
038c1c36f1 Fix wrong link colour on returned letters
Underscore meant it wasn’t getting the Design System link styles.

Missing class meant it was going purple once clicked.
2020-02-28 14:06:20 +00:00
Chris Hill-Scott
fa6a59915c Make each service name a <h2> 2020-02-28 13:43:17 +00:00
Chris Hill-Scott
519176f903 Use new grid classes from GOV.UK frontend 2020-02-28 13:40:07 +00:00
Chris Hill-Scott
408fcf05eb Add financial year filter
Otherwise this page will become less useful come April 1st…
2020-02-28 12:46:50 +00:00
Chris Hill-Scott
df5b2f00ef Add some spacing and keylines
Just to make the page easier to scan.
2020-02-28 12:18:23 +00:00
Chris Hill-Scott
bd9e127e57 Sum up usage for an whole organisation
We invoice on a per organisation basis, so it’s useful to know the per
organisation figures without needing to do any spreadsheet-fu.
2020-02-28 12:17:49 +00:00
Chris Hill-Scott
4d89d36847 Use big numbers for organisation usage
This is the pattern we use to display counts of things on the dashboard
and usage pages. It does some nice stuff like dealing with
comma-separating and formatting monetary amounts.

This commit also adds some logic to show the free allowance used if the
service hasn’t spent anything on text messages yet.
2020-02-28 12:16:33 +00:00
karlchillmaid
d4f6be701b Merge pull request #3313 from alphagov/update-upload-a-letter-content
Update upload a letter content
2020-02-28 11:26:43 +00:00
karlchillmaid
ba40f5b629 Fix letter spec link 2020-02-28 09:57:31 +00:00
Chris Hill-Scott
63f704c64f Fix accidental switch of previous and next
We were showing the previous page link when we meant to show the next
page link because the variables were swapped round in the code.
2020-02-27 17:51:01 +00:00
Chris Hill-Scott
e638b68af1 Add some more content to the empty page state
We think that we need to make it clear what the difference between
uploading a letter and uploading a spreadsheet is, and where you go to
do each.

We get some confusion about uploading being behind the ‘Send’ button on
the template page. There’s some concern that launching the upload page
will increase this confusion, unless we head it off with some messaging.
2020-02-27 17:36:31 +00:00
Chris Hill-Scott
ee8436ca85 Differentiate between different kinds of uploads
Knowing what kind of upload a thing is is useful.

And the information that is useful to show about each upload depends on
what kind of upload it is.
2020-02-27 17:34:51 +00:00
Chris Hill-Scott
2770e5013b Use smaller heading size for Uploads
Because it’s a top-level page without a back link it should have a
smaller heading size.
2020-02-27 17:34:46 +00:00
Chris Hill-Scott
eed5e0fdd7 Combine scheduled and already-sent jobs
I’m hoping that if I can design something that clearly differentiates
them then we won’t need to do so by putting them in separate tables,
which then need labelling, which would clutter up the page.
2020-02-27 17:33:41 +00:00
Chris Hill-Scott
0d4c97e64a Make sticky footer clear the previous/next nav
If we don’t do this then the sticky footer only takes up half the width
of the column.
2020-02-27 16:46:52 +00:00
Chris Hill-Scott
f9310dd2ed Use template_type property directly from API
It’s included in the job/upload response now[1]. So we don’t need to
fetch the template every time we want to access it.

1. https://github.com/alphagov/notifications-api/pull/2728
2020-02-27 16:46:51 +00:00
Chris Hill-Scott
414dee7002 Fix tests 2020-02-27 16:29:14 +00:00
karlchillmaid
117c18d3cf Update guidance 2020-02-27 16:27:30 +00:00
karlchillmaid
fdf07eb9c5 Update content 2020-02-27 16:26:15 +00:00
karlchillmaid
1fd0ead7e5 Update formatting 2020-02-27 16:24:56 +00:00