Skip to content

Commit

Permalink
remove header-top-nav switch (#27067)
Browse files Browse the repository at this point in the history
  • Loading branch information
cemms1 authored Apr 22, 2024
1 parent 587b8da commit 4084c88
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 22 deletions.
10 changes: 0 additions & 10 deletions common/app/conf/switches/FeatureSwitches.scala
Original file line number Diff line number Diff line change
Expand Up @@ -473,16 +473,6 @@ trait FeatureSwitches {
exposeClientSide = false,
)

val headerTopNav = Switch(
SwitchGroup.Feature,
"header-top-nav",
"When ON, the header has a thin top bar above containing relevant links",
owners = group(Feature),
safeState = On,
sellByDate = never,
exposeClientSide = true,
)

val Callout = Switch(
SwitchGroup.Feature,
"callouts",
Expand Down
3 changes: 1 addition & 2 deletions common/app/html/HtmlPage.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import views.html.stacked
import views.html.fragments._
import views.html.fragments.page.body._
import views.support.Commercial
import conf.switches.Switches

trait HtmlPage[P <: model.Page] {
def html(page: P)(implicit request: RequestHeader, applicationContext: ApplicationContext): Html
Expand All @@ -31,7 +30,7 @@ object HtmlPageHelpers {
.isAdFree(request)
val headerContent: Html = stacked(
commercial.topBanner() when showTop && showAds,
if (Switches.headerTopNav.isSwitchedOn && !page.metadata.hasSlimHeader) headerTopNav() else header() when showTop,
if (!page.metadata.hasSlimHeader) headerTopNav() else header() when showTop,
)
bannerAndHeaderDiv(headerContent)
}
Expand Down
18 changes: 8 additions & 10 deletions static/src/javascripts/bootstraps/standard/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ const showHiringMessage = () => {
if (!config.get('page.isDev') && config.get('switches.weAreHiring')) {
window.console.log(
'\n' +
'%cHello.\n' +
'\n' +
'%cWe are hiring – ever thought about joining us? \n' +
'%chttps://workforus.theguardian.com/careers/product-engineering%c \n' +
'\n',
'%cHello.\n' +
'\n' +
'%cWe are hiring – ever thought about joining us? \n' +
'%chttps://workforus.theguardian.com/careers/product-engineering%c \n' +
'\n',
'font-family: Georgia, serif; font-size: 32px; color: #052962',
'font-family: Georgia, serif; font-size: 16px; color: #767676',
'font-family: Helvetica Neue, sans-serif; font-size: 11px; text-decoration: underline; line-height: 1.2rem; color: #767676',
Expand Down Expand Up @@ -73,8 +73,8 @@ const addScrollHandler = () => {
'scroll',
userPrefs.get('use-idle-callback') && 'requestIdleCallback' in window
? () => {
window.requestIdleCallback(onScroll);
}
window.requestIdleCallback(onScroll);
}
: onScroll,
{ passive: true }
);
Expand Down Expand Up @@ -162,9 +162,7 @@ const bootStandard = () => {

ophan.setEventEmitter(mediator);

if(window.guardian.config.switches.headerTopNav
&& document.querySelector('.header-top-nav')
) {
if (document.querySelector('.header-top-nav')) {
headerTopNavInit();
} else {
newHeaderInit();
Expand Down

0 comments on commit 4084c88

Please sign in to comment.