Skip to content

Implement read-only tabs [WHIT-3152]#11228

Draft
ChrisBAshton wants to merge 6 commits intomainfrom
read-only-tabs
Draft

Implement read-only tabs [WHIT-3152]#11228
ChrisBAshton wants to merge 6 commits intomainfrom
read-only-tabs

Conversation

@ChrisBAshton
Copy link
Contributor

@ChrisBAshton ChrisBAshton commented Mar 11, 2026

  • TODO: add tests
  • Consider adding server-side logic to prevent editing of published editions

What

  • Adds 'read-only' equivalents for the Images and Features tabs, when viewing them in the context of a non-draft edition
  • Re-enables the document navigation tabs now that read-only is more widely supported

Why

In #10332, we introduced a 'read-only' version of the main document summary tab, to allow publishers to see what values / contents they had set without having to create a new draft edition to see it(!).

That was only partly useful, because a lot of the content of a document is tucked away on other screens, e.g. Images tab. So this PR extends the 'read-only' concept more widely.

This also solves an issue whereby it was possible to make edits to offsite links directly from the published tab screen, thereby editing offsite links without going through the draft creation process.

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

Screenshots

Social media accounts tab

Before After

Images tab

Before After

Features tab - Currently Featured

Before After

Features tab - GOV.UK content

Before After

Features tab - External websites

Before After

⚠️ 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.

We're looking to add a 'read only tabs' feature for non-draft
editions, which will require dropping these actions from the
card component. Moving the action population out of the view is
the first step to achieving that.

This commit also adds missing tests for that view logic.
We're looking to add a 'read only tabs' feature for non-draft
editions, which will require dropping these actions from the
card component. Moving the action population out of the view is
the first step to achieving that.

This commit also adds missing tests for that view logic.
This enables 'read-only' view of the Images tab
We'd disabled this before because all tabs other than Document
did not yet have 'read-only' mode enabled. That is no longer the
case and we should allow publishers to navigate to the different
read-only tabs to see what content they have set in each place.
We want to warn the publisher on every tab that the content is
not editable.
This is so we can surface a read-only view for showing publishers
the features on a published edition.
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.

1 participant