Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Landing Pages to the list of edition classes #9631

Merged
merged 3 commits into from
Nov 20, 2024

Conversation

richardTowers
Copy link
Contributor

@richardTowers richardTowers commented Nov 19, 2024

This changes behaviour in a couple of ways:

  1. It causes landing pages to show up in the "Document types" dropdown on the editions index page (which is my primary motivation for doing this)
  2. It adds support for the [internal admin link](/government/landing-pages/888) style links for landing pages, which previously wouldn't have worked.

For the first use case, we remove landing pages for non-gds-admins, since other users can't do anything useful with landing pages.

The second use case isn't something I particularly care about, but there are tests for it so I had to make it work.

There's also a third side effect of adding LandingPage to the edition classes, which is that they would be sent to search-api somehow. I don't think we want or need that behaviour for landing pages, as we're already populating the search indexes via publishing-api. So I've excluded landing pages from that process.

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

It's getting a bit annoying not being able to find all the landing pages on the editions index page.

This adds the edition class to the filter, but removes it for non-gds-admins, since landing pages are currently restricted to those users.
We're happy with LandingPages being sent to the search indexes via. publishing-api, there's no need for them to appear here too.
Now that LandingPage is part of the edition_classes list, we get tests that check link rewriting works. Which it didn't, because we hadn't put landing-pages in the edition_route_path_segments array.
@richardTowers richardTowers changed the title Add Landing Pages to the list of edition filters Add Landing Pages to the list of edition classes Nov 19, 2024
Copy link
Contributor

@KludgeKML KludgeKML left a comment

Choose a reason for hiding this comment

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

LGTM

@richardTowers richardTowers merged commit 55aea3a into main Nov 20, 2024
19 checks passed
@richardTowers richardTowers deleted the landing-page-document-filter branch November 20, 2024 09:19
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.

3 participants