Commit Graph

7182 Commits

Author SHA1 Message Date
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
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
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
Chris Hill-Scott
abdabe4571 Fix extra tracking on numeric inputs
Since we moved to using textboxes from GOV.UK Frontend the old class
wasn’t appearing in the page.
2020-09-08 12:02:03 +01:00
Tom Byers
58ad6fe4c7 Remove pill-item__label--selected class
It was used to mark labels of selected items when
we thought they might need extra styling but is
now redundant.
2020-09-08 11:46:32 +01:00
Rebecca Law
7cae303104 Fix unit tests for changes to the pill component. 2020-09-08 10:12:23 +01:00
Chris Hill-Scott
3af8ed521d Merge pull request #3594 from alphagov/fix-live-search-sub-areas
Don’t filter ‘All of’ choice with live search
2020-09-07 12:57:58 +01:00
Chris Hill-Scott
fe6feb313c Merge pull request #3611 from alphagov/line-7-address-example
Show address line 7 not postcode in example spreadsheet
2020-09-07 12:39:51 +01:00
Chris Hill-Scott
2a6c058c0f Merge pull request #3602 from alphagov/fix-chrome-autofill-font-size
Fix font-size when Chrome autofills inputs
2020-09-07 12:39:40 +01:00
Chris Hill-Scott
0459e26be9 Show address line 7 not postcode in example spreadsheet
Since the letter preview will now show address line 7, the example
spreadsheet we give should match.
2020-09-07 12:00:27 +01:00
Rebecca Law
52954191fa Merge branch 'master' into international-letters-form 2020-09-07 09:45:17 +01:00
Rebecca Law
0f64d4d136 Merge pull request #3564 from alphagov/int-letters-content
Add international letter rates to pricing page
2020-09-07 08:13:43 +01:00
Pea Tyczynska
3bfe3a2bf7 Send simple polygons to API along with areas
When creating broadcast message, or updating it.
We want to send simple polygons to API so we can
later relay them to the broadcast provider.

Test that update broadcast message sends polygons correctly
2020-09-04 16:55:02 +01:00
Tom Byers
452e253e2c Make the selected pill item a link
All other navigations have their selected item as
a link so we should match this.

Includes changes to the pill CSS so:
1. it doesn't use elements in the selectors
2. all the selectors use BEM

I did 2. because I had to change the
classes/selectors anyway, they might as well match
the style GOVUK Design System uses.
2020-09-04 16:17:04 +01:00
karlchillmaid
f775e18361 Add price update date
Added Monday's date, as that's when we plan to merge and deploy.
2020-09-04 14:28:23 +01:00
David McDonald
bf5ee37d6c Add margin to area list above map as looks cleaner 2020-09-04 10:27:19 +01:00
David McDonald
be563e73c6 Add map in details to broadcast view
Avoided using `closest` as not supported by IE8-11
https://caniuse.com/#search=closest

Used `parentElement` supported by IE9+
https://caniuse.com/#search=parentElement

Used `className` as supported by IE9+
https://caniuse.com/#search=className

Also rearranged the javascript for maps such that figuring out the
polygon array is done first and then the time when we need to have the
details component open before closing it again is kept to minimum
2020-09-04 10:20:54 +01:00
Tom Byers
c6711a113c Update h1 on pill pages to work with new pill
Pill pages are:
- /notifications
- /template-usage
- /monthly
- /organisations/<organisation_id>
- /templates

Includes changes to:
- the folder-path component
- the page-header component

...all their h1s have the same id.
2020-09-04 09:02:36 +01:00
Tom Byers
48902a2bac Give all h1s an id 2020-09-04 09:02:36 +01:00
Tom Byers
9598d3a97b Change pills from tabs to navigation
Changes the HTML to do the following:
- remove all tabs semantics
- give the list a role of navigation
- label the navigation with the h1
- mark the selected item with aria-current
2020-09-04 09:02:36 +01:00
David McDonald
32a794aacd Move styling into separate files for reuse 2020-09-03 10:50:58 +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
afb8669b2f Merge pull request #3597 from alphagov/fix-pill-spacing-2nd-attempt
Fix spacing in pill items
2020-09-02 11:16:40 +01:00
Tom Byers
0560066638 Change mixins-before-declarations Sass-lint rule
We write our Sass to be mobile-first, meaning we
declare the value for a property (for mobile) and
then add all other variations (for other
viewports) afterwards.

Because of this, we need mixins that produce media
queries to be able to follow declarations.

This extension to the rule is also hinted at as
good practice in the docs:

7847511b61/docs/rules/mixins-before-declarations.md
2020-09-02 10:59:31 +01:00
karlchillmaid
ae1dc14ff2 Update heading class and add ID 2020-09-01 18:36:33 +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
Pea M. Tyczynska
84e3a7ffd5 Merge pull request #3601 from alphagov/only-govt-users-can-be-invited-to-broadcast-services
Broadcast: only approved domain users can be invited
2020-08-28 15:04:50 +01:00
Pea Tyczynska
e0faad6cea Only approved email domain users can be invited
to broadcast services. This is done to improve security.
2020-08-28 14:41:03 +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