Commit Graph

7406 Commits

Author SHA1 Message Date
Tom Byers
3bc2fffbb2 Fix last date statement was updated
The accessibility statement was last updated on 9
October 2020 but without the 'last reviewed' date
being updated.

The changes were contained in this pull request
which was merged the same day and reached
production at 2.13pm.

https://github.com/alphagov/notifications-admin/pull/3677
2020-10-21 16:05:47 +01:00
David McDonald
2921c7302c Fix incorrect redis key deleting
We were trying to delete the old 'template-{template-id}' keys but
should have been deleting the new keys which have the service id as part
of the key name. This was causing the cache to not be correctly purged
when we did things like update sender names or set defaults. This should
fix it.
2020-10-21 11:14:23 +01:00
Chris Hill-Scott
882baadfe3 Merge pull request #3681 from alphagov/adjust-hierarchy-broadcast-page
Re-order hierarchy of information when viewing a single broadcast
2020-10-20 12:06:57 +01:00
Chris Hill-Scott
fcd34ef989 Merge pull request #3689 from alphagov/set-message-limit
Allow platform admins to change daily message limit
2020-10-20 10:34:58 +01:00
Chris Hill-Scott
268929a093 Allow platform admins to change daily message limit
One less thing we have to go into the database to do, and remember to
manually clear the cache for after.
2020-10-19 17:44:32 +01:00
Chris Hill-Scott
9b7357025c Make custom data retention look a bit nicer
This should make it easier to see what’s set without having to click
into the table.
2020-10-19 16:56:36 +01:00
Chris Hill-Scott
0e39208546 Associate start time with live
Start time is much more important than end time.
2020-10-19 14:29:50 +01:00
Chris Hill-Scott
91e74929eb Use live indicator on individual broadcast page
So the view of an individual broadcast feel consistent when coming from
the dashboard.
2020-10-19 14:29:09 +01:00
Chris Hill-Scott
ba535523df Move end time to bottom of page
End time is less important than the status of the broadcast, or when it
was started (eg when it was received by most people in the area).
2020-10-19 14:29:09 +01:00
Chris Hill-Scott
6937e06ad5 Move the ‘who did what’ stuff to the bottom
The most important part of the broadcast is what content was sent where
(and when).

This commit reduces the priority of the ‘meta’ information, like who
prepared and approved the broadcast. I also think that the ‘end’ time is
a lot less important than the start time, since most people will receive
the alert at or near to the start time.
2020-10-19 14:25:42 +01:00
Chris Hill-Scott
a43321cbb3 Swap order of message and areas
This then matches the order in which the message is drafted, first the
content, then the areas. It also matches the order we’re going to have
on the new dashboard.
2020-10-19 14:25:42 +01:00
Chris Hill-Scott
274eff5f25 Merge pull request #3680 from alphagov/show-broadcast-content
Show preview of content for broadcast messages and templates
2020-10-19 14:22:41 +01:00
Chris Hill-Scott
1f90e21354 Merge pull request #3685 from alphagov/remove-styleguide
Remove the styleguide
2020-10-16 11:45:29 +01:00
Chris Hill-Scott
13b63e1a24 Remove reference to styleguide from config
The styleguide no longer exists, so this variable isn’t referred to from
anywhere.
2020-10-16 10:29:26 +01:00
Pea Tyczynska
2bdecbca6f Remove unused textbox imports
When we converted textboxes on Notify to govuk-frontend design system
style with @tombye , we did not remove the imports.
This work is now done in this commit.

Some things that will still stay in our repo for now:

textbox macro in our components folder and associated css
textboxes which are really textarea fields (🤷 how do they work)
textboxes on the styleguide page

We should revisit this when we convert textarea fields
to govuk-frontend.
2020-10-16 10:23:45 +01:00
Chris Hill-Scott
43a27676cb Remove the styleguide
The idea was that this would be a place to document all the design
patterns used in Notify. However it hasn’t been kept up to date, and,
looking at the `git blame`[1] no new patterns have been added for 5
years.

I think it’s better to get rid of it than have to keep maintaining
something which is inaccurate.

1. 64aa0d359c/app/templates/views/styleguide.html
2020-10-16 10:14:23 +01:00
Chris Hill-Scott
e2f16e414d Style areas on dashboard the same as alert preview
Our style for areas is pale blue background with black keylines or bold
black text.

This commit makes the display of area names on the dashboard consistent
with that visual style.

This also means that we’re not truncating the list of areas, which is
appropriate because no one area is more important than any of the
others.
2020-10-14 13:22:00 +01:00
Chris Hill-Scott
5c9a886edc Preview content as hint for broadcast templates
Broadcast services only have broadcast templates. But we show the
template type under the name of the template. This is redundant. It
would be better to preview the content of the template instead.

This then makes the templates page consistent with the dashboard.

Depends on:
- [ ] https://github.com/alphagov/notifications-api/pull/2996
2020-10-14 13:21:19 +01:00
Chris Hill-Scott
8dae4f771a Show the content of the alert on the dashboard
The content is as important as which areas you’ve sent the broadcast to.
2020-10-14 13:21:19 +01:00
Chris Hill-Scott
0cd08a94ff Rename dashboard to ‘current alerts’
The dashboard for normal services is quite general, because it tells
you a bit about channels, templates and spend.

What is now the dashboard for broadcast services is much more specific,
therefore less like a dashboard. We can reflect this by giving it a more
specific name. This should reduce the amount of navigation surfing
people need to do in order to find the thing they’re looking for.
2020-10-13 14:47:27 +01:00
Chris Hill-Scott
698f98389c Remove previous broadcasts from the dashboard
Since they have their own page now they don’t need to also appear on the
dashboard.
2020-10-13 14:47:10 +01:00
Chris Hill-Scott
f0220fa9fb Make a separate page for previous alerts
Previous alerts are much less important than ones that are live or
waiting for approval.

Therefore we can make the dashboard more focused by moving previous
alerts to their own page.
2020-10-13 14:45:08 +01:00
Chris Hill-Scott
8ff9ec6d97 Replace generated content with proper heading
Brings in https://github.com/alphagov/notifications-utils/pull/797 but
adapts the CSS so nothing changes visually
2020-10-12 15:55:30 +01:00
Chris Hill-Scott
3f338d45ca Rename CSS classes for consistency
This prefixes everything to do with areas/the map with `area-list`, so
from looking at one element you know which `.scss` file will contain the
relevant code.
2020-10-12 15:53:09 +01:00
Chris Hill-Scott
d3a599a3d5 Adjust spacing and border on details map
We hide the map inside a details element.

Because the map has such a strong shape I don’t think it needs the grey
border to contain it. This commit removes the border, and adjusts the
spacing to group things by proximity alone.

By removing the border and associated gutter we can give more space to
the map, and make the page look less busy.
2020-10-12 15:53:09 +01:00
Chris Hill-Scott
d7d113090c Restyle the broadcast message preview
The preview of the broadcast message, with the 2px thick black lines no
longer matched the style of the area labels, which have moved to just
having a tinted background.

This commit restyles the broadcast message preview (including the
exclamation mark icon) to use shading only to differentiate the message
from the rest of the page.

This should make the page fit together more cohesively, and feel less
busy.
2020-10-12 15:53:09 +01:00
Chris Hill-Scott
3c7364408b Make selected areas more tag-like
I’ve never liked the style of the selected areas on the preview of a
broadcast message. They were a compromise, taking what’s on the map page
and giving it a shaded background so it looks less like a text box.

The trouble is all these stroked elements jumbled together made the page
look very busy. I think it can be a bit calmer if they look more like
the ‘tag’ component[1] from the Design System, which only uses shading.

Going for black text not blue, because it’s one less piece of visual
differentiation – again, trying to keep the busyness level down.

1. https://design-system.service.gov.uk/components/tag/
2020-10-12 15:53:09 +01:00
Chris Hill-Scott
3eb97f76b8 Merge pull request #3676 from alphagov/broadcast-includes-content
Add content property to broadcast message model
2020-10-12 15:29:48 +01:00
David McDonald
895b6bcc9e Merge pull request #3674 from alphagov/remove-test-routes
Remove `test/step-` routes
2020-10-12 14:25:31 +01:00
Pea M. Tyczynska
b60d25da67 Merge pull request #3670 from alphagov/show-broadcast-tour-when-password-reset
Take user to page they are meant to visit in various sign-in flow scenarios
2020-10-12 12:27:37 +01:00
David McDonald
7d3a4e6085 Remove test/step- routes
We don't need these anymore as all users will use the `one-off/step`
routes.

This has mostly involved tidying up the tests which are still a little
disorganised and not as good as I'd like but it's a step in the right
direction.

More refactoring is still possible to the routes, it may come in a later
PR if I have time.
2020-10-09 17:36:09 +01:00
David McDonald
99880fd672 Merge pull request #3668 from alphagov/use-one-off-route
When sending to yourself use 'one-off' rather than 'test' routes
2020-10-09 16:02:01 +01:00
Chris Hill-Scott
54d4fb2a6c Allow platform admins to clear cached broadcasts
When we add a new property to the broadcast model, we need to delete any
cached broadcasts from Redis that are missing the new property. So this
adds an option to do this to the cache page in platform admin.

I’ve also tried to make it more obvious what the magic numbers in the
test fixture are doing.
2020-10-09 15:41:48 +01:00
Chris Hill-Scott
850571cb8c Recognise that broadcast messages include content
The content attribute needs to be added to the model so we can use it
later.
2020-10-09 15:41:38 +01:00
Tom Byers
9d7148ccbf Remove issue related to focus shifting onload
The Digital Accessibility Centre (DAC) reported
that it was confusing that focus was moved to the
templates and folders search textbox when the page
loaded on the templates page.

We noted that this issue wasn't reported on the
page where you enter your SMS 2-factor code.

From this, we determined that pages with a single
task could benefit from focus moving to the part
of the page that lets you do that task.

Because of this we:
- found all the pages we shift focus on when they
  load
- kept it for pages where the focus shift is
  important for what users do on the page
- removed it for all other pages (including
  templates)

The work was completed in:

https://github.com/alphagov/notifications-admin/pull/3622

This work also changed the label of the focused
element as a hack to get the page title read out.

This normally happens on load to indicate a
navigation has happened but didn't in Voiceover
when we focused an element on load.

After testing with JAWS and NVDA we found only
Voiceover does this. As Voiceover has the smallest
market share, and navigation can be inferred by
other mean, we removed it in:

https://github.com/alphagov/notifications-admin/pull/3673

That was deployed today.
2020-10-09 14:06:06 +01:00
Tom Byers
e848db0d04 Merge pull request #3673 from alphagov/remove-page-title-hack-from-autofocus
Don't prefix with the page title when focusing on load
2020-10-09 13:42:26 +01:00
Pea Tyczynska
2203fae195 Turn on redirects revalidate_email_sent
This is part of the work to make sure user is redirected
to the page they initially were meant to visit after
they sign in.
2020-10-09 12:39:23 +01:00
Pea Tyczynska
44ddee23ac Turn on redirects two_factor
This is part of the work to make sure user is redirected
to the page they initially were meant to visit after
they sign in.
2020-10-09 12:39:23 +01:00
Pea Tyczynska
a531c888ba Turn on redirects two_factor_email
This is part of the work to make sure user is redirected
to the page they initially were meant to visit after
they sign in.
2020-10-09 12:39:22 +01:00
Pea Tyczynska
5dd010ece8 Turn on redirects for two_factor_email_sent
This is part of the work to make sure user is redirected
to the page they initially were meant to visit after
they sign in.
2020-10-09 12:39:22 +01:00
Pea Tyczynska
a6543c6e57 Turn on redirects for sign_in
This is part of the work to make sure user is redirected
to the page they initially were meant to visit after
they sign in.
2020-10-09 12:39:22 +01:00
Pea Tyczynska
1fc2bee42d Turn on redirects for new_password
This is part of the work to make sure user is redirected
to the page they initially were meant to visit after
they sign in.
2020-10-09 12:39:21 +01:00
Pea Tyczynska
b0db60e417 Turn on redirects for email_not_received
This is part of the work to make sure user is redirected
to the page they initially were meant to visit after
they sign in.
2020-10-09 11:52:19 +01:00
Pea Tyczynska
1dd8b08042 Turn on redirects for check_and_resend_verification_code
This is part of the work to make sure user is redirected
to the page they initially were meant to visit after
they sign in.
2020-10-09 11:51:15 +01:00
Pea Tyczynska
c3b7481e11 Turn on redirects for check_and_resend_text_code
This is part of the work to make sure user is redirected
to the page they initially were meant to visit after
they sign in.
2020-10-09 11:49:48 +01:00
Chris Hill-Scott
0f5c0a251c Merge pull request #3672 from alphagov/no-personalisation-broadcast
Don’t allow or highlight personalisation in broadcast templates
2020-10-08 15:45:51 +01:00
David McDonald
beb57fed85 Delete template cache if adding a new reply to email address
As if this is chosen as default, then the template data will be stale as
they do not have the latest reply to address.

We are already doing this for create/update/delete for sms senders and
contact lists for letters, it was just the create we were missing for
email reply to addresses.
2020-10-07 17:32:10 +01:00
Tom Byers
fafe58a79b Merge pull request #3664 from alphagov/fix-template-controls-for-screenreaders
Fix template controls for screenreaders
2020-10-06 14:02:27 +01:00
Chris Hill-Scott
fad63117d6 Merge pull request #3658 from alphagov/use-scheduled-job-stats
Use new API endpoint for scheduled job stats
2020-10-06 12:00:38 +01:00
Chris Hill-Scott
54a5306399 Merge pull request #3660 from alphagov/fix-incorrect-processing-started-time-jobs
Fix incorrect processing started time on jobs
2020-10-06 12:00:30 +01:00