Commit Graph

7216 Commits

Author SHA1 Message Date
Tom Byers
9c55477512 Fix focus style for pill links
Includes changes for:
- pills as page navigation
- pills as separate items
- big number links
2020-09-15 17:15:41 +01:00
Tom Byers
2f5ecdb1fa Fix org navigation links focus styles 2020-09-15 17:15:41 +01:00
Tom Byers
322dab8415 Fix focus style on 'show more' links 2020-09-15 17:15:41 +01:00
Tom Byers
ec67bb2819 Fix focus styles for table links 2020-09-15 17:15:41 +01:00
Tom Byers
1a086c0631 Fix focus style on prev/next links
It has a hover colour so needs the focus colour
re-defined.

The `overflow: hidden` was clipping the black
underline of the focus style on the prev/next
links. This assumes it was only there to contain
the 2 floating links so replaces it with a
clearfix, which does the same without clipping the
underline.
2020-09-15 17:10:41 +01:00
Tom Byers
2f4fddfeff Update focus styles helper to latest version 2020-09-15 17:10:41 +01:00
Tom Byers
c1a6a38f68 Set core focus styles for links
- add new focus style to `govuk-link` class
- do the same for `govuk-link--destructive` class
2020-09-15 17:10:11 +01:00
Tom Byers
1190148168 Update form inputs to new focus style 2020-09-15 17:09:14 +01:00
Tom Byers
816ac484d9 Update footer links to new focus style
Updates based on the changes in:

https://github.com/alphagov/govuk-frontend/pull/1321
2020-09-15 17:09:14 +01:00
Tom Byers
2b6d07d358 Add new focus style to buttons
Updates based on the changes in:

https://github.com/alphagov/govuk-frontend/pull/1315
2020-09-15 17:09:14 +01:00
Tom Byers
0c9229bfad Update links, and things that look like links
Updates, and hacks, based on the changes in:

https://github.com/alphagov/govuk-frontend/pull/1309/files
2020-09-15 17:09:14 +01:00
Leo Hemsted
c2e737b323 Merge pull request #3618 from alphagov/fix-broadcast-area-count
generate library summary in python
2020-09-14 16:47:36 +01:00
Leo Hemsted
ef0564f046 generate library summary in python
much simpler than sqlite.

also remove oxford commas

Co-authored-by: Chris Hill-Scott <me@quis.cc>
2020-09-14 15:25:04 +01:00
Chris Hill-Scott
48a432943f Merge pull request #3627 from alphagov/increase-minimum-polygon-threshold
Increase threshold for minimum polygon size
2020-09-14 13:20:36 +01:00
Chris Hill-Scott
858d1ee197 Increase threshold for minimum polygon size
We filter out very small polygons from the original data to remove
glitches. These glitches are caused by trying to subtract the water from
a polygon that includes some land and some water, but using two
different definitions or resolutions of mean high water line.

If we don’t do this then we end up with a bunch of very small polygons
which lie far outside the understood area of a place, causing large
overspill.

We need to increase the threshold for this process because we’re still
seeing this problem around Bristol and Norwich.

This does mean we lose a few very small polygons in places like Shetland
and the Scilly Isles, but not in such a way that we would avoid
broadcasting to them (because they’d still be caught by the
simplification and overspill).
2020-09-14 11:32:02 +01:00
Tom Byers
54e553aad4 Merge pull request #3625 from alphagov/fix-aria-on-jobs-page-2nd-attempt
Fix aria on jobs page 2nd attempt
2020-09-11 14:46:37 +01:00
Tom Byers
9cba1e17e0 Merge pull request #3619 from alphagov/add-context-to-letter-template-links
Give links context on letter template page
2020-09-11 14:07:25 +01:00
David McDonald
5b5c240b05 Remove reference to special category data cant be sent
Supposedly this is old and is no longer accurate
2020-09-11 12:27:11 +01:00
Tom Byers
51033d57fb Make jobs notification partial a role of region
Previously attempted in this commit by changing
the element to a <section>:

e815a73233

This broke the updateContent.js, that polls the
JSON endpoint for the partial and updates its
content with changes sent back. From what I could
tell, it broke it because the JS that does the
update gets the diff between the current partial
and the one sent in JSON and applies it to the
current one.

If the notification hasn't completed before the
page loads, the partial added to the page has a
<div> wrapping it, to initalise the
updateContent.js JS. This means the diff ends up
being between elements with a different level of
hierarchy:

Element 1:

  <div data-module="update-content">
    <div class="ajax-block-container">
    ...
    </div>
  </div>

Element 2:
  <div class="ajax-block-container">
  ...
  </div>

This seems to work OK when the partial
is a <div>, I assume because it's the same type of
element as the wrapper, but not when it's a
<section>:

Element 1:

  <div data-module="update-content">
    <section class="ajax-block-container">
    ...
    </section>
  </div>

Element 2:
  <section class="ajax-block-container">
  ...
  </section>

Because of all this, it's easier to just give it
the role of 'region'.
2020-09-10 23:12:29 +01:00
Tom Byers
ddf54d5ce3 Give selected pill item an id 2020-09-10 23:11:13 +01:00
Tom Byers
7589ee1cd5 Revert "Fix aria on jobs page" 2020-09-10 17:34:05 +01:00
Tom Byers
5cf33791a7 Merge pull request #3620 from alphagov/fix-aria-on-jobs-page
Fix aria on jobs page
2020-09-10 16:22:21 +01:00
Tom Byers
e1a4ba30d8 Merge pull request #3616 from alphagov/give-cross-image-better-contrast
Change cross icon to one with better contrast
2020-09-10 15:40:40 +01:00
Tom Byers
84b7227d4a Merge pull request #3605 from alphagov/prevent-user-name-email-being-cut-off
Prevent user name email being cut off
2020-09-10 15:10:58 +01:00
Chris Hill-Scott
f824b3a5eb Give specific error if international letters off
If a service doesn’t have permission to send international letters but
someone tries to upload a letter with a valid international address we
just tell them that the last line must be a UK postcode.

This is a bit opaque and:
- suggests that we’re not recognising at all that it’s not a UK letter
- doesn’t explain why it must be a UK postcode

This commit adds a new, error message which tells users why their letter
can’t be sent. And hopefully will give them a better idea of how to
resolve the problem, if they really do need to be able to send
international letters.
2020-09-10 11:25:17 +01:00
Tom Byers
e815a73233 Make jobs notification partial a section
If it has an accessible name, we're essentially
giving it a grouping role so it should be a
section.

Note: it could also have a role="region" but
sections are a bit more HTML5.
2020-09-09 22:31:32 +01:00
Tom Byers
af369fd5a2 Give selected pill item an id 2020-09-09 22:31:11 +01:00
Tom Byers
c777b0eafb Give links context on letter template page 2020-09-09 21:27:58 +01:00
Chris Hill-Scott
5e579ed45c Merge pull request #3595 from alphagov/map-key
Add a key to the map
2020-09-09 16:03:27 +01:00
Tom Byers
88b5cd9f5c Change cross icon to one with better contrast
Swaps out the old one (solid colour with lighter
grey) for one with the same colour as the text,
but no fill.

Also swaps out for an SVG for better scaling.
2020-09-09 15:18:29 +01:00
Leo Hemsted
d654323eb8 remove unused fn 2020-09-09 14:39:13 +01:00
Leo Hemsted
9e132263d2 make tests pass (acknowledge that code is wrong)
i really don't want to fix this right now but that total isn't quite right
2020-09-09 14:39:13 +01:00
Leo Hemsted
bc7d3710ab make sure countries library still returns values
to recap the previous commit, in the ward->local authority->county
library we want to return all local authorities and counties. We do this
by excluding anything that doesn't have children.

However, in the countries library, all four countries don't have
children.

I can't think of a generic way to separate these so just filter on the
library id
2020-09-09 14:39:13 +01:00
Leo Hemsted
256d2b2b60 add counties page
What was previously ward -> local authority is now a ward -> local
authority -> county. County only covers rural counties and not
metropolitan boroughs and other unitary authorities. Previously, there
was a page full of local authorities (unitary authorities and
districts), and each one of those would have a list of electoral wards.
However, now there are counties that contain a list of districts - so
this needs a new page - a checkbox for "select the county" and then a
list of links to district pages.

If you want to select multiple districts, you'll need to go into each
one of those sub-sections in turn and click select all.

Needed to tweak the query to retrieve the list of areas in a list for a
library. Previously, it just returned anything at top level (ie: didn't
have a parent). However, rural districts now have parents (the rural
counties themselves). So the query now returns "everything that isn't a
leaf node", or in more specific terms, everything that has at least
other row referring to it as a parent. So no electoral wards, since
they dont have any children, but yes to districts and counties.
2020-09-09 14:39:12 +01:00
Leo Hemsted
c421e14d69 regenerate broadcast areas with counties 2020-09-09 14:29:03 +01:00
Leo Hemsted
f806ffc2f6 add keep-old-features flag
got annoyed waiting to regenerate unsimplified geometry
2020-09-09 14:29:02 +01:00
Leo Hemsted
f80d25b467 move add steps into separate functions 2020-09-09 14:29:02 +01:00
Leo Hemsted
f235e4a4de refactor add steps into separate functions
also no point trying to make countries generic since it's the only thing
of its kind
2020-09-09 14:29:02 +01:00
Leo Hemsted
331fd375f4 dont include duplicate unitary districts
they're in both the local authority and County & Unitary Authority data
sets, so we should only add them once. Keep the LA one so the ctyua19
dataset is only used for counties
2020-09-09 14:29:02 +01:00
Leo Hemsted
a02e03ea3d clarify filepaths 2020-09-09 14:29:02 +01:00
Leo Hemsted
95207e3bfc add local authority to county mapping
map lower tier local authorities (districts within rural counties) to
upper tier local authorities (administrative counties) using the new
ctyua19 dataset.

nb: unitary authorities (eg: Southwark) are both lower tier AND upper
tier. For this first pass they turn up twice in the db, eg Southwark is
in there as `lad20-E09000028` and `ctyua19-E09000028`. For now, the
electoral wards within Southwark are mapped to the pre-existing
`lad20-E09000028`. Both lad20 and ctyua19 have data sets in
broadcast_area_features.
2020-09-09 14:29:02 +01:00
Leo Hemsted
0670675f10 update counties and unitary authorities
previous dataset was from 2016, this is from 2019.
data comes from
https://geoportal.statistics.gov.uk/datasets/counties-and-unitary-authorities-december-2019-boundaries-uk-bgc,
with the shapefile then passed through https://mapshaper.org/ to convert
it into geojson
2020-09-09 14:29:02 +01:00
Leo Hemsted
1ec45a5527 add local authority mapping file
maps lower tier local authorities to upper tier local authorities -
translation for humans: Maps districts to the counties that they are in.
For counties, a row looks like:
`255,E07000105,Ashford,E10000016,Kent`
(E07000105=Ashford, E10000016=Kent)

For unitary districts it maps that district to itself, eg:
`49,E06000052,Cornwall,E06000052,Cornwall`
where both codes are the same
2020-09-09 14:29:02 +01:00
Leo Hemsted
42e10861b0 put geojsons etc in source_files directory
just keeping things tidy
2020-09-09 14:29:02 +01:00
Chris Hill-Scott
f553158846 Add estimated areas for non-visual users
Since the key relies on visual association between the shapes on the
maps and the styling of the key, it won’t work for non-visual users.
An alternative way of giving them the same information is by providing
the size of the area numerically.
2020-09-08 16:56:39 +01:00
Chris Hill-Scott
0369472a76 Add a key to the map
To help people understand that broadcasting is not a precise technology,
we have shown the estimate bleed area on the map.

Because people aren’t familiar with the technology a visual only clue is
not enough. So this commit adds a key to the map, which explains what
the different outlines mean.

It also removes the sticky footer from this page to:
- make the key visible on the page
- make people scroll and review the map before they get to the big green
  button
- not reduce the size of the map any further
2020-09-08 16:44:49 +01:00
Tom Byers
9e6daecba3 Merge pull request #3610 from alphagov/fix-pill-tab-problems
Fix pill tab problems
2020-09-08 14:51:12 +01:00
David McDonald
9664af387e Merge pull request #3608 from alphagov/more-maps
Add map of broadcast areas to view-broadcast page
2020-09-08 14:26:16 +01:00
Chris Hill-Scott
ed7be81181 Merge pull request #3615 from alphagov/fix-extra-tracking
Fix extra tracking on numeric inputs
2020-09-08 13:46:58 +01:00
Pea M. Tyczynska
88a5fd56bf Merge pull request #3609 from alphagov/send-polygons-to-api
Send simple polygons to API along with areas
2020-09-08 12:23:12 +01:00