Commit Graph

10778 Commits

Author SHA1 Message Date
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
Tom Byers
ff53b9f34f Move back-link component from GOVUK Frontend
`node_modules` isn't included on live so all
macros need copying across into the repo' code.

This adds the back-link component to the list of
macros to be copied across in `gulpfile.js`.

It also adds the files copied across as a result
of running the frontend build into the repo'.
2019-12-03 13:13:18 +00:00
karlchillmaid
0a664f00bd Add contraction 2019-12-03 11:26:04 +00:00
karlchillmaid
5660c1b584 Update contraction 2019-12-03 11:24:35 +00:00
Tom Byers
44492abef7 Add Sass for GOVUK Frontend backlink 2019-12-03 09:59:32 +00:00
Tom Byers
d6f68f3680 Merge pull request #3214 from alphagov/split-gitignore-and-cfignore
Split gitignore and cfignore
2019-12-02 17:24:37 +00:00
Tom Byers
c1de4cc51b Explain .gitignore & .cfignore differences 2019-12-02 17:19:08 +00:00
Tom Byers
ccbad51ebd Move app/.gitignore entries to .gitignore
`app/.gitignore` existed to list anything that we
wanted ignored from the repository but not listed
in `.cfignore` (which just symlinked the
`.gitinore` at the root).

Now `.gitignore` and `.cfignore` are split, this
is no longer necessary.
2019-12-02 17:00:55 +00:00
Tom Byers
200a9d479a Add .pytest_cache to the deploy-exclude list 2019-12-02 17:00:55 +00:00
Tom Byers
3e1af6078f Remove app/templates/vendor from .cfignore
It's created by `npm run build` so needs to be
part of the code zipped up by
`make build-paas-artifact`.
2019-12-02 16:58:42 +00:00
Tom Byers
73b9807102 Replace .cfignore symlink with .gitignore
Instead of having `.cfignore` as a symlink to
`.gitignore`, have them as separate files,
with the same content.
2019-12-02 16:23:02 +00:00
Tom Byers
fcb806f380 Merge pull request #3212 from alphagov/remove-templates-vendor-folder
Add templates vendor folder to gitignore & delete
2019-12-02 15:17:21 +00:00
Tom Byers
c3d055a140 Add templates vendor folder to gitignore & delete
It was added by mistake in this commit:

3c208a8b11
2019-12-02 15:03:56 +00:00
Leo Hemsted
c0056c1d14 Merge pull request #3211 from alphagov/flake8-fix
Flake8 fix
2019-11-29 15:49:56 +00:00
Leo Hemsted
6ad9ec8d21 flake8 2019-11-29 15:25:37 +00:00
Leo Hemsted
d59c3abf2b combine flake8 configs
also, importantly, remove the `select` config, as this implicitly
ignores every other warning type
2019-11-29 15:25:37 +00:00
Chris Hill-Scott
5f9323f863 Merge pull request #3202 from alphagov/more-letter-validation-clean-up
Clean up more things to do with letter validation
2019-11-29 15:24:25 +00:00
Tom Byers
c30b5a25d4 Merge pull request #3207 from alphagov/fix-tests-console-output
Fix console output for JS tests
2019-11-28 16:07:15 +00:00
Tom Byers
5c11d89792 Fix console output for JS tests
The string identifying the tests run shouldn't
include their status, that's added by
`display_result`.
2019-11-28 15:26:24 +00:00
David McDonald
19bafd9caf Merge pull request #3206 from alphagov/healthcheck
Change http healthcheck invocation timeout to 10 seconds
2019-11-28 13:41:14 +00:00
David McDonald
f8dc3936fc Change http healthcheck invocation timeout to 10 seconds
We have seen multiple issues in production where healthchecks have
failed for our applications as responses have taken longer than 1 second
(the default health check invocation timeout) to respond and this has
marked the instance as unhealthy and restarted it. This restarting has
dropped inflight requests and caused 502s for our users.

We are not entirely sure why the healthchecks sometimes take longer than
expected. One hypothesis is large amounts of traffic slowing response
times of the apps, however we have also seen contradictory evidence
where health checks can still fail even when apps are getting very low
levels of traffic. There could also be an issue with the actual
healthcheck process itself.

Regardless of the cause, we think by changing the timeout to 10 seconds
it might stop our apps being restarted when they are infact still
healthy enough to serve requests to users. Further investigation will
also be done by the PaaS team into the health check process itself to
see if this throws any more light on the situation.

10 seconds was a fairly abritary choice that was significantly longer
than 1 second.
2019-11-28 13:35:54 +00:00
Tom Byers
b24a59f3ad Merge pull request #3205 from alphagov/more-fixes-for-move-to-govuk-frontend
More fixes for move to govuk frontend
2019-11-28 11:57:43 +00:00
Tom Byers
a4482ee734 Set font-family on buttons to NTA temporarily
Until we change all the buttons to use GOVUK
Frontend we need this CSS to give them the New
Transport (NTA) font-family.

Was previously in GOVUK Template CSS but missed
out from being moved across when this was removed:

f164b2825b/source/assets/stylesheets/_basic.scss (L6)
2019-11-28 11:38:45 +00:00
Tom Byers
f05f7b2661 Return main content area to position: static
Was set to `position: relative` to solve an issue
on the produce page. This introduced other issues
with the sticky JS and the fix is only needed for
the product page so this moves it to that CSS.

The previous fix was applied here:

9441dd0b37
2019-11-28 11:32:32 +00:00
Tom Byers
dea3f296ad Replace js-footer class on global footer
Was on old footer from GOVUK Template but not
moved across when we adopted the GOVUK Frontend
footer component.
2019-11-28 11:32:11 +00:00
Tom Byers
512094c52c Merge pull request #3204 from alphagov/replace-removed-govuk-template-anchor-focus-styles
Replace GOVUK Template anchor focus styles
2019-11-27 16:54:18 +00:00
karlchillmaid
133e75192a Merge pull request #3203 from alphagov/update-purchase-order-information
Update purchase order content
2019-11-27 16:47:38 +00:00
Tom Byers
fe3baa25c2 Replace GOVUK Template anchor focus styles
Not moved across when the GOVUK Template CSS was
removed.
2019-11-27 16:42:07 +00:00
karlchillmaid
317227e95b Update content 2019-11-27 16:35:57 +00:00
Chris Hill-Scott
37d844ba12 Clean up more things to do with letter validation
Missed these in https://github.com/alphagov/notifications-admin/pull/3201
2019-11-27 16:25:25 +00:00
Chris Hill-Scott
41113081f3 Merge pull request #3201 from alphagov/remove-letter-validation-preview
Remove the letter validation preview endpoints
2019-11-27 15:53:27 +00:00