Skip to content

PDJB-912: Add back link to privacy notice pages#1361

Merged
Bill-Haigh merged 4 commits into
mainfrom
feat/PDJB-912-add-back-link-to-privacy-notice
May 21, 2026
Merged

PDJB-912: Add back link to privacy notice pages#1361
Bill-Haigh merged 4 commits into
mainfrom
feat/PDJB-912-add-back-link-to-privacy-notice

Conversation

@Bill-Haigh

@Bill-Haigh Bill-Haigh commented May 20, 2026

Copy link
Copy Markdown
Contributor

Ticket number

PDJB-912

Goal of change

Add a GOV.UK back link to the standalone privacy notice pages so users can easily return to where they came from, without showing a back link when the page is opened in a new tab.

Description of main change(s)

  • Adds a GOV.UK back link to the standalone landlord, local council and unauthenticated privacy notice pages
  • The back link is only rendered when the user reached the page via a same-tab link (footer or dashboard link); it is hidden when the page is opened in a new tab (e.g. from the registration journey) or accessed directly
  • Reuses the existing BackLinkInterceptor / BackUrlStorageService mechanism already used by the cookies page: the link URL carries a withBackUrl=<key> query param, the interceptor populates the backUrl model attribute, and the existing backLink fragment renders the link only when that attribute is set

Anything you'd like to highlight to the reviewer?

The in-journey privacy notice form pages (registration journeys) are intentionally out of scope — those journeys link to the standalone page with target="_blank" (opens in new tab), and the requirement is explicitly "back link only when not opening in a new tab".

Checklist

  • Controller tests for any new endpoints, including testing the relevant permissions
  • Single page integration tests have been added for any unhappy-flow UI features, e.g. validation errors
  • Test suite has been run in full locally and is passing
  • Branch has been rebased onto main and run locally, with everything working as expected (both for your new feature and any related functionality)
  • TODO comments referencing this JIRA ticket have been searched for and removed - if a future PR will address them, mention that here
  • QA instructions have been added to the ticket (particularly if this is the last PR required to complete the ticket)

@Bill-Haigh
Bill-Haigh marked this pull request as ready for review May 20, 2026 15:41

@samyou-softwire samyou-softwire left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, one comment on some out of scope behaviour & the ticket is looking for QA notes.

I notice the run tests pipeline never reported its status. are you able to rerun that pipeline?

Bill-Haigh and others added 3 commits May 21, 2026 11:33
…k-link-to-privacy-notice

# Conflicts:
#	src/main/kotlin/uk/gov/communities/prsdb/webapp/controllers/LocalCouncilDashboardController.kt
…rging main

PDJB-900 moved the LC dashboard's privacy/renters-rights links into the footer (using the global privacyUrl from GlobalModelAttributes, which already wraps with overrideBackLinkForUrl). The privacyNoticeUrl model attribute on LocalCouncilDashboardController is no longer referenced by any template, and the integration test that clicked the dashboard's old privacyNoticeLink can't be reproduced via the footer at the webapp test layer (the /privacy-notice -> /local-council/privacy-notice rewrite happens in infra).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…y-notice

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Bill-Haigh
Bill-Haigh added this pull request to the merge queue May 21, 2026
Merged via the queue into main with commit 4487419 May 21, 2026
8 checks passed
@Bill-Haigh
Bill-Haigh deleted the feat/PDJB-912-add-back-link-to-privacy-notice branch May 21, 2026 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants