Commit Graph

10593 Commits

Author SHA1 Message Date
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
Pea Tyczynska
d089424501 Forgot password sends redirect link
with reset password email.

This is so when users reset their password they are still
redirected to pages they were meant to visit.

This change was done specifically so everyone who is meant to see
broadcast tour sees it, but it will improve lives of all users
who wanted to visit a page on Notify but then had to reset
their password in the process.
2020-10-05 16:58:43 +01:00
Pea Tyczynska
ab10009e4d Redirect link included in links for password reset
on sign-in page.
2020-10-05 15:38:34 +01:00
David McDonald
1b310a0f8a Merge pull request #3663 from alphagov/separate-tour
Move intro to Notify tour into separate views to reduce code complexity
2020-10-05 09:53:33 +01:00
Tom Byers
cdebb93bd1 Merge pull request #3665 from alphagov/fix-bug-with-copy-to-clipboard
Fix bug with copy to clipboard
2020-10-02 17:33:42 +01:00
Tom Byers
678934cf49 Fix copy-to-clipboard button CSS
In a lot of browsers, the static position is 0px
anyway so there's no problem.

In IE11, the button sits to the left of the
paragraph above by default. Setting it in the CSS
fixes the issue.
2020-10-02 17:22:45 +01:00
David McDonald
f64ae1a547 Merge pull request #3640 from alphagov/delete-old-redis-key
Step 3 of renaming cache keys for templates
2020-10-02 15:37:06 +01:00
David McDonald
7b82ca5083 Remove deleting of old redis key
At this point we are no longer setting this key, nor are we reading from
it so we are able to delete it.
2020-10-02 15:21:30 +01:00
David McDonald
c1f67514a2 404 for step-0 2020-10-02 14:44:17 +01:00
Tom Byers
2693e5e2b6 Replace use of Array.from
Array.from isn't supported by any version of IE.

We still need to convert a nodelist to an array so
we can either:
1. include the polyfill for Array.from from core-js
2. use [].slice

We don't use Array.from anywhere else so this uses
the second one.
2020-10-02 14:30:10 +01:00
David McDonald
0e32df4514 Merge pull request #3639 from alphagov/use-new-redis-key
Step 2 of renaming cache keys for templates
2020-10-02 13:58:00 +01:00
David McDonald
1f900e74a9 Fix error case where the tour start page is skipped
This was causing us to key error for 'placeholders' being missing in the
session dictionary. This fixes it and sends you back to the start
2020-10-02 12:46:02 +01:00
David McDonald
6f8a2721d9 Tighten restrictions of which templates a user can tour with
We don't want them being able to tour with a template they don't have
folder permissions to see.

Also, when a new user creates a service they will always have full
permissions so this won't affect new services at all, it's just to stop
people 'hacking' the urls to enable them to see templates they maybe
shouldn't see if they knew the template ID
2020-10-02 12:46:02 +01:00
David McDonald
ec0af6b151 Redirect user to new tour after creating a service
We leave the existing tour routes available for the moment so we don't
break the flow for anyone whilst this deploys
2020-10-02 12:46:02 +01:00
David McDonald
f0a8c97eeb Add check tour notification page
On submit of form on this page, will continue to normal sending flow
which can be shared code as there is no longer previous context needed
of where they have come from
2020-10-02 12:46:02 +01:00
David McDonald
9347c9a979 Redirect to the new check tour notification page
After the steps have been completed, redirect them to the new check tour
notification page to review their message
2020-10-02 12:46:02 +01:00
David McDonald
c2a691e6d9 Add view for filling in steps of the tour
Note, we choose to start our urls at step-1 rather than step-0 as this
is consistent when you would enter the first placeholder (excluding the
recipient) for the one off tour.

Also note, we expect a service to allow international sms by default
when it is first created but we keep the check for if the service does
just in case they visit this tour later on.
2020-10-02 12:46:02 +01:00
David McDonald
2ba7224a42 Add view for new tour start page
This will replace the current tour start page
2020-10-02 12:46:02 +01:00
Chris Hill-Scott
3182fc7668 Merge pull request #3659 from alphagov/pyup-scheduled-update-2020-09-28
Scheduled weekly dependency update for week 39
2020-09-30 12:58:21 +01:00
Chris Hill-Scott
06ae9d7162 Freeze requirements 2020-09-30 12:43:25 +01:00
pyup-bot
3dd7627316 Update eventlet from 0.27.0 to 0.28.0 2020-09-30 12:41:19 +01:00
Chris Hill-Scott
6c69ffb74c Merge pull request #3662 from alphagov/email-preview-page-title
Give email preview page a sensible page title
2020-09-30 11:40:54 +01:00
Chris Hill-Scott
a98e3534b2 Give email preview page a sensible page title
It’s derived from the subject line of the email now as of
https://github.com/alphagov/notifications-utils/pull/793
2020-09-30 11:29:13 +01:00
Chris Hill-Scott
eda47fc5e2 Merge pull request #3661 from alphagov/bump-utils-42.2.1
Bump utils to 42.2.1
2020-09-29 15:53:12 +01:00
Chris Hill-Scott
08a71cd297 Bump utils to 42.2.1
Changes: https://github.com/alphagov/notifications-utils/compare/42.2.0...42.2.1
2020-09-29 14:14:40 +01:00
Chris Hill-Scott
76f83f7d2a Merge pull request #3652 from alphagov/updated-bristol-boundaries
Update local authority district GeoJSON to bring in fixes for Bristol
2020-09-29 13:32:32 +01:00
Chris Hill-Scott
79be0dc472 Merge pull request #3651 from alphagov/shapefile-to-geojson
Add instructions for converting Shapefiles
2020-09-29 13:32:25 +01:00
Pea M. Tyczynska
f4f2e5d13a Merge pull request #3622 from alphagov/searchbox-make-autofocus-optional
Autofocus off by default on live-search
2020-09-29 10:58:00 +01:00
Tom Byers
2639406ae2 Simulate page load announcement in autofocus JS
Screenreaders announce the title of the page when
it loads and their users are used to it signifying
a new page.

By focusing a form control when the page loads,
this announcement is replaced with that of the
control label.

This commit prefixes the label with the page title so it
gets announced when the page loads, notifying
screenreader users that they are on a new page.

The page title prefix is removed once focus shifts
from the form control as its presence in any
further announcements could be confusing.
2020-09-29 10:47:13 +01:00
Leo Hemsted
65e32f8e5a Merge pull request #3650 from alphagov/broadcast-org-always-on
Broadcast org always on
2020-09-28 12:59:19 +01:00
Chris Hill-Scott
bb23e95a68 Merge pull request #3657 from alphagov/format-thousands-too-many-messages
Format big numbers correctly when numbers too big
2020-09-28 11:06:27 +01:00
Chris Hill-Scott
fbf23d4dd7 Merge pull request #3656 from alphagov/fix-typo-in-accessibility-statement
Remove 's' to fix typo
2020-09-28 11:06:17 +01:00
Chris Hill-Scott
6070874558 Merge pull request #3654 from alphagov/template-spacing-fixes
Restore correct spacing on templates page
2020-09-28 11:06:07 +01:00
Chris Hill-Scott
8da0aa7736 Format big numbers correctly when numbers too big
Comma should be used as the thousands separator. Code can be simplified
by using macro to pluralise.
2020-09-26 14:50:47 +01:00
karlchillmaid
eeb96dfb52 Remove 's' to fix typo 2020-09-26 11:42:07 +01:00
Chris Hill-Scott
6b1617c575 Merge pull request #3655 from alphagov/bump-utils-42.2.0
Bump utils to 42.2.0
2020-09-25 18:37:50 +01:00
Chris Hill-Scott
9afd305c6d Update test to new limit 2020-09-25 18:24:38 +01:00
Chris Hill-Scott
c763d3a44d Bump utils to 42.2.0
Increases CSV row limit from 50,000 to 100,000

Changes: https://github.com/alphagov/notifications-utils/compare/41.3.0...42.2.0
2020-09-25 18:16:17 +01:00
Leo Hemsted
626b1c4211 enable broadcast org in all environments
This organisation is defined in the config file. It's hard coded to a
UUID as defined in the api db migration 0331_add_broadcast_org.
2020-09-25 13:42:13 +01:00
Chris Hill-Scott
9e8df33832 Restore correct spacing on templates page
During the move to GOV.UK Frontend checkboxes our template list has
started to be wrapped in a `<div>` with the `govuk-form-group` class.

This adds extra spacing, like you’d want in a regular transaction
service which might have multiple sets of form controls on a single
page.

It isn’t appropriate on our templates page, because there should be a
consistent rhythm where the space between each checkboxes is the same as
the space between the search box and the first checkbox, to the last
checkbox and the buttons. Not having this space is also consistent with
other pages with sticky grey buttons, eg the team members page.

This commit also fixes a typo in the name of one of the classes used to
control spacing between the checkboxes and search bar.
2020-09-25 13:02:19 +01:00
Chris Hill-Scott
04e53c72b3 Update shapes to bring in fixes for Bristol
I emailed the Geography team at the ONS:

> Hi geography team,
>
> I work on GOV.UK Notify, which is a service run by Government Digital Service (part of the Cabinet Office). I was given your email address by [redacted] who’s been helping answer some of my questions on the cross-government Slack.
>
> We’re using some of the boundary datasets from the Open Geography Portal, and mostly they’ve been excellent.
>
> In the abstract, the problem we’re trying to solve is, given a point outside an area, what is the minimum distance to a point within that area. So, for example, if a crow was somewhere in Cardiff, what’s the shortest distance it would have to fly to reach somewhere in the Bristol local authority district?
>
> We’ve noticed some problems with the data that means our calculations would be wrong. We’ve noticed this around Torquay, Norwich and Bristol. Here are some screenshots of Bristol, from the generalised and full resolution boundaries:
>
> The artefacts I’ve highlighted are closer to Cardiff than any actual part of the land area of Bristol. They are either:
> - in the sea
> - land that’s part of North Somerset
>
> I suspect that this is being caused by the process of clipping the actual region of Bristol (which, unusually, extends into the water) to the mean high water line.
>
> I’ve worked around this by filtering out any polygons that are smaller than ~7,500m². It’s a bit hacky because parts of the Scilly Isles start disappearing. That’s not a problem for what I’m working on, but it would be nice to not need the hack.
>
> So my questions would be:
>
> - Is there a better way to remove these artefacts than filtering by area?
> - Is there a plan to remove these artefacts from the data in future releases?
>
> Thanks in advance,
> Chris

They emailed back to say:

> Hi Chris
>
> Thank you for your enquiry.
>
> We  have completed the amendments to the LAD MAY 2020 BFC and BGC boundaries as mentioned so you should be able to download them from the portal now.
>
> Hope this helps.
>
> Kind regards
> [redacted]

This commit brings in the files they’ve updated. We still have to do
some filtering (but now at a higher resolution) because they haven’t
fixed Norwich yet. I’ll email them  separately about that.
2020-09-25 12:24:23 +01:00
Chris Hill-Scott
ae0d31d71e Merge pull request #3653 from alphagov/more-map-refinements
Make the ‘will get alert’ and ‘likely to get alert‘ areas on the map clearer
2020-09-25 10:10:50 +01:00
Chris Hill-Scott
67bdd27dd0 Tweak position of key icons to align with text 2020-09-25 09:49:27 +01:00
Chris Hill-Scott
19730dad6e Rotate the map key icons
We’ve had some feedback that the map key icons look a bit like
checkboxes, and that this might have confused a user during the
research.

So we need a way of making them look different to checkboxes. We don’t
want to change the border thickness because it matches what’s on the
map. A different approach is changing the shape.

Shapes that might still be confusing:
- circles (look like radio buttons)
- triangles (look like a warning)

So this commit changes the shape to a diamond, which is easy to acheive
by rotating the square 45 degrees.
2020-09-24 16:15:31 +01:00
Chris Hill-Scott
f79a5ca020 Style ‘likely’ area with a dashed line
We’ve had some feedback that relying only on luminosity and position to
differentiate between the ‘will get alert’ and ‘likely to get alert’
areas on the map might not be enough.

We don’t want to introduce another colour because:
- it will make the map look very busy
- not many other colours contrast with the map tiles as well as blue
- relying on colour only to communicate information is also bad for
  accessibility

Instead we can make one of the lines a different style. I’ve gone for
dashed on the ‘likely’ line because it looks nice, and gives some
suggestion of a porous boundary.

Implementing this means using CSS border image, because a `dashed`
border (which we still have as a fallback) doesn’t render with
consistent dash sizes from browser to browser. We need consistency to
match the dashes that the map will be drawing (which use SVG not CSS
so don’t have the same problem).
2020-09-24 16:15:31 +01:00
Chris Hill-Scott
eb4a7907a4 Make estimated phone count clearer
We’ve had some feedback from user research that difference between
‘will get alert’ and ‘likely to get alert’ is not clear, and it’s hard
to tell if the latter is inclusive of the former. This leads people to
question the validity of these numbers, which is important, because an
the estimate should give you some idea of the impact of what you’re
about to do.

This commit reformats the number as a range, for example 1,000 to 2,000
phones.

If the range is small, eg 40,000,000 to 40,800,000 then this suggests
a false level of accuracy. So instead we just give one number and say
it’s an estimate, eg ‘40,000,000 phones estimated’
2020-09-24 15:53:07 +01:00
Chris Hill-Scott
e7169ad902 Add instructions for converting Shapefiles 2020-09-24 13:19:27 +01:00
Leo Hemsted
c7ef7d5083 Merge pull request #3643 from alphagov/broadcast-org
move service to broadcast org when broadcasting is enabled
2020-09-24 13:13:34 +01:00
Tom Byers
6cf7017ff5 Add tests for changes to label 2020-09-24 13:10:55 +01:00
Pea Tyczynska
a73573c165 Turn autofocus on for copy template
Accessibility audit uncovered issues screen-reader users would
have with autofocus on Notify pages. Autofocus can lead to
confusion for those types of users and make them miss parts
of the page.

Hence, we decided that autofocus will be turned off by default
for live-search component.

We decided to keep the autofocus on for live-search text box when:
1. the page is a task page - as opposed to browsing pages, where
user wonders freely, task pages have more established flow, so
page focusing on textbox can actually be helpful.
2. page does not have actionable elements above the autofocus.
2020-09-24 13:10:40 +01:00