Commit Graph

3418 Commits

Author SHA1 Message Date
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
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
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
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
Katie Smith
895a9df55a Add confirmation banner when cancelling user invites
This shows the green banner with a tick when cancelling a user's
invitation to a service or organisation. The accessibility audit noted
that 'When cancelling an invite a new page loads, however, there is no
immediate indication that the invite has been cancelled.'

In order to display the invited user's email address as part of the
flash message, this adds new methods to the api clients for invites to get
a single invite.
2020-08-19 09:05:41 +01:00
Leo Hemsted
ecc44d5d56 Merge pull request #3555 from alphagov/delete-template-cache-on-reply-to-update
delete template cache when reply_to stuff is updated
2020-08-18 15:40:13 +01:00
Leo Hemsted
7e15d0c928 delete template cache when reply_to stuff is updated
sms sender, email reply to, letter contact blocks.

These are all cached within template, under `template.reply_to` - if the
template doesnt have a specific default, then that field stores the
service default. So when service default changes, we need to clear the
template cache so that it is updated to reflect that.

We already use this pattern for deleting the template cache for a bunch
of templates in `template_folder_api_client.move_to_folder`
2020-08-18 14:47:12 +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
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
Pea Tyczynska
bf5ccd044b Services can only create templates of types they have turned on 2020-08-14 17:13:56 +01:00
Pea Tyczynska
67da2c28bf Deep merge jsonlike objects
Also remove duplicate checkboxes code
2020-08-14 14:58:05 +01:00
Chris Hill-Scott
04c0c6422f Merge pull request #3568 from alphagov/fix-live-search-broadcast
Fix live search when selecting broadcast sub areas
2020-08-14 10:25:34 +01:00
Chris Hill-Scott
1c74d0798a Add singular descriptions for libraries
This lets us write nice interface copy like ‘Choose a local authority
from the local authorities library’.
2020-08-13 17:54:46 +01:00
Chris Hill-Scott
72f5dcb91f Remove the counties and unitary authorities library
It’s been superceded by the ‘Local’ library (formerly ‘Electoral wards
in the United Kingdom’).

The latter is better because:
- it’s covers all 4 nations, not just England and Wales
- it has electoral wards as well as local authorities which group them,
  so there’s more flexibility when choosing an area to broadcast to
2020-08-13 17:54:37 +01:00
Chris Hill-Scott
be16c0187f Rename electoral wards to local areas
We’ve observed people using ‘national’ and ‘local’ during user research.
It has less tongue-twisting ambiguity than county vs country.

But we think that maybe just getting rid of ‘counties’ is enough to
disambiguate them. So this commit just takes the ‘local’ concept.

This commit also gives the libraries and areas new IDs, which means if
we want to rename them in the future it won’t be a breaking change.
2020-08-13 17:54:28 +01:00
Chris Hill-Scott
969e7a6dbd Show how a broadcast will overspill selected area
Broadcasting is not a precise technology, because:
- cell towers are directional
- their range varies depending on whether they are 2, 3, 4, or 5G
  (the higher the bandwidth the shorter the range)
- in urban areas the towers are more densely packed, so a phone is
  likely to have a greater choice of tower to connect to, and will
  favour a closer one (which has a stronger signal)
- topography and even weather can affect the range of a tower

So it’s good for us to visually indicate that the broadcast is not as
precise as the boundaries of the area, because it gives the person
sending the message an indication of how the technology works.

At the same time we have a restriction on the number of polygons we
think and area can have, so we’ve done some work to make versions of
polygons which are simplified and buffered (see
https://github.com/alphagov/notifications-utils/pull/769 for context).

Serendipitously, the simplified and buffered polygons are larger and
smoother than the detailed polygons we’ve got from the GeoJSON files. So
they naturally give the impression of covering an area which is wider
and less precise.

So this commit takes those simple polygons and uses them to render the
blue fill. This makes the blue fill extend outside the black stroke,
which is still using the detailed polygons direct from the GeoJSON.
2020-08-13 11:20:49 +01:00
Pea Tyczynska
1da336827b Make agreement test work with both error message classes 2020-08-13 11:00:28 +01:00
Chris Hill-Scott
8ef1e98745 Remove ‘Regions of England’ library
It made for a good early demo to show how we could have different
libraries, but we’d don’t think there’s a strong user need for being
able to broadcast to a region of England.

Regions also have the problem that:
- they are ambiguous – both England and Scotland have a region called
  ‘South east’
- Northern Ireland doesn’t have formal regions

This commit removes the regions library.
2020-08-12 18:03:50 +01:00
Chris Hill-Scott
4242078885 Always show 4 items in the example list
If a library has lots of items then the first 3 should be shown, with
a count of how many more there are, for a total of 4 list items:
> a, b, c, and 23 more

If the library only has 4 items then all 4 should be shown, with
consistent use of conjunction and Oxford comma[1]:
> a, b, c, and d

This keeps the lengths of the examples nice and consistent.

1. We use an Oxford comma because it helps disambiguate when an area
itself has a comma or ‘and’ in it, for example ‘Armagh City, Banbridge
and Craigavon’
2020-08-12 16:34:17 +01:00
Chris Hill-Scott
dfa2ae0ced Order areas by name in examples
When you click through to the page for a library you see the available
areas in alphabetical order. The examples given for each library should
match this.
2020-08-12 16:34:17 +01:00
Chris Hill-Scott
53fd5b8869 Exclude grouped areas from examples
The given examples should match the choices offered when you visit the
next page. The choices offered on the next page are either the areas
(when a library is not grouped) or the groups (when a library is
grouped).

This commit makes the examples match the choices by excluding sub-areas,
ie those that have a grouping ID.
2020-08-12 16:34:17 +01:00
Chris Hill-Scott
40dacdeac9 Fix live search when selecting broadcast sub areas
It was targeting the wrong element because it hadn’t been updated to
reflect that we’re now using the Design System checkboxes.
2020-08-12 16:33:00 +01:00
Chris Hill-Scott
781847d32c Merge pull request #3557 from alphagov/view-only-broadcast-page
Let users without `send_messages` view broadcasts
2020-08-12 15:16:39 +01:00
Tom Byers
bff07c10b1 Convert IntegerFields to GovukIntegerFields
Changes those fields in the following forms:
- FreeSMSAllowance
- ProviderForm
- ProviderRatioForm
- ServiceDataRetentionEditForm

Includes changes to templates that use this form
and associated tests.
2020-08-12 10:34:51 +01:00
Tom Byers
c715681f5c Convert DateFields to GovukDateFields
Changes those fields in the following forms:
- DateFilterForm
- RequiredDateFilterForm

Includes changes to templates that use this form
and associated tests.
2020-08-12 10:34:51 +01:00
Pea Tyczynska
1d2a73a1a4 Update TemplateAndFoldersSelectionForm fields
Changes its StringFields to GovukTextInputFields.

Includes changes to templates that use this form
and associated tests.
2020-08-12 10:34:51 +01:00
Tom Byers
3f7142b3e2 Update fields on ServiceLetterBrandingDetails
Changes its StringField to GovukTextInputField.

Includes changes to templates that use this form
and associated tests.
2020-08-12 10:34:51 +01:00
Pea Tyczynska
852ef61aad Update ServiceSmsSenderForm with new fields
Changes its StringField to GovukTextInputField.

Includes changes to templates that use this form
and associated tests.
2020-08-12 10:34:51 +01:00
Pea Tyczynska
f38e268db6 Update AddGPOrganisationForm with new fields
Changes its StingFields to GovukTextInputFields.

Includes changes to templates that use this form
and associated tests.
2020-08-12 10:34:51 +01:00
Pea Tyczynska
9437a23f09 Update RenameOrganisationForm with new fields
Changes its StringFields to GovukTextInputFields.

This change also affects NewOrganisationForm,
which inherits from RenameOrganisationForm.

Also includes changes to templates that use this
form and associated tests.
2020-08-12 10:34:51 +01:00
Tom Byers
a22b8cf684 Update ForgivingIntegerField
Makes it inherit from GovukTextInputField.

Changes to govuk_field_widget to allow the value
attribute to be set by passing a value keyword
argument to the __call__ method.

Includes changes to templates that use this form
and associated tests.
2020-08-12 10:34:51 +01:00
Pea Tyczynska
ebd8588c03 Convert TwoFactorForm to gov uk frontend 2020-08-12 10:34:51 +01:00
Pea Tyczynska
be7d4891ae Consolidate callback forms and convert them to gov uk frontend
We had two identical callback form classes. One for delivery callbacks
and one for inbound sms callbacks. Since they did not differ I consolidated
them into one CallbackForm class that they both inherited from previously.

I also substituted field classes for this form with new fields
that cooperate with gov uk frontend.
2020-08-12 10:34:51 +01:00
Pea Tyczynska
ad3b391e46 Convert ListEntry component to use new fields
ListEntry component uses FieldList field to group
textboxes. Textboxes can be text inputs, email fields
or international phone number fields. This converts
all field-lists to use:

- GovukTextInputField
- GovukEmailField
- InternationalPhoneNumber

Affects these forms:
- OrganisationDomainsForm
- GuestList

Also changes to related Javascript:

Update list-entry JS tests to match new HTML

Updates the HTML the JS operates on in the test
(a fixture representing the HTML in the page on
load) to match the new GOVUK Frontend we are
generating.

Make list-entry JS work with GOVUK Frontend HTML

The existing list-entry JS did a few things that
clashed with how the new HTML works:
- added a 'input-' prefix to the id attributes
  of all text-inputs
- did not make its name and id attributes values
  match

The new HTML has id and name attributes that
match so these changes remove the prefix for id
attributes and makes them match the name
attribute.

To understand these changes, it is useful to
know how the values for id and name attributes are
generated:
1. the id attribute for the component element is
   stored
2. the 'list-entry-' prefix is removed and the
   remainder is used to generate ids

For example, if the component's id is
'list-entry-domains', the id will be 'domains-1',
where the text-input is the first one.

This also adds some logic to the HoganJS template
to make the value attribute optional, so it is
only added if it has a non-null value. This
matches the behaviour of the text-input component
used in the new list-entry component.

Also change whitelist references to guestlist in tests
- we forgot to do it earlier, when we moved from calling this
feature whitelist to calling it guestlist.
2020-08-12 10:34:51 +01:00
Tom Byers
11dcd87115 Update ServiceContactDetailsForm with new fields
Changes its:
- StringFields to GovukTextInputFields
- EmailFields to GovukEmailFields

Includes changes to templates that use this form
and associated tests.
2020-08-12 10:34:51 +01:00
Tom Byers
949aa3a9bd Update CreateServiceForm with new fields
Changes its StringField to GovukTextInputField.

Includes changes to templates that use this form
and associated tests.
2020-08-12 10:34:51 +01:00