Commit Graph

3900 Commits

Author SHA1 Message Date
Tom Byers
17f74cf621 Fix data retention page 2020-09-02 16:21:41 +01:00
Tom Byers
50c3475eb3 Fix email reply-to addresses page 2020-09-02 16:21:41 +01:00
Tom Byers
23afe6fe36 Fix letter contact details page 2020-09-02 16:21:41 +01:00
Tom Byers
be83ea36ea Change list items on /users page
Change the HTML & CSS for user-list-item's to
support their content being split into 2 columns
of a grid instead of the edit link being
positioned absolutely.

Also includes:
1. removes `<div>`s from `<ul>` (non-valid HTML)
2. split action link out from permissions list
3. split summary of folder permissions out from
   permissions list
4. introduces a class for blocks of text that
   appear when there are no items.
5. fixes tests broken by changes to HTML
2020-09-02 16:21:41 +01:00
Tom Byers
d9655f16f5 Add missing </span>
Missed out from this PR:

https://github.com/alphagov/notifications-admin/pull/3593
2020-09-02 15:53:49 +01:00
Tom Byers
676a9297fe Merge pull request #3593 from alphagov/fix-link-and-button-text-across-pages
Fix link and button text across pages
2020-09-01 15:11:09 +01:00
Tom Byers
aff584b933 Fix comparison in api_key component
We can't control the case of either 'name' or
'thing' so the comparison should make them both
the same.
2020-08-28 13:07:38 +01:00
Tom Byers
d446a91a8e Merge pull request #3591 from alphagov/fix-copy-to-clipboard
Fix copy to clipboard
2020-08-28 10:58:36 +01:00
Chris Hill-Scott
344d8646a3 Merge pull request #3590 from alphagov/buffer-de-buffer
Make simplification of polygons more sophisticated
2020-08-28 10:15:49 +01:00
Chris Hill-Scott
459b7b6018 Reword title of screen 4 of broadcast tour
We want to emphasise the difference over the similarity.
2020-08-27 11:34:21 +01:00
karlchillmaid
8913eee803 Add 'you can' for clarity and readability 2020-08-26 21:52:55 +01:00
Chris Hill-Scott
dbfe293b4e Improve pacing and sequence of information in the broadcast tour
This commit refines which information we show on each page.

Specifically we’re
- adding some wording (‘at exactly the same time’) to try to communicate
  the immediacy
- giving the ‘loud noises’ message it’s own screen to really draw
  attention to it
- moving the ‘no phone numbers bit’ later in the journey, and
  experimenting with explaining why that is, to make it clearer how it’s
  different to a text message
2020-08-26 16:42:52 +01:00
Chris Hill-Scott
64291c8c95 Remove padding on map render
We don’t need it now we’re projecting a bigger bleed.
2020-08-26 09:18:25 +01:00
Chris Hill-Scott
3d9d663b27 Refactor coordinate processing into Polygons class
We have a bunch of stuff for doing lat/long transformation in the
`BroadcastMessage` class. This is not a good separation of concerns, now
that we have a separate class for dealing with polygons and coordinates.
2020-08-26 09:17:03 +01:00
Chris Hill-Scott
c49a6338af Store simplifed polygons in the SQLite database
This commit does two things:
- uses our new polygon-simplifying library to process the polygons
  before storing them, rather than processing them in real time
- stores only the polygons in the database, rather than the whole
  GeoJSON feature, because we don’t need any of the other information
  about the feature
2020-08-26 09:09:45 +01:00
Chris Hill-Scott
3470c5bb31 Make simplification of polygons more sophisticated
Simplifying polygons means reducing the number of points used to render
them. This commit implements simplification such that, for any given
input polygons, the combined point count of the simplified polygons is
less than 100.

When simplifying the polygons we are trying to get the smallest number
of points while meeting these two rules:
1. No part of the area the user has chosen can be cut off
2. The area of the simplified polygon should be as small as possible

This commit introduces two techniques we weren’t using before:
1. Dilating and eroding the area to fill in concave details of the
   shape, like inlets and harbours[1]
2. Making the simplification threshold proportionate to the perimeter of
   all polygons, so bigger and crinklier polygons get more
   simplification applied

It also shows the estimated bleed as a separate polygon. This lets us
make it bigger (so it’s more closer the the approximate bleed) without
having to send a bigger area to the CBC and compounding the amount of
actual bleed.

1. Inspired by this blog post about ‘removing the crinkley bits’ from
   Vancouver Island:
   http://blog.cleverelephant.ca/2010/11/removing-complexities.html
2020-08-26 09:04:54 +01:00
Tom Byers
e42adecd07 Add context to service settings links 2020-08-25 21:27:03 +01:00
Tom Byers
aa0b21b8f6 Add context to Send button on template page 2020-08-25 20:54:35 +01:00
Tom Byers
aacac232bf Add context to 'Cancel invitation' links 2020-08-25 20:52:45 +01:00
Tom Byers
f608d5e979 Add context to banner button text
Needs flash messaging system changes.
2020-08-25 20:52:21 +01:00
Tom Byers
0933485995 Add context to 'Move' button on /templates
Includes adding an extra parameter to the
page_footer component.
2020-08-25 20:52:21 +01:00
Tom Byers
a52aa406df Add context to template page 'Send' and 'Edit' 2020-08-25 20:52:21 +01:00
Tom Byers
334c2677dc Add context to 'Hide' button in cookie banner 2020-08-25 20:52:21 +01:00
Tom Byers
3fe7fd7367 Add context to 'Change details' links on /users 2020-08-25 20:52:21 +01:00
Tom Byers
04160800f0 Update call to api_key component across pages
Includes the following pages:
- letter contact (in service settings)
- sms-senders page (in service settings)
- email reply-to (in service settings)
- API key page

Note: the call on the letter contact page uses
the first line of the contact address as the
unique identifier for each button.
2020-08-25 10:54:42 +01:00
Tom Byers
a0e78e6102 Changes to API key component
Changes the interface so:
- `name` is a required argument
- the heading is only shown if `name` and `thing`
  match

These changes reflect a pattern observed in how
the component is used in pages.

It's first worth stating what the `thing` and
`name` arguments are.

`thing` is the type of thing the id is, for
example an reply-to email address.
`name` is which one of that type in the page, for
example the reply-to email address for user 1.

In pages where the id is the only one of its type,
these will have the same value.

When it is the only one of its type in a page, it
always has a heading so this makes the heading
appear based on `name` matching `thing`.
2020-08-25 10:54:42 +01:00
Tom Byers
7fd034a83f Change how live region works with API key JS
Includes implementation of new code on Reply-to
email addresses page.

The existing code put the live region on the
module element so the id and button were
read out when the state changed.

The report from the Digital Accessibility Centre
(DAC) said screenreader users were confused by the
content changing because it wasn't announced.

These changes attempt to make the state changes
clearer by:
1. moving the live region out into a separate
  element so we can better control what is
  announced
2. adding hidden text around to the button and text
  above (sometimes the id, sometimes the 'Copied
  to clipboard' text) to give more context

When the id is copied to clipboard, the button
changes but this is not announced as the
live-region text takes precedence (due to being
set to 'assertive'). Because of this, hidden text
has been added in change 2 to explain what the new
button does.
2020-08-25 10:54:42 +01:00
Chris Hill-Scott
19ce1bd43a Merge pull request #3579 from alphagov/selected-area-spacing
Fix spacing between button and selected areas
2020-08-25 09:41:53 +01:00
Chris Hill-Scott
8ea7acce15 Merge pull request #3585 from alphagov/self-approve-broadcasts
Let people approve own broadcasts in training mode
2020-08-25 09:25:38 +01:00
Chris Hill-Scott
d3f6f2b7a4 Merge pull request #3588 from alphagov/broadcast-tour-rework
Refine the broadcast tour based on what we’ve learned in research
2020-08-24 14:28:34 +01:00
Chris Hill-Scott
8578e64cc9 Refine broadcast tour based on research learnings
We’ve shown the broadcast tour to a few users now. We’ve learned what
concepts about broadcasting are and aren’t getting through.

So what we’re emphasising here is:
- the thing that appears on the phone (the ‘emergency alert’) not the
  technology (a ‘broadcast’)
- how it’s different to other channels of messaging, eg text

We’ve generally spent a lot more time on the content and illustrations
this time around, so overall it’s should be clearer and shorter.

This also expands the communication of training mode into the header,
so it’s visible on every page (we can add another one for ‘live’
services later on).
2020-08-24 12:32:40 +01:00
Chris Hill-Scott
1ebed9c5d0 Merge pull request #3587 from alphagov/remove-broadcast-dashboard
Replace ‘broadcast’ with ‘alert’ on dashboard
2020-08-24 12:29:10 +01:00
Chris Hill-Scott
6131f6c6aa Replace ‘broadcast’ with ‘alert’ on dashboard
We’re moving away from ‘broadcast’ as a noun, so this commit updates the
dashboard to be in line with changes in other PRs.
2020-08-24 12:04:06 +01:00
Chris Hill-Scott
06d7962d3d Let people approve own broadcasts in training mode
We want to let users learn the system by trying it out. At the moment
they can’t explore it fully by themselves because they’re blocked at
the point of approving the broadcast, unless they involve in another
member of their team. Having to involve another person is friction that
will discourage people from exploring.

So this adds a button that lets people approve their own broadcasts in
trial mode, with some rough-and-ready content that explains training
mode and how it would be different to trial mode.
2020-08-24 11:32:43 +01:00
Katie Smith
e3006f62b2 Ensure H2 headings follow H1 headings
We had some cases where an H3 heading followed an H1. This was flagged
as something to change in the accessibility report.
2020-08-21 16:52:35 +01:00
Chris Hill-Scott
0dfbc1df67 Merge pull request #3584 from alphagov/remove-end-time-for-approver
Remove reference to end time for approver
2020-08-20 11:05:39 +01:00
Pea M. Tyczynska
a50ed17c14 Merge pull request #3582 from alphagov/fix-skiplink
Fix or remove skip links on bulk send and contact list upload pages
2020-08-20 10:23:36 +01:00
Chris Hill-Scott
33688b92c5 Remove reference to end time for approver
Messages awaiting approval don’t have an end time – it’s set
automatically once the message is approved.

We need to revisit the content on this page, but this is just a fix so
that the page doesn’t `500`.
2020-08-20 10:08:33 +01:00
Chris Hill-Scott
05075b5af5 Fix spacing between button and selected areas
Adding left margin to the button meant that when it wrapped onto a new
line it didn’t align flush with the left edge of its containing column.

Instead we can:
- move the link outside the list (which is better semantically anyway)
- then add the margin to the last item of the list (which is now the
  last selected area, not the link)
2020-08-20 08:47:56 +01:00
Chris Hill-Scott
283393024d Fix pages which assume broadcasts have a finish time
They no longer have a finish time until they have been approved.
Previously it was the person preparing the broadcast who chose when it
should finish.
2020-08-19 15:10:44 +01:00
Chris Hill-Scott
1acc3b55eb Merge pull request #3581 from alphagov/remove-end-time
Remove choice of ‘End time’ from broadcast journey
2020-08-19 14:30:22 +01:00
Pea Tyczynska
33ebd01d70 Remove unused skip-link from contact list upload pages
Since file contents are directly below the header, there is no need
for a skip link moving focus to those file contents.
2020-08-19 11:29:17 +01:00
Tom Byers
8659e46828 Remove skiplink & fix table caption on bulk send
error pages

The skiplink in those pages is in the error summary
at the top. In this case, it seems redundant
because:
- it jumps to a section of the page just below it
- the section it would jump to is the only error
  on the page

Because of this, and because The Digital
Accessibility Centre (DAC) reported that the
skiplinks in these pages may not be needed, we
decided to remove it.

This commit also adds a prefix to the table caption to
indicate that it only contains the errors from the
CSV, not the rest of its contents.
2020-08-19 11:29:17 +01:00
Pea Tyczynska
9451531bc6 Fix first skip to contents link
It was invisible at all times. Now it is visible when selected.
This will help keyboard users take advantage of it.
2020-08-19 11:28:49 +01:00
Chris Hill-Scott
da8321863d Remove choice of ‘End time’ from broadcast journey
Since we added the end time picker:
- we have discovered that broadcasts can’t be longer than 24h
- we have observed that most users confuse picking the end time for
  scheduling the message, or don’t understand exactly what it means for
  the broadcast to ‘end’
- we’ve developed the concept of ‘training mode’, which you should be
  going through before sending a real broadcast

We also think that, for most scenarios, you won’t necessarily know when
a broadcast should end at the time of starting it because the cause of
the danger is not within your control. So giving you control of the
end time before the broadcast has even been approved is a confusing
distraction.

Having to pick a time at all also makes the whole process feel more
planned and less immediate. Whereas in reality all the phones in the
area will be getting the message in seconds. It’s only people coming
into the area later to whom the ‘ongoing’ aspect of the broadcast
applies.

The best place to explain what’s happening with the phones is at the
approval stage and once you’ve sent your first (training mode)
broadcast. It’s easier to explain what’s happened if it’s in direct
response to something you’ve just done.

Later on we should add some kind of email reminder after 12 hours to
make sure you still want the broadcast live, again after 18 hours, etc.

We could let you schedule an end time once the broadcast is live, but
don’t think there’s a strong need. Knowing enough that you want to
cancel is one thing, but knowing enough to want to cancel but wanting to
wait a bit… nah.
2020-08-19 11:05:13 +01:00
Pea M. Tyczynska
9b69d16963 Merge pull request #3554 from alphagov/convert-single-line-textboxes-to-govuk-frontend
Convert single line textboxes to govuk frontend
2020-08-18 11:29:44 +01:00
Pea M. Tyczynska
3bbce24b06 Merge pull request #3558 from alphagov/only-allow-new-template-if-permission-is-there
Services can only create templates of types they have turned on
2020-08-17 14:39:16 +01:00
Chris Hill-Scott
95078d2d51 Change page title on new broadcast template page
Since broadcast services can only have one type of template we probably
don’t need to disambiguate what kind of template you’re creating.

And you’ve just come from a page where the button says ‘New template’,
without the choice of radios after, so it’s nice for the page title to
match that.
2020-08-17 13:01:33 +01:00
karlchillmaid
280f6226d9 Update letters.html 2020-08-17 12:55:29 +01:00
Pea Tyczynska
36c1ffa7be New template button takes user to new template page
for all services that only allow sending one type of notifications
2020-08-14 17:15:45 +01:00