Commit Graph

11991 Commits

Author SHA1 Message Date
Chris Hill-Scott
a145c501ab Use Jinja template for branding request tickets
Following the pattern established by
https://github.com/alphagov/notifications-admin/pull/4041/files
this commit move the ticket message from a Python f-string to a proper
templating language.
2021-10-26 18:14:09 +01:00
Chris Hill-Scott
2308dad0d2 Merge pull request #4051 from alphagov/non-flask-dependencies
Update some non-controversial dependencies
2021-10-21 11:23:05 +01:00
Leo Hemsted
9a576caf66 Merge pull request #4050 from alphagov/message-status-url-fix
fix link in delivery status page
2021-10-20 15:23:45 +01:00
Chris Hill-Scott
a583999725 Freeze requirements 2021-10-20 15:02:53 +01:00
pyup-bot
908bea2163 Update pytz from 2021.1 to 2021.3 2021-10-20 14:50:12 +01:00
pyup-bot
15099fe680 Update humanize from 3.6.0 to 3.12.0 2021-10-20 14:50:12 +01:00
pyup-bot
a7205af257 Update pyexcel-xls from 0.6.2 to 0.7.0 2021-10-20 14:50:12 +01:00
pyup-bot
d374dcc10e Update pyexcel-io from 0.6.4 to 0.6.5 2021-10-20 14:50:12 +01:00
pyup-bot
7d3ac30d58 Update pyexcel from 0.6.6 to 0.6.7 2021-10-20 14:49:42 +01:00
Leo Hemsted
5e36061df6 fix link in delivery status page 2021-10-20 11:39:05 +01:00
Tom Byers
b8745e7b18 Merge pull request #4038 from alphagov/fix-small-issues
Fix small accessibility issues with alerts pages
2021-10-19 11:26:22 +01:00
Ben Thorner
1959128736 Merge pull request #4049 from alphagov/fix-dev-assets-again
Fix static assets in development (again)
2021-10-19 11:21:32 +01:00
Tom Byers
0987787df6 Give map attribution links an underline
Makes them identifiable as links based on
something other than just colour.
2021-10-19 11:09:40 +01:00
Tom Byers
b968c0299e Change map key items from list to paragraphs
I recently found that there is a problem with the
overuse of lists online for sequences of content
that don't need to be in a list. I think that's
what we're doing with our map key.

The problem is large enough that browsers include
heuristics to determine if lists should be
presented as such to the accessibility API (and so
to assistive tech' like screen readers). This
thread contains more details:

https://twitter.com/cookiecrook/status/1337226933822603270

Based on the metric described in the thread:

'If all of the styles that make it “list-like”
have been removed, it’s no longer relevant to
convey it as a list.'

...or

'if a sighted user doesn’t need to know it’s a
list, why would a screen reader user need to know
or want to know?'

Based on that, I think the items in our map key
should be paragraphs, not items in a list.

Also, they read really well as sentences when
announced by a screen reader, partly because of
the extra (hidden) info @quis added to them.
This also doesn't change their visual appearance.
2021-10-19 11:09:39 +01:00
Tom Byers
87eb06f2ce Remove region role from live-search status
The Siteimprove accessibility testing tool raised
an issue with our having a div with role=region in
the page that was:
- empty
- with no label

The status has a role of 'region' which makes it a
generic landmark. This means that, unlike <nav>
or <footer>, users don't get any hint of its
purpose from its HTML tag. If we did want this,
we'd have to give it a label to explain that.

I don't think we do want those things. I think
it's more of a sentence that sits between the
searchbox and the results, just saying how many
are there.

That being the case, we should just remove the
role. It's also what design system do with their
character count, which is similar:

https://design-system.service.gov.uk/components/character-count/

Unlike that component, I don't think we need to
use aria-describedby to set the status as the
description of the searchbox because it describes
the results, not the search term.
2021-10-19 11:09:38 +01:00
Tom Byers
2b91d1d524 Fix mis-spelling of aria-describedby
This is currently spelt incorrectly though it
seemed to work nonetheless. Can only assume this
is a common error, for this attribute or all
attribute names, so browsers work it out.

This makes the spelling match the spec:

https://www.w3.org/TR/wai-aria/#aria-describedby
2021-10-19 11:09:37 +01:00
Tom Byers
6747bd8bcf Change layout of tour pages showing service nav
They have the service navigation inside the <main>
block. This means you can't bypass it when you use
the skiplink.

This copies other layouts that inherit from
admin_template.html and sets the contents of the
'main' template block so the service navigation is
placed before the <main> tag.
2021-10-19 11:09:36 +01:00
Tom Byers
981083d465 Add vertical spacing above set channel h1
To make it match other pages which use the legend
as the h1.
2021-10-19 11:09:17 +01:00
Ben Thorner
1869f9a53a Fix static assets in development (again)
Previous attempt: https://github.com/alphagov/notifications-admin/pull/4048

The problem with the previous attempt is that the assets built on
CI become part of the build artefact used for production [1]. This
switches back to my original approach of using environment.sh, but
with a technique to cope with it being absent on CI. I've tested it
works with and without an environment.sh file.

Note that "npm install" is fine to be on a separate line, since a
non-zero exit code will always cause "make" to stop.

[1]: https://github.com/alphagov/notifications-aws/blob/master/concourse/templates/admin.yml.j2#L47
2021-10-19 11:08:17 +01:00
Ben Thorner
61b8e26b9a Merge pull request #4048 from alphagov/fix-static-assets-dev
Fix broken CSS links to assets in development
2021-10-19 10:03:10 +01:00
Ben Thorner
f8d97821a2 Fix broken CSS links to assets in development
This depends on an environment variable being set when the assets
are built in a development context [1]. Otherwise, the assets get
their '/static' prefix stripped like they do for production, which
isn't compatible with serving them under '/static' in development.

[1]: 66e5022198/gulpfile.js (L37-L41)
2021-10-18 17:32:28 +01:00
Ben Thorner
66e5022198 Merge pull request #4039 from alphagov/bump-python-client-6-3-0
Bump python-client to 6.3.0
2021-10-18 11:25:20 +01:00
Chris Hill-Scott
11610b671e Merge pull request #4041 from alphagov/mou-signatory-request-to-go-live
Put details of the organisation’s MOU signatory in the go live ticket
2021-10-15 09:42:43 +01:00
Chris Hill-Scott
a94fa760cf Merge pull request #4045 from alphagov/bump-test-dependencies
Bump test dependencies
2021-10-15 09:34:47 +01:00
Chris Hill-Scott
d162d7264d Reduce scope of content assertion
This makes it clearer which part of the content we care about.
2021-10-15 09:31:48 +01:00
Chris Hill-Scott
4a57cf0f0d Use yes/no formatter in more places 2021-10-15 09:23:32 +01:00
Chris Hill-Scott
af64da8f82 Move support ticket template into its own folder
In the future this could be a place to put other support ticket content,
if we turn them into Jinja template
2021-10-15 09:23:32 +01:00
Chris Hill-Scott
12d5c4f900 Only use ‘on behalf of’ to refer to person
Since we’ve introduced the ‘on behalf of’ wording to the go live ticket
(to talk about who the agreement has been signed on behalf of) it’s
confusing to use the same terminology to talk about the organisation
for whom the agreement has been accepted.
2021-10-15 09:23:32 +01:00
Chris Hill-Scott
c670926eaf Alias some variables
This just makes the code a bit less verbose.
2021-10-15 09:23:32 +01:00
Chris Hill-Scott
98e9749771 Refactor to put yes/no/can’t tell in one place
The code is a bit easier to follow if the same output is always coming
from the same statement in the code.
2021-10-15 09:23:31 +01:00
Chris Hill-Scott
72742cf477 Move unknown organisation logic into Jinja
Human readable content like this doesn’t really belong in the model
layer, it’s more natural to have it in the presentation layer.
2021-10-15 09:23:31 +01:00
Chris Hill-Scott
eefc903b25 Move ‘can’t tell’ message to Jinja
Human readable content like this doesn’t really belong in the model
layer, it’s more natural to have it in the presentation layer.
2021-10-15 09:23:31 +01:00
Chris Hill-Scott
d76dacc41e Move ‘agreement signed’ message into Jinja
Human readable content like this doesn’t really belong in the model
layer, it’s more natural to have it in the presentation layer.
2021-10-15 09:23:31 +01:00
Chris Hill-Scott
1ab83c48e3 Move request to go live notes into template
We can make the `as_agreement_statement_for_go_live_request` method less
complex by offloading some of the content it returns to the presentation
layer.
2021-10-15 09:23:31 +01:00
Chris Hill-Scott
ec703c5998 Add details of MOU signatory to go live ticket
This will help us monitor organisations that have signed our MOU using a
shared inbox and prevent it happening in future.

https://www.pivotaltracker.com/story/show/179782040
2021-10-15 09:23:30 +01:00
Chris Hill-Scott
fad3ff70f2 Add a formatter for yes/no
This is a bit neater than a bunch of repetetive ternary statements.
2021-10-15 09:23:30 +01:00
Chris Hill-Scott
f85ee3dd0a Move go live ticket content to a Jinja template
Jinja is a better language for doing complex templating. And we can use
the global Jinja scope to automatically get access to things like
`current_user` and our formatters.
2021-10-15 09:23:30 +01:00
Chris Hill-Scott
dd573fec87 Format organisation type nicely in go live requests 2021-10-15 09:23:30 +01:00
Chris Hill-Scott
ee3fb2f175 Pin importlib-metadata
We can’t use the latest version of importlib-metadata because it’s
pinned to <4.3 by the newest version of flake8.

The conflict is caused by:
    The user requested importlib-metadata==4.8.1
    click 8.0.1 depends on importlib-metadata; python_version < "3.8"
    pytest 6.2.5 depends on importlib-metadata>=0.12; python_version < "3.8"
    flake8 4.0.1 depends on importlib-metadata<4.3; python_version < "3.8"

Our `make freeze-requirements` task doesn’t catch this because it
doesn’t look at dependencies in `requirements-for-test.txt`. Therefore
it only freezes the version that `click` is specifying, which is the
latest version.

Pinning the version in `requirements.in` gets around this.
2021-10-13 15:59:35 +01:00
Ben Thorner
c54c9e54ed Bump python-client to 6.3.0 2021-10-13 15:46:32 +01:00
pyup-bot
29bfb227ee Update flake8-bugbear from 21.4.3 to 21.9.2 2021-10-13 13:03:39 +01:00
pyup-bot
919c530023 Update flake8 from 3.9.2 to 4.0.1 2021-10-13 13:03:39 +01:00
pyup-bot
ecb123ca8d Update beautifulsoup4 from 4.9.3 to 4.10.0 2021-10-13 13:03:39 +01:00
pyup-bot
3deaba91c3 Update pytest-xdist from 2.2.1 to 2.4.0 2021-10-13 13:03:39 +01:00
pyup-bot
a82b2979be Update pytest from 6.2.4 to 6.2.5 2021-10-13 13:03:39 +01:00
pyup-bot
9c52576872 Update isort from 5.8.0 to 5.9.3 2021-10-13 13:03:39 +01:00
Chris Hill-Scott
84195d36af Merge pull request #4030 from alphagov/update-privacy-page
Update Privacy page content
2021-10-13 12:36:06 +01:00
karlchillmaid
d87f70c5f3 Revert ‘every’ to ‘any’ 2021-10-13 12:24:11 +01:00
karlchillmaid
a1258114a5 Change ‘last updated’ date 2021-10-13 12:24:10 +01:00
karlchillmaid
ed5e50d542 Update initialisation of ‘UK’ 2021-10-13 12:24:10 +01:00