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 all json route for tag pages #26991

Merged
merged 6 commits into from
Mar 25, 2024
Merged

Add all json route for tag pages #26991

merged 6 commits into from
Mar 25, 2024

Conversation

abeddow91
Copy link
Contributor

@abeddow91 abeddow91 commented Mar 21, 2024

What does this change?

Adds a "/all.json" tag page route. This allows DCR to support "/all" tag pages (eg www.guardian.com/sport/all).

As well as this, it adds additional logic to relocate pagination data on the DCR model, rather than nesting it within tags.

This is because, whilst regular tag pages have pagination data in tags, "/all" tag pages have this data in metadata. By relocating pagination on the model, we make it easier for DCR to find and use this data.

This PR can be tested E2E by deploying to CODE along with guardian/dotcom-rendering#10975 and https://github.com/guardian/platform/pull/1584

Screenshots

Checklist

@abeddow91 abeddow91 requested a review from a team as a code owner March 21, 2024 10:15
@@ -91,7 +91,7 @@ GET /$path<.+>/latest/email.emailtxt
GET /$path<.+>/$year<\d\d\d\d>/$month<\w\w\w>/$day<\d\d>/all controllers.AllIndexController.allOn(path, day, month, year)
GET /$path<.+>/$year<\d\d\d\d>/$month<\w\w\w>/$day<\d\d>/altdate controllers.AllIndexController.altDate(path, day, month, year)
GET /$path<.+>/all controllers.AllIndexController.all(path)

GET /$path<.+>/all.json controllers.AllIndexController.renderJson(path)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this go above GET /$path<.+>/all controllers.AllIndexController.all(path) otherwise it will always be missed ?

Copy link
Contributor

Choose a reason for hiding this comment

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

@abeddow91 abeddow91 merged commit 232eec5 into main Mar 25, 2024
2 checks passed
@abeddow91 abeddow91 deleted the add-all-json-route branch March 25, 2024 10:13
@prout-bot
Copy link
Collaborator

Seen on ADMIN-PROD (merged by @abeddow91 10 minutes and 55 seconds ago)

@prout-bot
Copy link
Collaborator

Seen on FRONTS-PROD (merged by @abeddow91 12 minutes ago)

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.

[Tag Pages] Pagination missing on /all URLs
6 participants