Navigation Menu

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

Use front type to determine rendering of paid containers #11932

Merged
merged 4 commits into from Feb 12, 2016

Conversation

kelvin-chappell
Copy link
Member

We only want paid containers to have the new styling if they appear on editorial fronts.
This change uses the ConfigAgent to determine the type of front the container is on.

/cc @janua

def shouldRenderAsCommercialContainer(frontPriority: Option[FrontPriority], container: FaciaContainer): Boolean = {
Switches.NewCommercialContent.isSwitchedOn &&
Switches.PaidContainerUpdate.isSwitchedOn &&
frontPriority.contains(EditorialPriority) &&
Copy link
Member Author

Choose a reason for hiding this comment

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

Everything is using scala 2.11 so safe to use an Option.contains.

@JonNorman
Copy link

Looks good - can expand to Dynamic containers once happy with Fixed containers.
👍

kelvin-chappell added a commit that referenced this pull request Feb 12, 2016
Use front type to determine rendering of paid containers
@kelvin-chappell kelvin-chappell merged commit 5a8faec into master Feb 12, 2016
@kelvin-chappell kelvin-chappell deleted the kc-paid-container-conditions branch February 12, 2016 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants