Skip to content

Commit

Permalink
prelude
Browse files Browse the repository at this point in the history
  • Loading branch information
shtukas committed Feb 22, 2021
1 parent 9a89d67 commit 7a755c3
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions common/app/model/dotcomrendering/pageElements/PageElement.scala
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ import views.support.{ImgSrc, SrcSet, Video700}

import scala.collection.JavaConverters._

// ------------------------------------------------------
// PageElement Supporting Types and Traits
// ------------------------------------------------------

// TODO dates are being rendered as strings to avoid duplication of the
// to-string logic, but ultimately we should pass unformatted date info to
// DCR.
Expand Down Expand Up @@ -75,6 +79,12 @@ object NSImage1 {
}
}

trait ThirdPartyEmbeddedContent {
def isThirdPartyTracking: Boolean
def source: Option[String]
def sourceDomain: Option[String]
}

// ------------------------------------------------------
// PageElement
// ------------------------------------------------------
Expand All @@ -84,12 +94,12 @@ object NSImage1 {
model.liveblog._ elements but replaced in full here
*/

sealed trait PageElement
sealed trait PageElement {

trait ThirdPartyEmbeddedContent {
def isThirdPartyTracking: Boolean
def source: Option[String]
def sourceDomain: Option[String]
// renderId: unique identifier used by DCR's rendering logic
// We are not using the existing `id` field that some page elements already have, because not all of them have one and
// they do not have the same purpose.
val renderId: String = ""
}

case class AudioAtomBlockElement(
Expand Down

0 comments on commit 7a755c3

Please sign in to comment.