Skip to content

Remove legacy topical events [WHIT-3059]#11192

Draft
ChrisBAshton wants to merge 3 commits intomainfrom
remove-legacy-topical-events
Draft

Remove legacy topical events [WHIT-3059]#11192
ChrisBAshton wants to merge 3 commits intomainfrom
remove-legacy-topical-events

Conversation

@ChrisBAshton
Copy link
Contributor

@ChrisBAshton ChrisBAshton commented Mar 2, 2026

Audit

The audit of existing tests for topical events led to three other housekeeping / preparatory PRs:

In addition we've identified the following legacy behaviour and remediation steps:

  • Organisations can only be tagged to so-called 'active' topical events (where an end date has been specified, and it is before 'today'). We're happy dropping this and letting organisations tag to any topical event.
  • We surfaced 'number of detailed guides tagged to the topical event' on the topical event index page and summary page. We're happy dropping this as the info is available on the Features tab. We proposed removing this a while ago. It looks like the surfacing was first introduced way back in
    46a7798#diff-aebdda5489e75983ed804d3897bf708fadde13cd52b6815c31d25ddbf0254aaeR55-R56, with no clear reason for it
  • republish_feature_organisations_to_publishing_api not needed - it happens automatically now through link expansion 🎉
  • Some file caching of topical events, but we looked into it and decided the complexity wasn't worth the negligible performance improvement
  • We've agreed having start/end date fields offers little value and these won't be carried over to the new style topical events
  • "Topical Event Featurings" .feature file (and others like it) have StandardEdition equivalents already

What

The purpose of this PR is to audit the existing legacy topical event code to ensure all functionality has been considered and either carried over or deliberately omitted. The aim is to end up with a draft PR that deletes all legacy topical event code, and a passing CI build. This should make legacy topical event code deletion much smoother.

NB, we'd then need to raise a PR to drop the following database tables:

  • topical_events
  • topical_event_organisations
  • topical_event_memberships
  • topical_event_featurings
  • topical_event_featuring_image_data
  • topical_event_about_pages

...and drop topical_event_id from the features table.

Their behaviour would now be encapsulated in the "editions" table and "edition_links" and "feature_lists"/"features" tables (and whatever tables we introduce for multi-page architecture).

Why

Jira: https://gov-uk.atlassian.net/browse/WHIT-3059


⚠️ This repo is Continuously Deployed: make sure you follow the guidance ⚠️

This application is owned by the Whitehall Experience team. Please let us know in #govuk-whitehall-experience-tech when you raise any PRs.

Follow these steps if you are doing a Rails upgrade.

@ChrisBAshton ChrisBAshton force-pushed the remove-legacy-topical-events branch 9 times, most recently from acb1aed to af52572 Compare March 3, 2026 10:36
@ChrisBAshton ChrisBAshton force-pushed the remove-legacy-topical-events branch 7 times, most recently from e65cf3a to 2ae7f96 Compare March 4, 2026 15:25
@ChrisBAshton ChrisBAshton changed the base branch from main to refactor-topical-event-dependency-tests March 4, 2026 15:27
@ChrisBAshton ChrisBAshton force-pushed the refactor-topical-event-dependency-tests branch 3 times, most recently from 2c002a0 to 4b91716 Compare March 4, 2026 16:52
@ChrisBAshton ChrisBAshton force-pushed the remove-legacy-topical-events branch from 2ae7f96 to 3fb7ecc Compare March 4, 2026 16:54
@ChrisBAshton ChrisBAshton force-pushed the refactor-topical-event-dependency-tests branch from 4f787da to 07fa26f Compare March 6, 2026 09:23
@ChrisBAshton ChrisBAshton force-pushed the remove-legacy-topical-events branch 4 times, most recently from 09bd626 to a1a3cb2 Compare March 6, 2026 17:37
@ChrisBAshton ChrisBAshton force-pushed the refactor-topical-event-dependency-tests branch 2 times, most recently from e639989 to 724f05a Compare March 9, 2026 09:06
@ChrisBAshton ChrisBAshton force-pushed the remove-legacy-topical-events branch from bb936f1 to ecab08a Compare March 9, 2026 09:14
@ChrisBAshton ChrisBAshton force-pushed the refactor-topical-event-dependency-tests branch from 724f05a to e81f255 Compare March 9, 2026 09:15
@ChrisBAshton ChrisBAshton force-pushed the remove-legacy-topical-events branch 2 times, most recently from af477e3 to f356782 Compare March 9, 2026 09:36
@ChrisBAshton ChrisBAshton force-pushed the refactor-topical-event-dependency-tests branch 3 times, most recently from c564c8d to ddee9d4 Compare March 9, 2026 09:46
@ChrisBAshton ChrisBAshton force-pushed the remove-legacy-topical-events branch 2 times, most recently from 41e0eb8 to 030ec57 Compare March 9, 2026 09:58
Base automatically changed from refactor-topical-event-dependency-tests to main March 9, 2026 10:07
@ChrisBAshton ChrisBAshton force-pushed the remove-legacy-topical-events branch 2 times, most recently from 4fbb573 to 7ec7fe5 Compare March 9, 2026 14:43
@ChrisBAshton ChrisBAshton changed the title [WIP] Remove legacy topical events [WHIT-3059] Remove legacy topical events [WHIT-3059] Mar 9, 2026
@ChrisBAshton ChrisBAshton changed the base branch from main to tweak-opting-into-topical-events March 9, 2026 14:43
@ChrisBAshton ChrisBAshton force-pushed the tweak-opting-into-topical-events branch from 2851051 to e4d7227 Compare March 10, 2026 08:07
None of its behaviour needs carrying over to config driven
topical events.
This looks like it would only be used by content types that update
Search API directly. But all classes that include Edition::TopicalEvents
inherit from Edition, which updates Search API the idiomatic way
via Publishing API, so I don't think this method is doing anything.
@ChrisBAshton ChrisBAshton force-pushed the remove-legacy-topical-events branch from 7ec7fe5 to 3187568 Compare March 10, 2026 08:10
Base automatically changed from tweak-opting-into-topical-events to main March 10, 2026 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant