Commit Graph

9521 Commits

Author SHA1 Message Date
Katie Smith
e2099d6170 Update a couple more old grid styles 2020-03-06 11:11:41 +00:00
Katie Smith
66006e24b0 Stop importing layout from GOV.UK Elements 2020-03-06 11:11:41 +00:00
Katie Smith
bc83ff6c09 Replace $gutter with govuk-spacing function
Replaced `$gutter` and similar variables such as `$gutter-half` with the
`govuk-spacing()` static spacing function. This uses `govuk-spacing()`
instead of `$govuk-gutter` because `$govuk-gutter` should only be used
for the gaps in between grid columns and we were mostly using `$gutter`
to add more space around elements.

There are other places in the SCSS files where we had hardcoded a
measurement in px which could be replaced with `govuk-spacing`, but this
commit only replaces the existing uses of `$gutter`.
2020-03-06 11:11:41 +00:00
Katie Smith
a85f7fa2c1 Replace the .column-... classes in _grids.scss
We had 7 classes in _grids.scss named `.column-...` which were being
used to give a certain column width. These worked by using `@include
grid column()`, which is now deprecated.

`.column-whole` and `.column-three-quarters` can be removed and replaced
with `govuk-grid-column-full` and `govuk-grid-column-three-quarters`
respectively. The other column classes don't have a direct replacment in
GOV.UK Frontend. To get round this, we overwrite the `$govuk-grid-width`
SASS map in `extensions.scss` to add in extra widths, then use this with
the `govuk-grid-column` mixin to create new classes in for our custom
widths in `_grids.scss`
2020-03-06 11:11:41 +00:00
Katie Smith
e2952e6a7a Replace site-width-container with govuk-width-container 2020-03-06 11:11:41 +00:00
Katie Smith
6f8cc1f003 Remove unecessary id and class from product page
Stopped using `#content` on the product page - this was from GOV.UK elements.
Also removed the `override-elements-content` class since the page looks
the same without it.
2020-03-06 11:11:41 +00:00
Katie Smith
15f9eeeaf2 Replace column-half with govuk-grid-column-one-half 2020-03-06 11:11:41 +00:00
Katie Smith
b0d714f313 Replace column-one-quarter with govuk-grid-column-one-quarter 2020-03-06 11:11:41 +00:00
Katie Smith
bf949044bc Replace column-two-thirds with govuk-grid-column-two-thirds 2020-03-06 11:11:41 +00:00
Katie Smith
07bcb4220e Replace column-one-third with govuk-grid-column-one-third
Also replaces `column-third`, with `govuk-grid-column-one-third`, since
this appears to be an alias of `column-one-third`.
2020-03-06 11:11:41 +00:00
Katie Smith
076d99c9dc Replace column-full with govuk-grid-column-full 2020-03-06 11:11:41 +00:00
Katie Smith
b9b9a138f9 Replace grid-row with govuk-grid-row
Replaced all instances of `grid-row` in the HTML and JavaScript with
`govuk-grid-row`, which is the new GOV.UK Frontend class.
2020-03-06 11:11:41 +00:00
Chris Hill-Scott
be48f3bac5 Merge pull request #3354 from alphagov/recently-not-yet
Say ‘recently’ not ‘yet’ because jobs aren’t forever
2020-03-06 10:35:59 +00:00
Chris Hill-Scott
cfe18dd52a Merge pull request #3351 from alphagov/pluralise-org-usage
Don’t pluralise counts of one on org usage page
2020-03-06 09:52:20 +00:00
Chris Hill-Scott
3c3355536e Say ‘recently’ not ‘yet’ because jobs aren’t forever
We’re going to change the jobs page so that it only shows jobs within
the last n days (your data retention)<sup>1</sup>.

This will match how long uploaded letters stick around for.

Therefore it’s not accurate to say ‘yet’, because that implies all-time.
Since the data retention for different channels could be different it’s
hard and maybe unhelpful to give an exact time period. ‘Recently’ is
content we used here before, but then changed.

1. https://www.pivotaltracker.com/story/show/171623239
2020-03-06 09:49:04 +00:00
Leo Hemsted
dff182b24f Merge pull request #3352 from alphagov/fix-highlighting-bug
ensure highlighting div size always matches the relevant textarea
2020-03-05 16:46:18 +00:00
Leo Hemsted
1558d05be7 ensure highlighting div size always matches the relevant textarea 2020-03-05 16:38:26 +00:00
Chris Hill-Scott
e8c3a49812 Don’t pluralise counts of one on org usage page
1 email sent.

1 free text message sent.
2020-03-05 14:40:32 +00:00
Pea M. Tyczynska
4b95fecd4f Merge pull request #3349 from alphagov/fix-logo-upload
Fix logo upload - we need to rewind the bytestream after we read it
2020-03-04 17:32:15 +00:00
Pea Tyczynska
8a4618ffe0 Fix logo upload - we need to rewind the bytestream after we read it 2020-03-04 17:26:19 +00:00
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
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
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