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

Tag pages in DCR #26149

Merged
merged 14 commits into from
Jun 5, 2023
Merged

Tag pages in DCR #26149

merged 14 commits into from
Jun 5, 2023

Conversation

OllysCoding
Copy link
Contributor

@OllysCoding OllysCoding commented May 17, 2023

PR to support tag fronts in DCR (e.g https://www.theguardian.com/tone/minutebyminute).

DCR PR: guardian/dotcom-rendering#7752

Model

This PR creates DotcomTagFrontsRenderingModel which includes the information required for DCR to render a tag front. Helpfully, we're able to use the PressedContent model for cards on tag fronts - enabling us to avoid having to build a new card model in DCR.

Picker

This PR creates a basic TagFrontPicker which can take a page and decide whether DCR will be able to render it or not - as we don't currently fully support any pages, this will always return false unless ?dcr is set to true.

Logging

This PR moves DotcomFrontsLogger into common, and expands it to support logging for both pressed & tag fronts.

Tag endpoints

This PR adds support for ?dcr and .json?dcr to tag front endpoints

Note: tags like tone/minutebyminute are supported, along with their paginated pages, but the individual 'dated' pages (e.g https://www.theguardian.com/tone/minutebyminute/2023/may/31/all) are not supported yet.

@OllysCoding OllysCoding requested a review from a team as a code owner May 17, 2023 09:40
@OllysCoding OllysCoding marked this pull request as draft May 17, 2023 10:11
@OllysCoding OllysCoding marked this pull request as ready for review May 31, 2023 14:08
@OllysCoding OllysCoding changed the title WIP: Create data-model for DCR index pages Tag pages in DCR May 31, 2023
"participatingInTest" -> participatingInTest.toString,
// "testPercentage" -> DCRTagFronts.participationGroup.percentage,
"dcrCouldRender" -> dcrCouldRender.toString,
"isFront" -> "true",
Copy link
Contributor

@ioannakok ioannakok Jun 5, 2023

Choose a reason for hiding this comment

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

Should this be renamed to sth like isTagFront so that these pages don't interfere with our current Grafana dashboards / queries?

image

Copy link
Contributor

@ioannakok ioannakok left a comment

Choose a reason for hiding this comment

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

Really impressive work! Well done! 👏 👏

Copy link
Member

@AshCorr AshCorr left a comment

Choose a reason for hiding this comment

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

Looks good! 🎉 🎉 🎉

@OllysCoding OllysCoding merged commit b5ceedf into main Jun 5, 2023
@OllysCoding OllysCoding deleted the olly/index-page-dcr-data-model branch June 5, 2023 14:26
@prout-bot
Copy link
Collaborator

Seen on ADMIN-PROD (merged by @OllysCoding 18 minutes and 42 seconds ago)

@prout-bot
Copy link
Collaborator

Seen on FRONTS-PROD (merged by @OllysCoding 19 minutes and 48 seconds 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.

5 participants