Skip to content

Commit

Permalink
Merge branch 'main' into oa/audio-page-podcast-tags
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverabrahams committed Sep 18, 2024
2 parents 7059a12 + 8a9480f commit 76d4c49
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 4 deletions.
2 changes: 1 addition & 1 deletion admin/app/jobs/RefreshFrontsJob.scala
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ object LowFrequency extends FrontType
object StandardFrequency extends FrontType
object HighFrequency extends FrontType {
def highFrequencyPaths: List[String] =
List("uk", "us", "au", "europe", "international", "uk/sport", "us/sport", "au/sport", "sport/paralympic-games-2024")
List("uk", "us", "au", "europe", "international", "uk/sport", "us/sport", "au/sport")
}

case class CronUpdate(path: String, frontType: FrontType)
Expand Down
1 change: 1 addition & 0 deletions common/app/layout/slices/Container.scala
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ object Container extends GuLogging {
("nav/media-list", NavMediaList),
("news/most-popular", MostPopular),
("flexible/special", Dynamic(FlexibleSpecial)),
("flexible/general", Dynamic(FlexibleGeneral)),
) ++ FixedContainers.all.mapV(Fixed.apply) ++ EmailLayouts.all.mapV(Email.apply)

/** So that we don't blow up at runtime, which would SUCK */
Expand Down
1 change: 1 addition & 0 deletions common/app/layout/slices/DynamicContainers.scala
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ object DynamicContainers {
("dynamic/package", DynamicPackage),
("dynamic/slow-mpu", DynamicSlowMPU(omitMPU = false, adFree = false)),
("flexible/special", FlexibleSpecial),
("flexible/general", FlexibleGeneral),
)

def apply(collectionType: Option[String], items: Seq[PressedContent]): Option[ContainerDefinition] = {
Expand Down
33 changes: 33 additions & 0 deletions common/app/layout/slices/FlexibleGeneral.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package layout.slices

import layout.slices.Story._

object FlexibleGeneral extends DynamicContainer {
override protected def optionalFirstSlice(stories: Seq[Story]): Option[(Slice, Seq[Story])] = {
val byGroup = segmentByGroup(stories)
val snap = byGroup.getOrElse(1, Seq.empty)

if (snap.nonEmpty) {
Some((FullMedia50, stories.drop(1)))
} else {
None
}
}

override protected def standardSlices(storiesIncludingBackfill: Seq[Story], firstSlice: Option[Slice]): Seq[Slice] = {

storiesIncludingBackfill.length match {
case 0 => Nil
case 1 => Seq(FullMedia100)
case 2 => Seq(ThreeQuarterQuarter)
case 3 => Seq(ThreeQuarterTallQuarter2)
case 4 => Seq(ThreeQuarterTallQuarter1Ql2)
case 5 => Seq(FullMedia100, QuarterQuarterQuarterQuarter)
// This case doesn't look _quite_ right. We end up with a row of four
// and then a row of three, slightly stretched. There isn't a layout
// which caters for this currently, we'll follow up on this separately.
case _ => Seq(FullMedia100, QuarterQuarterQuarterQuarter, Ql1Ql1Ql1Ql1)

}
}
}
1 change: 0 additions & 1 deletion common/app/model/meta.scala
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,6 @@ object ContentFormat {
case "FullPageInteractiveDesign" => FullPageInteractiveDesign
case "InteractiveDesign" => InteractiveDesign
case "PhotoEssayDesign" => PhotoEssayDesign
case "PrintShopDesign" => PrintShopDesign
case "ObituaryDesign" => ObituaryDesign
case _ => ArticleDesign
}
Expand Down
1 change: 1 addition & 0 deletions facia/app/services/dotcomrendering/FaciaPicker.scala
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ object FrontChecks {
"news/most-popular",
"scrollable/highlights",
"flexible/special",
"flexible/general",
)

def hasOnlySupportedCollections(faciaPage: PressedPage) =
Expand Down
1 change: 1 addition & 0 deletions facia/test/services/dotcomrendering/FaciaPickerTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ import layout.slices.EmailLayouts
PressedCollectionBuilder.mkPressedCollection("news/most-popular"),
PressedCollectionBuilder.mkPressedCollection("scrollable/highlights"),
PressedCollectionBuilder.mkPressedCollection("flexible/special"),
PressedCollectionBuilder.mkPressedCollection("flexible/general"),
),
)

Expand Down
4 changes: 2 additions & 2 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ object Dependencies {
val identityLibVersion = "4.31"
val awsVersion = "1.12.758"
val awsSdk2Version = "2.26.27"
val capiVersion = "31.1.0"
val faciaVersion = "9.0.0"
val capiVersion = "32.0.0"
val faciaVersion = "10.0.0"
val dispatchVersion = "0.13.1"
val romeVersion = "1.0"
val jerseyVersion = "1.19.4"
Expand Down

0 comments on commit 76d4c49

Please sign in to comment.