Commit Graph

9406 Commits

Author SHA1 Message Date
karlchillmaid
a33892bded Change 'forgot' to 'forgotten' 2020-02-24 11:59:43 +00:00
karlchillmaid
a51cc5d4b5 Change 'forgot' to 'forgotten' 2020-02-24 11:59:07 +00:00
karlchillmaid
11808cbf88 Change 'forgot' to 'forgotten' 2020-02-24 11:57:48 +00:00
Tom Byers
ae1b2d4c63 Merge pull request #3303 from alphagov/convert-all-links-to-govuk-frontend
Convert all links to govuk frontend
2020-02-24 10:30:54 +00:00
Tom Byers
97172cca30 Merge branch 'master' into convert-all-links-to-govuk-frontend 2020-02-24 10:12:58 +00:00
karlchillmaid
95b41b6bfa Merge pull request #3317 from alphagov/remove-links-from-get-started
Remove links to templates and permissions
2020-02-24 10:04:11 +00:00
karlchillmaid
853b2b137c Remove links to templates and permissions 2020-02-24 09:36:23 +00:00
Tom Byers
f90b6b46e6 Make links in validation summaries red 2020-02-21 15:50:28 +00:00
Chris Hill-Scott
0c8c4b80c9 Merge pull request #3319 from alphagov/fix-guidance-service-links
Fix links to current service pages from guidance
2020-02-21 14:25:12 +00:00
Tom Byers
fa03b786dc Change how link is referenced in user profile test
Co-Authored-By: Katie Smith <klssmith@users.noreply.github.com>
2020-02-21 14:05:34 +00:00
Tom Byers
1513cfa9e6 Update links missed in previous work
Includes those in:
- the static 5xx error page
- validation messaging
- guidance page about trial mode
- links used in tests

Issues raised in https://github.com/alphagov/notifications-admin/pull/3303#issuecomment-589572715
2020-02-21 13:59:04 +00:00
Leo Hemsted
106228ed09 Merge pull request #3320 from alphagov/remove-generic-400-error-page
remove admin 400 error handler
2020-02-21 13:08:53 +00:00
Chris Hill-Scott
60ea2eaa40 Merge pull request #3297 from alphagov/returned-letters-on-dashboard
Put a count of recently returned letters on the dashboard
2020-02-21 12:37:35 +00:00
Leo Hemsted
d83250c7c2 remove the generic 400 error page handler
it just shows a h1, so isn't helpful for people. We can re-use the 500
error page, which includes instructings "Try again later" and
instructions on what to do next (check the status page, email notify
support).

this required refactoring to ensure we can show the 500 error page while
still returning the required status code
2020-02-21 11:58:37 +00:00
Chris Hill-Scott
a5b7e3b93a Add Design System link classes
Co-Authored-By: Tom Byers <tombaromba@gmail.com>
2020-02-21 11:37:01 +00:00
Chris Hill-Scott
da4ff4b448 Add Design System class to remove visited state from links
Co-Authored-By: Tom Byers <tombaromba@gmail.com>
2020-02-21 09:29:37 +00:00
Leo Hemsted
f64f5725d1 Treat 400s from the api as internal server errors
if we expect a 400 (for example, the api returns 400 if the service name
is already in use) then we should handle that from the view function so
we can correctly display a relevation error message to the user. But if
it returns a 400 that we didn't expect (for example, because we sent
variables of the wrong type through to an endpoint with a schema), then
that is a bug that we should fix as any other raised exception. By
treating it as a 500 we encourage users to report it to us, and also
will get an alert email
2020-02-20 17:51:05 +00:00
Chris Hill-Scott
75927a8d05 Fix links to current service pages from guidance
This wasn’t working because:
- macros don’t have access to `current_service` from within their scope
- there were no tests for this behaviour
2020-02-20 15:13:12 +00:00
Chris Hill-Scott
e49d665c44 Merge pull request #3304 from alphagov/day-of-week-on-letter-delivery
Put day of week on estimated letter delivery page
2020-02-20 14:00:43 +00:00
Chris Hill-Scott
7e82e86092 Merge pull request #3318 from alphagov/back-link-received-text-messages
Add a back link to the received messages page
2020-02-20 14:00:35 +00:00
Tom Byers
7ed5c46f82 Merge pull request #3315 from alphagov/send-generic-title-to-google-analytics
Make analytics send the same title for all pages
2020-02-20 13:09:39 +00:00
Chris Hill-Scott
1dcbf7755a Add a back link to the received messages page
It’s not a top level page (sits within the dashboard) so it should link
back to its parent page.
2020-02-20 12:12:53 +00:00
Chris Hill-Scott
0e8143da04 Remove ‘originally’ from returned letters report
We should remove Originally on the individual report pages.
It sounds like we're saying the letter has been sent more than once
since that date.

The dictionary definition for 'originally' as an adverb says:
> used to describe the situation that existed at the beginning of a
> particular period or activity, especially before something was changed

Examples given include:
> The book was originally published in 1935.
2020-02-20 11:58:58 +00:00
Chris Hill-Scott
678c3df53c Add some context to the list of reports
We reckon people need some context/expectation setting about what the
date of the report is.
2020-02-20 11:58:58 +00:00
Chris Hill-Scott
d00e37541c Make dashboard navigation active for returned letters 2020-02-20 11:58:57 +00:00
Chris Hill-Scott
64074eed03 Say ‘1 hour/month ago’ not ‘an hour/a month ago’
I think it read better without the indefinite article when it’s, for
example, placed alongside messages that read ‘2 hours ago’.
2020-02-20 11:58:57 +00:00
Chris Hill-Scott
9590643527 Use humanize for fuzzy time differences
It seems to do a bit better than ago (e.g. 4 months vs 146 days), and
looks like it’s maintained more often.
2020-02-20 11:58:57 +00:00
Chris Hill-Scott
f369f76ae4 Count recently-returned letters on the dashboard
Currently you have no way of getting to the returned letter page. This
commit adds a link to it from the dashboard, following the pattern of
the new received text messages banner.
2020-02-20 11:58:57 +00:00
Chris Hill-Scott
74e70ed8bc Refactor summaries into model
This lets us encapsulate some of the logic that’s currently cluttering
up the view/template layer.
2020-02-20 11:58:57 +00:00
Tom Byers
8a98c73b08 Make analytics send the same title for all pages
Sets it on the tracker which means this value gets
sent for each:
- pageview
- event

See: https://developers.google.com/analytics/devguides/collection/analyticsjs/pages

We can only test that this has been set on the
tracker, not how that effects what is sent to GA,
in the JS tests.

This change has been tested in-browser with the
Chrome Analytics Debugger. This revealed the
contents of what is in the beacon sent to GA and
allowed confirmation the title was being set
correctly.

See: https://chrome.google.com/webstore/detail/google-analytics-debugger/jnkmfdileelhofjcijamephohjechhna/related
2020-02-20 11:46:19 +00:00
Tom Byers
5459dd8c13 Fix issues raised on pull request
Includes:
- make 'remove team member' link, on edit member
  permissions page, destructive
- convert missed links on /features pages
- convert missed links on /using-notify/guidance and sub pages
- give links in browse-lists back their size and
  weight (needed for lists of live and trial
  services on Platform Admin)
- give links on Platform Admin inbound numbers
  page back their size and weight
- update links in JS tests
2020-02-20 09:19:06 +00:00
Tom Byers
12c30c47a5 Fix tests broken by changes to HTML 2020-02-20 09:11:26 +00:00
Tom Byers
6d349b514c Remove all redundant link CSS
Giving all links the GOVUK Frontend classes, and
the new `govuk-link--destructive` class, means
some styles are already applied.

This strips out those styles.

Note: there's still a good amount of styling, most
of which is to make the focus styles specific to
the space the link is in. These will need
reviewing when GOVUK Frontend is bumped past
version 3 as this brings in new focus styles.
2020-02-20 09:11:26 +00:00
Tom Byers
b5af89fe02 Remove style for deleted elements
The `.global-cookie-message` and `.footer-nav`
classes were for elements in the govuk_template.
This used to be the base layout for this app but
was changed here:

https://github.com/alphagov/notifications-admin/pull/3198
2020-02-20 09:11:26 +00:00
Tom Byers
548265dbe4 Convert warning links to govuk-link--destructive
Converts links in the following:
- the page-footer component
- the table component
- the browse-list component
- the notification status, when reporting failures
- validation messaging in the whitelist page
2020-02-20 09:11:26 +00:00
Tom Byers
378c26ee2a Add styles for destructive links
This colour is used in a few places so worth
making into its own block and classes.

Note: this establishes a
`app/assets/stylesheets/local` folder for any Sass
files whose names clash with files from vendored
libraries.

`_typography.scss` already exists in GOV.UK
Elements Sass.

This will no longer be needed when GOV.UK Elements
is gone and GOV.UK Frontend is at version 3, where
all its folders are in a `govuk` folder.
2020-02-20 09:11:26 +00:00
Tom Byers
c51d414197 Replace links in navigation
Includes:
- removing all styling of those links
  outside of GOV.UK Frontend (except for a few fixes
  due to their interaction with our design)
- bringing together some duplicate styles into one
  block
- changing how links are marked as selected, now
  they have multiple classes

Fix Sass-lint error in navigation.scss
2020-02-20 09:11:26 +00:00
Tom Byers
a61856ffe1 Replace browse-list links 2020-02-20 09:11:26 +00:00
Tom Byers
5e07ef484f Add font-smoothing as global style
Making all links GOV.UK Frontend styled means some
will sit in content that doesn't use the GOV.UK
Frontend font styles yet.

This applies the font-smoothing that comes with
those styles to all text so links do not look out
of place on browsers that support it.

Note: font-smoothing was part of the GOV.UK
Template styles which have now been removed:

https://github.com/alphagov/govuk_template/blob/master/source/assets/stylesheets/_basic.scss#L68
2020-02-20 09:11:26 +00:00
Tom Byers
c094f31b2b Update links in JavaScript 2020-02-20 09:11:26 +00:00
Tom Byers
7ec191bbac Remove global link styles
All links, that need it, now have the GOVUK
Frontend link class so we no longer need this
CSS.
2020-02-20 09:11:26 +00:00
Tom Byers
cd36182ea6 Update all links to use GOVUK Frontend style
Includes:
- turning off :visited styles to match existing
  design
- swapping heading classes used to make links bold
  for the GOVUK Frontend bold override class
- adding visually hidden text to some links to
  make them work when isolated from their context

We may need to revisit whether some links, such as
those for documentation and features, may benefit
from having some indication that their target has
been visited.
2020-02-20 09:11:26 +00:00
Chris Hill-Scott
46e16c64fc Say ‘Uploaded’ for one-off precompiled letters
This calls back to what the user has actively done. _Provided as a PDF_
is more passive and suitable for PDF letters sent using the API.
2020-02-19 17:18:03 +00:00
Chris Hill-Scott
904007201f Make date of sending relative
This is a friendlier and better way of showing dates anywhere except in
a report which might be archived and referred back to later.

Bit trickier to implement here because a dat requires ‘on’ beforehand,
but we don’t say ‘on today’ in English.
2020-02-19 17:11:31 +00:00
karlchillmaid
5ba5ee2502 Merge pull request #3302 from alphagov/guidance-simplify-numbered-lists
Guidance simplify numbered lists
2020-02-19 16:31:31 +00:00
Chris Hill-Scott
8a91068682 Merge pull request #3312 from alphagov/revert-3311-revert-3295-restyle-template-stats
Revert "Revert "Restyle template statistics and received text messages""
2020-02-19 13:17:56 +00:00
Chris Hill-Scott
46a4e1c612 Add a macro for generating current service links
This is a convenient way of being able to link into pages of the the app
from guidance. It handles the case where the current service is not
known, either because the user hasn’t chosen one, or because they’re not
signed in.

This commit also cleans up some unused Jinja imports.
2020-02-19 08:22:45 +00:00
Chris Hill-Scott
3bbd5381c6 Revert "Revert "Restyle template statistics and received text messages"" 2020-02-18 16:16:51 +00:00
Pea M. Tyczynska
a8ca8c1835 Merge pull request #3311 from alphagov/revert-3295-restyle-template-stats
Revert "Restyle template statistics and received text messages"
2020-02-18 15:04:59 +00:00
Pea M. Tyczynska
e97f9f7fa4 Merge pull request #3310 from alphagov/fix-reset-password
Fix reset password flow
2020-02-18 15:03:11 +00:00