Skip to content
This repository has been archived by the owner on Jul 2, 2021. It is now read-only.

SER-4524 testing branch #2408

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open
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
17 changes: 3 additions & 14 deletions app/components/site-head.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@ import Component from '@ember/component';
import { equal, readOnly } from '@ember/object/computed';
import { run } from '@ember/runloop';
import { inject as service } from '@ember/service';
import { communicationService } from '../modules/ads/communication/communication-service';
import HeadroomMixin from '../mixins/headroom';
import { standalone } from '../utils/browser';
import { track, trackActions } from '../utils/track';
import Ads from '../modules/ads';
import { isType } from '../modules/ads/communication/is-type';

export default Component.extend(
HeadroomMixin,
Expand Down Expand Up @@ -57,19 +55,10 @@ export default Component.extend(
},

setExperimentFlags() {
// Hacky way to distinct UCP and App wikis as enableHydraFeatures is available only on UCP
const isUcpWiki = this.get('wikiVariables.enableHydraFeatures') !== undefined;
const currentUser = this.currentUser;
const isAuthenticated = currentUser.get('isAuthenticated');
if (!isAuthenticated && isUcpWiki) {
communicationService.addListener((action) => {
if (isType(action, '[AdEngine] set InstantConfig')) {
const defaultScope = action.payload.get('icServicesMobileSearchScopeDropdown');
if (defaultScope) {
this.set('showSearchScope', true);
this.set('defaultSearchScope', defaultScope);
}
}
});
if (isUcpWiki) {
this.set('showSearchScope', true);
}
},

Expand Down
1 change: 0 additions & 1 deletion app/templates/components/site-head.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
@model={{this.globalNavigation}}
@sitename={{this.communityHeader.sitename}}
@showSearchScope={{this.showSearchScope}}
@defaultSearchScope={{this.defaultSearchScope}}
@canShowContentRecommendations={{this.canShowContentRecommendations}}
@track={{action this.track}}
@onModalOpen={{action this.onModalOpen}}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"compression": "1.7.4",
"cors": "2.8.5",
"deep-extend": "0.6.0",
"design-system": "git://github.com/Wikia/design-system.git#23.17.0",
"design-system": "git://github.com/Wikia/design-system.git#SER-4524",
"ember-cli-dependency-lint": "1.1.3",
"ember-hammer": "github:wikia/ember-hammer#6fdd246fd6fe70594be59186e3b3f6068ed91fd6",
"ember-maybe-import-regenerator-for-testing": "1.0.0",
Expand Down