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

GH-2100, GH-2097: Onboarding test 2 #603

Merged
merged 7 commits into from Sep 22, 2020

Make comments and ternaries more clear

  • Loading branch information
leuryr committed Sep 16, 2020
commit debd68010c3f57f5fcb9e0896daff8a19931f8b4
@@ -17,7 +17,7 @@ import ClassNames from 'classnames';
import { NavLink } from 'react-router-dom';
import QueryString from 'query-string';

// Flag to display alternate hub view (used in A/B testing)
// Flag to display alternate hub view (used for A/B testing ticket GH-2097)
const ah = (QueryString.parse(window.location.search).ah === 'true') || false;

/**
@@ -98,7 +98,7 @@ const SideNavigationView = (props) => {
disabled: disableNav,
});

const menuClassNames = ClassNames(`SideNavigation__menu ${!ah ? 'flex-child-grow' : ''} flex-container flex-dir-column`);
const menuClassNames = ClassNames(`SideNavigation__menu ${ah ? '' : 'flex-child-grow'} flex-container flex-dir-column`);

return (
<div className={containerClassNames}>
@@ -20,7 +20,7 @@ import globals from '../../../../src/classes/Globals';
const { IS_CLIQZ, BROWSER_INFO } = globals;
const IS_ANDROID = (BROWSER_INFO.os === 'android');

// Flag to display alternate hub view (used in A/B testing)
// Flag to display alternate hub view (used for A/B testing ticket GH-2097)
const ah = (QueryString.parse(window.location.search).ah === 'true') || false;

/**
@@ -35,7 +35,7 @@ import UpgradePlanView from './Views/UpgradePlanView';

const store = createStore();

// Flag to display alternate hub view (used in A/B testing)
// Flag to display alternate hub view (used for A/B testing ticket GH-2097)
const ah = (QueryString.parse(window.location.search).ah === 'true') || false;

/**
@@ -1759,7 +1759,7 @@ function initializeGhosteryModules() {
// because of an A/B test that determines which promo variant is shown in the Hub on install
if (globals.JUST_INSTALLED) {
const showAlternateHub = conf.hub_layout === 'alternate';
const route = conf.hub_layout === 'alternate' ? '#home' : '';
const route = showAlternateHub ? '#home' : '';
chrome.tabs.create({
url: chrome.runtime.getURL(`./app/templates/hub.html?$justInstalled=true&ah=${showAlternateHub}${route}`),
active: true
ProTip! Use n and p to navigate between commits in a pull request.