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

Rollout DCR video pages (behind switch) #27149

Merged
merged 2 commits into from
May 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions applications/app/services/dotcomrendering/MediaPicker.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import model.Cors.RichRequestHeader
import model.{MediaPage, Video, Audio}
import play.api.mvc.RequestHeader
import utils.DotcomponentsLogger
import experiments.DCRVideoPages
import navigation.NavLinks.media
import experiments.ActiveExperiments
import conf.switches.Switches.DCRVideoPages

object MediaPicker extends GuLogging {

Expand Down Expand Up @@ -40,15 +40,13 @@ object MediaPicker extends GuLogging {
request: RequestHeader,
): RenderType = {

// defaulting to false until we are ready to release and create a 0% test
val participatingInTest = ActiveExperiments.isParticipating(DCRVideoPages)
val dcrCanRender = dcrCouldRender(mediaPage)
val flags = dcrLogFlags(mediaPage)

val tier = {
if (request.forceDCROff) LocalRender
else if (request.forceDCR) RemoteRender
else if (dcrCanRender && participatingInTest) RemoteRender
else if (dcrCanRender && DCRVideoPages.isSwitchedOn) RemoteRender
else LocalRender
}

Expand Down
11 changes: 11 additions & 0 deletions common/app/conf/switches/FeatureSwitches.scala
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,7 @@ trait FeatureSwitches {
sellByDate = Some(LocalDate.of(2024, 6, 5)),
exposeClientSide = true,
)

val DiscussionInApps = Switch(
SwitchGroup.Feature,
"discussion-in-apps",
Expand All @@ -513,4 +514,14 @@ trait FeatureSwitches {
sellByDate = Some(LocalDate.of(2024, 6, 5)),
exposeClientSide = true,
)

val DCRVideoPages = Switch(
SwitchGroup.Feature,
"dcr-video-pages",
"If this switch is on, we will render video pages with DCR",
owners = Seq(Owner.withEmail("[email protected]"), Owner.withEmail("[email protected]")),
safeState = Off,
sellByDate = never,
exposeClientSide = false,
)
}
13 changes: 0 additions & 13 deletions common/app/experiments/Experiments.scala
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ object ActiveExperiments extends ExperimentsDefinition {
Set(
DarkModeWeb,
DCRTagPages,
DCRVideoPages,
UpdatedHeaderDesign,
MastheadWithHighlights,
AffiliateLinksDCR,
Expand Down Expand Up @@ -58,18 +57,6 @@ object AffiliateLinksDCR
participationGroup = Perc0E,
)

object DCRVideoPages
extends Experiment(
name = "dcr-video-pages",
description = "Render video pages with DCR",
owners = Seq(
Owner.withGithub("[email protected]"),
Owner.withGithub("[email protected]"),
),
sellByDate = LocalDate.of(2024, 5, 30),
participationGroup = Perc10A,
)

object DCRTagPages
extends Experiment(
name = "dcr-tag-pages",
Expand Down