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'.
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.
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.
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.
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
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.
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
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.
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
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.
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
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
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.
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.