Commit Graph

8858 Commits

Author SHA1 Message Date
Chris Hill-Scott
1925f78cec Merge pull request #3226 from alphagov/strip-whitespace-sms
Strip extra newlines from text messages
2019-12-19 13:20:56 +00:00
Chris Hill-Scott
b9ba95daf2 Strip extra newlines from text messages
Brings in:
- [x] https://github.com/alphagov/notifications-utils/pull/680
2019-12-18 10:33:18 +00:00
Chris Hill-Scott
21b85d7343 Merge pull request #3223 from alphagov/tell-api-users-they-can-search-by-reference
Tell API users they can search by reference
2019-12-17 11:32:31 +00:00
Chris Hill-Scott
4da9c44919 Tell users that they can search by reference
Users who have an API integration (and therefore have a way of passing
in a reference for each notification) can now search by that reference
(see https://github.com/alphagov/notifications-api/pull/2682)

This commit changes the label on the search box to tell these users that
this is possible, without changing the label for users without an API
integration, who might get confused by what ‘reference’ means.

It also makes the label consistently say ‘email address or phone number’
(ie email address is first) because this is our content style.
2019-12-17 10:19:19 +00:00
Tom Byers
fe0ad50466 Merge pull request #3224 from alphagov/revert-3209-add-govuk-frontend-details
Revert "Add GOVUK Frontend details component"
2019-12-16 16:28:00 +00:00
Tom Byers
de6281bc0e Revert "Add GOVUK Frontend details component" 2019-12-16 16:20:03 +00:00
Tom Byers
60fe9d3400 Merge pull request #3209 from alphagov/add-govuk-frontend-details
Add GOVUK Frontend details component
2019-12-16 15:22:15 +00:00
Chris Hill-Scott
9c47a2ce8f Merge pull request #3222 from alphagov/fix-days-provider-history
Fix off-by-one dates on provider history
2019-12-13 13:29:56 +00:00
Chris Hill-Scott
581296b95e Fix off-by-one dates on provider history
We chunk history entries by their YYYY-MM-DD date representation to
display them day-by-day.

However trying to convert a YYYY-MM-DD string into a timestamp is
unpredictable, and was causing our dates to be one day out (probably
because of midnight/daylight savings/general datetime horrors).

This commit changes the code to do the same thing as the history page,
which is look at the `updated_at` field on the first entry to get a
datetime object and from that the formatted date we show in the headings
on the page.
2019-12-13 13:20:56 +00:00
Chris Hill-Scott
1e233f1167 Merge pull request #3217 from alphagov/provider-priority
Display and set provider priority in a non-independent way
2019-12-13 10:19:44 +00:00
Tom Byers
96bc4d2fd7 Remove redundant details polyfill
We're now using the GOV.UK Frontend one.
2019-12-13 09:50:04 +00:00
Tom Byers
fba4c173ff Correct platform admin details summary text 2019-12-13 09:41:34 +00:00
Chris Hill-Scott
1bd27b97f6 Remove change link from international SMS provider
We don’t want to set it independently from the other SMS providers.
2019-12-12 14:34:04 +00:00
Chris Hill-Scott
292b7df5a8 Add named variables for clarity 2019-12-12 14:16:38 +00:00
Chris Hill-Scott
b1e9dd3fb2 Remove redundant class 2019-12-12 13:58:57 +00:00
Chris Hill-Scott
57a602c2ab Add temporary link to change priority page
Lets you get to the new page without having to think about the design
of the existing index page.
2019-12-11 10:17:48 +00:00
Chris Hill-Scott
8122fa1d5d Simplify and add tests
Makes these assumptions:
- we don’t care about history before 29th November 2019 at 11am (this
  is when priority started to mean a proportion rather than a ranking)
- the priority of the second provider will always be the inverse of
  the first provider

Which means the code is a lot simpler/actually does what you’d expect.
2019-12-11 10:17:46 +00:00
Chris Hill-Scott
5233ee4bd9 Add a form to set priority of top 2 providers
Their priority should always add up to 100%. Currently we have to ensure
this by hand. Adding this form means there’s no way to not set their
combined priorities to 100%. And it’s a bit more of an intuitive UI than
two textboxes on separate pages.
2019-12-11 10:17:45 +00:00
Chris Hill-Scott
16ebdfeb8b Add page showing priority of two SMS providers
It’s not very useful to know the priority of one provider without
knowing the other. And these pages were never really designed, so they
weren’t super easy to understand anyway.

This commit adds a page that takes the first two text message providers
and shows their relative priority against each other.

It follows the design of the events page, as a pattern for showing a
log of historical events.
2019-12-11 10:17:44 +00:00
Leo Hemsted
9b12747bb4 Merge pull request #3221 from alphagov/add-word-template
add word doc template to upload page
2019-12-10 13:27:15 +00:00
Leo Hemsted
4186feda1b add word doc template to upload page
so that people can start to amend their word docs with more confidence.
2019-12-10 13:06:44 +00:00
Tom Byers
d0a492988d Remove mistakenly added .swp file 2019-12-09 16:24:48 +00:00
David McDonald
c8f92dd498 Merge pull request #3220 from alphagov/pipe-bug
Bump utils to 36.3.1
2019-12-09 15:54:00 +00:00
David McDonald
235378cec5 Bump utils to 36.3.1 2019-12-09 13:08:14 +00:00
David McDonald
0a66ad0b72 Merge pull request #3219 from alphagov/add-letters-to-uploads-page
Updated the uploads page to include letters.
2019-12-06 15:01:09 +00:00
Rebecca Law
673a0d64d0 Refactor mock_get_uploads to return more realistic data. 2019-12-06 13:22:25 +00:00
David McDonald
022c10c20c Merge pull request #3218 from alphagov/dev-antivirus-setting
Antivirus off for development by default
2019-12-06 11:49:48 +00:00
Rebecca Law
f9e01e0b45 Fix unit tests and put the antivirus check back in 2019-12-06 10:22:23 +00:00
Tom Byers
db3bcee236 Fix test broken by HTML changes on API page
I moved the meta for each message into the
`<h3>` in each `<summary>` to make the heading
unique. This broke the test.
2019-12-06 08:20:49 +00:00
Tom Byers
72b10950c4 Convert <details> on API page to macro HTML
The GOV.UK Frontend details component macro
  wraps its `<summary>` text in a `<span>`.

  We put a `<h3>` in the `<summary>` (actually valid
  use, based on the spec) so this breaks when the
  `<span>` wraps it.

  This converts the existing `<details>` tag to use
  all the class names the macro creates, but with
  all the `<summary>` contents in the `<h3>`.

  Also adds font-smoothing to the messages on the
  API page. This was previously set globally for
  all fonts in the GOV.UK Template CSS but is now
  just set for the New Transport 'nta' font.
  Included because the messages use the monospace
  font so don't have it by default.
2019-12-06 08:20:49 +00:00
Tom Byers
61eaad9a9f Update all, but one, <details> to component
Includes:

- in gulpfile.js:
  - add details macro to list of those copied from GOVUK Frontend
  - remove existing details polyfill
- convert all, but one, <details> tags to use GOVUK Frontend details component
- add jinja boolean filter to help setting 'open' attribute of <details> tags

Notes on the `<details>` not included in this:

The `<details>` used for notifications items on
the API integration page is not possible to
reproduce with the GOV.UK Frontend macro so I'm
splitting the resulting work out into it's own
commit.
2019-12-06 08:20:49 +00:00
Rebecca Law
833a5cad8f Updated the uploads page to include letters. Now the page shows uploaded letters plus jobs.
New units tests have not been written for this page because it is very like this will be refactor and probably a new template created for the page. Some design needs to go into this page.
But we needed something ready for user research.
2019-12-05 16:14:30 +00:00
David McDonald
ff9f12c4a7 Antivirus off for development by default
I have copied the approach we use in the API for this
2019-12-05 11:18:48 +00:00
karlchillmaid
cb7d0e3813 Merge pull request #3215 from alphagov/add-contraction-to-errors
Update error messages
2019-12-04 12:34:04 +00:00
karlchillmaid
7717d5131e Fix test content 2019-12-04 12:03:07 +00:00
karlchillmaid
bdde0daeec Fix test content 2019-12-04 12:01:26 +00:00
Leo Hemsted
2e108d1877 Merge pull request #3210 from alphagov/cookies
don't set cookies on letter preview pngs
2019-12-04 10:26:26 +00:00
Leo Hemsted
3be9150dcf change letter previews to be in the no_cookies blueprint
this blueprint should be applied to every endpoint that is loaded async
(as in via a src tag on an img, iframe, etc)
2019-12-03 17:06:15 +00:00
Leo Hemsted
72acc4ebdc add no_cookie blueprint
we have a hunch that some session related issues that we've seen over
the last few weeks might be related to weird race conditions where
cookies set by subresources (image previews of letters on the send flow)
arrive just as the img request is cancelled because the user has clicked
on a button to navigate to a new page, but still manage to set the
cookie? We're not entirely sure what's going on, but we've got a hunch
that not setting cookies on image fetches sounds sensible. Images are
always loaded as a subresource (ie: through a `src` tag in an html
element), so they should never need to change the cookies, so this seems
sensible. We've done this by creating a new blueprint that doesn't set
session.permanent, and doesn't call `save_serivce_or_org_after_request`
either.

cookies are sent back to the browser if:
`sesion.modified or (session.permanent and 'REFRESH_EVERY_REQUEST')`
(where the latter is a config setting).

Turning off REFRESH_EVERY_REQUEST (which is True by default) means that
we will only update the sesion if it's been modified. In practice,
literally every request is modified in the after_request handler
`save_service_or_org_after_request`. This is accidentally convenient,
as it guarantees that we'll still send back the cookie normally even
though refresh_every_request is disabled. Sending back the cookie
updates the expiry time (20 hours), so we need to keep doing this to
preserve existing session timeout behaviour.
2019-12-03 17:06:14 +00:00
Tom Byers
27119bc15b Merge pull request #3208 from alphagov/add-govuk-frontend-backlink
Use GOVUK Frontend component for all back-links
2019-12-03 15:24:08 +00:00
Pea M. Tyczynska
0d8824c3e9 Merge pull request #3193 from alphagov/validate-against-empty-messages
Validate CSVs against rows with empty messages
2019-12-03 14:12:04 +00:00
Leo Hemsted
0d0e060c9d Merge pull request #3216 from alphagov/welsh
Welsh characters
2019-12-03 13:37:32 +00:00
Pea Tyczynska
9e0c8167ee Content changes to error messages 2019-12-03 13:36:54 +00:00
Pea Tyczynska
64b35ba337 Add addtional test cases for row errors 2019-12-03 13:36:53 +00:00
Pea Tyczynska
f265dde8ab Validate CSVs against rows with empty messages 2019-12-03 13:36:41 +00:00
Tom Byers
6b0b0dd263 Change method of getting scrollTop
The current method reports `0` in Safari, whatever
the scroll position.

Some testing across our browser matrix shows:
1. this is also the case on IOS
2. browsers in the matrix all support
   `$(window).scrollTop()`

https://scroll-position-test-page.glitch.me/#results

This changes the method to use
`$(window).scrollTop()` instead.
2019-12-03 13:27:48 +00:00
Tom Byers
da414beab9 Update pricing page with full welsh alphabet for SMS
accented characters rather than special characters. call them accented
as special is a bit wishy washy and doesn't explain what they actually
are. "Diacritics" is correct but too technical. Accented characters is
a happy middle ground

screanreaders struggle to distinguish accented letters, capitals, etc,
so by having a simple two column layout we can have the full unicode
glyph name, removing any ambiguity.
2019-12-03 13:27:13 +00:00
Katie Smith
2794187e2d Bump utils to 33.3.0 2019-12-03 13:25:06 +00:00
Tom Byers
6b7e45ca1b Remove existing Sass for backlink 2019-12-03 13:13:21 +00:00
Tom Byers
e5bc33be84 Replace all existing back-links with component
Includes:
- all existing macros
- all imports for the existing macros
2019-12-03 13:13:21 +00:00