Commit Graph

12296 Commits

Author SHA1 Message Date
Tom Byers
73cc034676 Merge pull request #4141 from alphagov/refactor-current-alerts-html
Fix current alerts focus styles - part 1
2022-02-09 11:23:07 +00:00
Chris Hill-Scott
6fe766ffaf Merge pull request #4152 from alphagov/bump-utils-53
Bump utils to 53.0.0
2022-02-08 09:56:15 +00:00
Katie Smith
d8b421a9d6 Merge pull request #4151 from alphagov/brand-new-branding-tidy-ups
Tidy up new email branding routes
2022-02-08 08:53:00 +00:00
Chris Hill-Scott
d660db84b9 Merge pull request #4147 from alphagov/refactor-mixins
Refactor mixins for reuse and clearer naming
2022-02-07 09:26:23 +00:00
Chris Hill-Scott
61660134ff Bump utils to 53.0.0
Changes:

53.0.0
---

* `notifications_utils.columns.Columns` has moved to
  `notifications_utils.insensitive_dict.InsensitiveDict`
* `notifications_utils.columns.Rows` has moved to
  `notifications_utils.recipients.Rows`
* `notifications_utils.columns.Cell` has moved to
  `notifications_utils.recipients.Cell`

52.0.0
---

* Deprecate the following unused `redis_client` functions:
  - `redis_client.increment_hash_value`
  - `redis_client.decrement_hash_value`
  - `redis_client.get_all_from_hash`
  - `redis_client.set_hash_and_expire`
  - `redis_client.expire`

51.3.1
---

* Bump govuk-bank-holidays to cache holidays for next year.

51.3.0
---

* Log exception and stacktrace when Celery tasks fail.
2022-02-04 10:43:36 +00:00
Katie Smith
a7a593fd8b Make separate endpoints for GOV.UK email branding options
The endpoint to change the email branding to "GOV.UK" branding and
"GOV.UK and organisation" branding was the same but with a query string
used to determine which of the two options had been selected. This makes
them two separate endpoints, which makes the code a bit simpler and
hopefully means there is less chance of things not working as expected.
2022-02-03 11:31:25 +00:00
Katie Smith
194fec9009 Remove old branding URLs
We've changed the URLs for these endpoints but needed to keep the old
URLs in place in addition to the new URLs in case anyone was in the
middle of changing their branding as the change was being deployed.
We can now safely remove the old URLs.
2022-02-03 11:03:16 +00:00
Katie Smith
14cb883ed9 Merge pull request #4145 from alphagov/brand-new-branding
Email branding changes, step one
2022-02-03 10:27:51 +00:00
Katie Smith
c5db847543 Change both existing branding URLs
This changes the URLs for someone to request new email or letter
branding to match the new URLs we've agreed for the new email branding
changes. The old URLs are still in place for now too to keep backwards
compatibility.
2022-02-03 09:59:21 +00:00
Katie Smith
f92167de71 Only show branding description pages if branding allowed for service
It shouldn't be possible to view the page to confirm that you want a
particular type of email branding if that branding is not allowed for
your service. Although we don't show banned branding options on the
branding form, it would have been possible to visit the relevant URLs
directly.

We now give a `404` status page if you visit a page to select branding
that isn't allowed.
2022-02-03 09:59:21 +00:00
Katie Smith
f9c551a558 Add and use textarea component from GOV.UK Frontend
For the "Something else" branding form we want the form label to be the
title. This brings in the textarea component from GOV.UK Frontend in
order to do this since that contains code to set a the textarea label as
the page heading in an accessible way.

The rest of the textarea fields have not been switched to use the new
component yet.
2022-02-03 09:59:21 +00:00
Katie Smith
88a003ff72 Minor change to hint text for branding
This adds a fullstop to the hint text for all the branding forms,
as an agreed content change.
2022-02-03 09:59:21 +00:00
Katie Smith
92f76638c8 Split up email branding form into separate pages
We were showing the form to request email branding with a button which
submits your choice immediately. Now, we only submit the form
immediately if "Something else" is the only branding option available to
you. If you select any other radio button (or select "Something else"
when it's not the only option) we take you to another page which either
contains more information or a textbox to fill in the details for the
branding you want.

There is currently some duplication between the new pages and their
tests, but these will be changed in future versions of the work so will
start to differ more.
2022-02-03 09:59:21 +00:00
Katie Smith
d45265fcce Split out existing tests related to submitting branding
The existing tests were parameterized to contain the cases both where
the branding form is successfully submitted and those where it isn't. We
were using `pytest.mark.xfail` to check that the tests fail as expected
if there were errors on the form. However, since I'll be changing how
the form validation works, I want to make sure that these tests were
actually failing because of the form validation and not because of
another reason, such as a slight difference in Zendesk ticket output.

This creates separate tests for cases where data entered in the form
is invalid.
2022-02-03 09:59:21 +00:00
Katie Smith
d4454a982d Split branding-options.html into two
This splits the template into separate templates for emails and letters
since the journey for email branding is about to change.
2022-02-03 09:59:21 +00:00
Katie Smith
4226193346 Split up the branding_request endpoint
The endpoint used to handle both email and letter branding, but this
replaces `.branding_request` with `.email_branding_request` and
`.letter_branding_request` instead. This is in preparation for changing
how email branding works.

The `from_template` arg was only possible for letter branding, so I've
removed that from the `.email_branding_request` endpoint.
2022-02-03 09:59:21 +00:00
Chris Hill-Scott
caccbb98d8 Merge pull request #4150 from alphagov/pass-admin-url-reset-password
Pass admin URL to API when resetting password
2022-02-03 09:20:35 +00:00
Tom Byers
10ab1dfe72 Fix focus bug in Safari
Most browsers apply the focus style when a link is
clicked but Safari just applies the active style.
This meant our large links, with expanded click
areas, didn't get the focus style themselves but
their psuedo-elements (which create the expanded
click area) did.

This adds the focus styles to the active state of
links with the expanded click area, to ensure all
of their click area gets the focus style.
2022-02-02 20:24:14 +00:00
Tom Byers
5ad8f41123 Add large link, no hint variant to file-list
At present the file-list pattern assumes each
item has hint text below the link and so increases
the hit area to overlap the hint. This adds a
variant for items without one and uses it on the
page for choosing an alert sub-area.
2022-02-02 20:23:58 +00:00
Chris Hill-Scott
70186dbe9f Pass admin URL to API when resetting password
This follows the pattern for invite emails where the admin app tells the
API which domain to use when generating the link.
2022-02-02 16:55:44 +00:00
Rebecca Law
876c7969e1 Merge pull request #4149 from alphagov/fix-link-on-roadmap
Add missing </a> tag
2022-02-02 09:20:27 +00:00
karlchillmaid
aeabafa488 Add missing </a> tag 2022-02-02 09:09:17 +00:00
Rebecca Law
3c7f222066 Merge pull request #4148 from alphagov/add-blog-link-to-roadmap
Add a link to the Celery 5 blog post from our roadmap
2022-02-02 07:59:42 +00:00
Rebecca Law
453a1a699f Merge pull request #4107 from alphagov/mark-letter-invalid-if-over-10-sheets-169209742
Show validation-failed status for templated letters over 10 pages
2022-02-02 07:58:34 +00:00
karlchillmaid
e611646d2b Add a link to the Celery 5 blog post 2022-02-02 07:47:44 +00:00
Pea Tyczynska
ffb8549a21 Merge pull request #4137 from alphagov/rename_column_in_billing_report
Rename sms_fragments to sms_chargeable_units
2022-02-01 17:01:03 +00:00
Pea Tyczynska
9862acd7ee Hint that report is inclusive of both start date and end date
Bu changing labels for date input fields.
2022-02-01 16:48:05 +00:00
Pea Tyczynska
feb2657040 Change formatting for guidance from list to table. Also rewrite
some of the guidance following content review.

Co-authored-by: karlchillmaid <karl.chillmaid@digital.cabinet-office.gov.uk>
2022-02-01 16:47:38 +00:00
Chris Hill-Scott
e918e2497b Rename mixin to clarify purpose
`SortableMixin` no longer has anything to do with sorting, except that
it inherits from the similarly-named `SortByNameMixin`.

This commit:
- renames it to describe its main purpose: doing equality (and identity)
  checks based on the `id` attribute
- makes it no longer inherit from `SortByNameMixin`, so that the two can
  be used independently or combined
2022-02-01 14:31:13 +00:00
Chris Hill-Scott
82b3a96a83 Use SortByName mixin where possible
Implementing `__lt__` makes objects sortable.

Rather than reimplementing `__lt__` each time we want to make an object
sortable by name, we can inherit from the extant `SortByNameMixin`.
2022-02-01 14:29:50 +00:00
Rebecca Law
49138946ac Update comment to help clarify the decision for this approach to showing
letters that are too long.
2022-02-01 13:20:25 +00:00
Tom Byers
41e74d249c Merge pull request #4143 from alphagov/swap-domdiff-for-morphdom
Replace domdiff library with morphdom
2022-02-01 10:50:29 +00:00
karlchillmaid
5efabd5d1c Merge pull request #4144 from alphagov/tell-users-about-postage-changes
Add postage changes
2022-01-28 17:40:42 +00:00
karlchillmaid
ed14b72779 Update description 2022-01-28 17:15:05 +00:00
karlchillmaid
a31d4c1746 Add postage changes 2022-01-28 16:43:14 +00:00
Chris Hill-Scott
36674c8e76 Merge pull request #4142 from alphagov/logo-cdn-domain-config
Make logo CDN domain into simple config
2022-01-28 15:00:50 +00:00
Tom Byers
77f7d1453c Replace domdiff library with morphdom
We added domdiff to replace the DiffDOM library
here:

87f54d1e88

DiffDOM had updated its code to be written to the
ECMAScript 6 (ES6) standard and so needed extra
work to work with the older browsers in our
support matrix. This was recorded as an issue
here:

https://www.pivotaltracker.com/n/projects/1443052/stories/165380360

Domdiff didn't work (see below for more details)
so this replaces it with the morphdom library.
Morphdom supports the same browsers as us and is
relied on by a range of large open source
projects:

https://github.com/patrick-steele-idem/morphdom#what-projects-are-using-morphdom

It was tricky to find alternatives to DiffDOM so
if we have to source alternatives in future, other
options could be:
- https://github.com/choojs/nanomorph
- https://diffhtml.org/index.html (using its
  outerHTML method)

Why domdiff didn't work

Turns out that domdiff was replacing the page HTML
with the HTML from the AJAX response every time,
not just when they differed. This isn't a bug.
Domdiff is bare bones enough that it compares old
DOM nodes to new DOM nodes with ===. With our
code, this always results to false because our new
nodes are made from HTML strings from AJAX
response so are never the same node as the old
one.
2022-01-27 11:37:53 +00:00
Chris Hill-Scott
4f672cb5dc Make logo CDN domain into simple config
Having this as a function which does string parsing and manipulation
surprised me a bit when I was trying to figure out why something wasn’t
working.

It’s more in line with the way we do other config like this (for example
`ASSET_PATH`) to make it a simple config variable, rather than trying to
be clever and guess things based on other config variables.

It’s also less code, and is explicit enough that it doesn’t need tests.
2022-01-27 10:33:05 +00:00
Pea Tyczynska
eadf32410b Add guidance to billing report page
Following a team cuddle where we checked how different people
interpret the billing report. We found that some things about
the report are ambiguous and that it would be helpful to have
some guidance on the page where the report can be downloaded,
2022-01-25 17:43:28 +00:00
Pea Tyczynska
2224eacf6b Merge pull request #4135 from alphagov/display_broadcast_cancelled_by_api
Display if broadcast was cancelled via API
2022-01-21 14:04:18 +00:00
Tom Byers
80953d02dd Merge pull request #4139 from alphagov/review-accessibility-statement
Review and update accessibility statement
2022-01-21 10:33:26 +00:00
Leo Hemsted
f45becf3eb Merge pull request #4138 from alphagov/remove-crypto-pin
remove cryptography pin
2022-01-21 10:31:09 +00:00
Tom Byers
61ce8e8d65 Merge branch 'master' into review-accessibility-statement 2022-01-21 10:11:47 +00:00
Tom Byers
2a343aae67 Add HTML abbrevation back
Co-authored-by: karlchillmaid <karl.chillmaid@digital.cabinet-office.gov.uk>
2022-01-21 10:04:28 +00:00
karlchillmaid
88edb2aafe Bump date 2022-01-21 09:01:10 +00:00
Ben Thorner
d34655b5e8 Merge pull request #4136 from alphagov/update-roadmap-january-22
Update public roadmap for Q4, January 2022
2022-01-20 17:55:07 +00:00
karlchillmaid
97a0b15b0b Merge pull request #4130 from alphagov/add-anchors
Add anchor IDs to headings on GOV.UK Notify
2022-01-20 17:38:25 +00:00
Chris Hill-Scott
862b95751b Fix links which point at text message status anchor 2022-01-20 15:08:02 +00:00
Tom Byers
b12c82965c Review and update accessibility statement
As with the last update, the work prepping the
interface that will be used for emergency alerts
for its accessibility audit took priority and has
taken longer than expected. Because of this, we
haven't had time to work on the issues listed
here.

This updates the planned timings to reflect what
we now believe will be possible with the work left
on emergency alerts and amount of work required to
fix them.
2022-01-20 15:01:53 +00:00
karlchillmaid
280608c576 Update ‘Things we’ve done’ content 2022-01-20 13:59:18 +00:00