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-2097 bugfix: make sure alternate view displays when expected #618

Closed
wants to merge 35 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
7a1ca55
bump browser core
christophertino Jul 31, 2020
4b3e192
Updated Firefox Android extension (#587)
christophertino Aug 10, 2020
a95835f
Added a product_id parameter (#574)
hankyje Aug 10, 2020
e3f9ff8
Display error message when locked out (#577)
afranco07 Aug 10, 2020
c161eca
udpated changelog
christophertino Aug 10, 2020
04c121a
update package dependencies
christophertino Aug 11, 2020
7e0a3c2
GH-2086, GH-2084, GH-2040: Update intro hub Get Plus, Midnight & Insi…
benstrumeyer Aug 14, 2020
124d633
GH-2035: Update In-App Plus/Premium pricing (#596)
benstrumeyer Aug 17, 2020
c1f3beb
Remove obsolete @cliqz/adblocker-circumvention dependency (#598)
remusao Aug 17, 2020
efccf8c
Fix bug where content overflows past the specified panel height in ru…
benstrumeyer Aug 25, 2020
fde426c
Shorten uninstall url by shorterning subscription_interval param name…
wlycdgr Aug 25, 2020
1719bc7
bump browser core
christophertino Sep 8, 2020
8c3c62b
update CODEOWNERS
christophertino Sep 11, 2020
0769c49
bump browser core
christophertino Sep 13, 2020
387f037
Return early from setupHubPromoABTest if A/B tests have not yet been …
wlycdgr Sep 21, 2020
bdf6206
Detect Ghostery Desktop browser (#602)
sammacbeth Sep 21, 2020
30a0d04
GH-2171: Add Missing Page Title to Upgrade Plan Hub Page (#604)
fcjr Sep 21, 2020
34c6223
GH-2168: Change hub logo link (#605)
leuryr Sep 21, 2020
27e21c1
update readme
christophertino Sep 21, 2020
4e0560b
prune dead links from readme
christophertino Sep 21, 2020
f1c8941
GH-2100, GH-2097: Onboarding test 2 (#603)
leuryr Sep 22, 2020
0781353
Feature/console debugging (#568)
IAmThePan Sep 24, 2020
e4b0a0b
ignore purplebox creation and updates on Android
christophertino Sep 24, 2020
443ca8a
fixing bug in debugger openPanel
christophertino Sep 24, 2020
7f975d1
GH-2159: Update frequency reduction, AB test opt-out, remove Cliqz AB…
wlycdgr Sep 24, 2020
653b7d4
GH-2105: Sync button hover states in the hub (#607)
benstrumeyer Sep 25, 2020
52f1a50
GH-2158: Subscription_type ping parameter not sending on login (#606)
benstrumeyer Sep 28, 2020
73318a0
GH-2177: Remove broken page pings (#609)
benstrumeyer Sep 30, 2020
98895ab
GH-2158: Subscription_type ping parameter not sending on login (#610)
benstrumeyer Oct 2, 2020
5b86f6c
GH-2097/t2-to-utm-content-fix (#612)
wlycdgr Oct 2, 2020
eafc209
update translations
christophertino Oct 2, 2020
4f9b05b
udpate travis.yml
christophertino Oct 2, 2020
cfad922
update Changelog
christophertino Oct 2, 2020
3c1a081
update readme
christophertino Oct 2, 2020
45832c2
Fix bug that always made ABTest clients think tests had not been fetc…
wlycdgr Oct 7, 2020
File filter
Filter file types
Jump to
Jump to file
Failed to load files.

Always

Just for now

GH-2159: Update frequency reduction, AB test opt-out, remove Cliqz AB…
… test (#608)

* Reduce scheduledTasks and autoUpdatedBugDb frequencies from once an hour to once a day

* Refactor autoUpdateBugDb so it always does the same thing when called with the same argument

* Update autoUpdateBugDB documentation and refactor a little more to make sure it always does the same thing when called with the same args

* Clean up autoUpdateBugDB a bit more: Clarify docs, flatten, and move log statement to make sure that it is triggered every time the function is called, since the message just says that the function was called

* Minor comment in autoUpdateBugDb

* Renamed autoUpdateBugDb to clarify connection to checkLibraryVersion. Tweak docs.

* Edit db update function names and docs to improve clarity

* Remove Cliqz anti-tracking A/B test config code from background. Tidy up setupAbTest

* Split up and reorganize setupABTest so outside code can only call those parts of the original it actually needs.

* Clean up OptIn a bit in preparation for adding A/B test checkbox

* Finish OptIn tidy-up

* Stub out new A/B test opt-in setting. Add draft strings for it.

* Implement the enable_abtests conf setting and plug it into the checkbox stub in OptIn

* Do not call setupABTests if enable_abtests is false

* Skip the call to the AB server altogether if ab tests are disabled

* Update AB test setting tooltip copy. remove enable_abtests from uninstall URL. Add ts metrics query string param for whether tests are enabled. Disabled sending other AB test query string params unless tests are enabled.

* Remove unused import from Metrics

* Update test snapshot

* Fix typo

* Fix comment errors

* Remove bloom filter Cliqz test

* remove comment

Co-authored-by: Christopher Tino <christopher_tino@yahoo.com>
Co-authored-by: Christopher Tino <4699516+christophertino@users.noreply.github.com>
  • Loading branch information
wlycdgr and christophertino committed Sep 24, 2020
commit 7f975d19363ecc70447fc9e4022344daaff24448
@@ -947,6 +947,9 @@
"settings_allow_offers": {
"message": "Participating in Ghostery Rewards"
},
"settings_allow_abtests": {
"message": "Participating in A/B Tests"
},
"settings_signin_create_header": {
"message": "Sign In / Create Account"
},
@@ -1037,6 +1040,9 @@
"settings_offers_tooltip": {
"message": "Ghostery Rewards is a private-by-design feature that delivers you discounts and special offers from our partner companies as you browse."
},
"settings_abtests_tooltip": {
"message": "Participating in randomized A/B tests helps Ghostery understand which version of a new layout or feature users like you prefer."
},
"settings_opt_in": {
"message": "Opt In / Out"
},
@@ -18,69 +18,92 @@ import globals from '../../../../src/classes/Globals';
const { IS_CLIQZ, BROWSER_INFO } = globals;
const IS_ANDROID = (BROWSER_INFO.os === 'android');

const TOOLTIP_SVG_FILEPATH = '../../app/images/panel/icon-information-tooltip.svg';

/**
* @class Implement Opt In subview as a React component.
* The view opens from the left-side menu of the main Settings view.
* It invites user to opt in for telemetry options, human web and offers
* @memberOf SettingsComponents
*/
const OptIn = ({ settingsData, toggleCheckbox }) => (
<div className="s-tabs-panel">
<div className="row">
<div className="columns">
<h3>{ t('settings_support_ghostery') }</h3>
<h5>
{ t('settings_support_ghostery_by') }
:
</h5>
<div className="s-option-group">
<div className="s-square-checkbox">
<input type="checkbox" id="settings-share-usage" name="enable_metrics" defaultChecked={settingsData.enable_metrics} onClick={toggleCheckbox} />
<label htmlFor="settings-share-usage">
<span>{ t('settings_share_usage') }</span>
</label>
<div className="s-tooltip-down" data-g-tooltip={t('settings_share_usage_tooltip')}>
<img src="../../app/images/panel/icon-information-tooltip.svg" className="s-question" />
</div>
</div>
const OptIn = ({ settingsData, toggleCheckbox }) => {
const checkbox = (opt, name) => (
<input
type="checkbox"
id={`settings-${opt}`}
name={name}
defaultChecked={settingsData[name]}
onClick={toggleCheckbox}
/>
);

const labelFor = (opt, text) => (
<label htmlFor={`settings-${opt}`}>
<span>{text}</span>
</label>
);

const tooltipSVG = (text, dir) => (
<div className={`s-tooltip-${dir}`} data-g-tooltip={text}>
<img src={TOOLTIP_SVG_FILEPATH} className="s-question" />
</div>
);

const option = (cbox, label, tooltip, id = '') => (
<div className="s-option-group" id={id}>
<div className="s-square-checkbox">
{cbox}
{label}
{tooltip}
</div>
</div>
);

return (
<div className="s-tabs-panel">
<div className="row">
<div className="columns">
<h3>{t('settings_support_ghostery')}</h3>
<h5>
{t('settings_support_ghostery_by')}
:
</h5>
{option(
checkbox('share-usage', 'enable_metrics'),
labelFor('share-usage', t('settings_share_usage')),
tooltipSVG(t('settings_share_usage_tooltip'), 'down')
)}
{!IS_CLIQZ && option(
checkbox('share-human-web', 'enable_human_web'),
labelFor('share-human-web', t('settings_share_human_web')),
tooltipSVG(t('settings_human_web_tooltip'), 'up'),
'human-web-section'
)}
{!IS_CLIQZ && !IS_ANDROID && option(
checkbox('allow-offers', 'enable_offers'),
labelFor('allow-offers', t('settings_allow_offers')),
tooltipSVG(t('settings_offers_tooltip'), 'up'),
'offers-section'
)}
{option(
checkbox('allow-abtests', 'enable_abtests'),
labelFor('allow-abtests', t('settings_allow_abtests')),
tooltipSVG(t('settings_abtests_tooltip'), 'up'),
'abtests-section'
)}
</div>
{!IS_CLIQZ && (
<div className="s-option-group" id="human-web-section">
<div className="s-square-checkbox">
<input type="checkbox" id="settings-share-human-web" name="enable_human_web" defaultChecked={settingsData.enable_human_web} onClick={toggleCheckbox} />
<label htmlFor="settings-share-human-web">
<span>{ t('settings_share_human_web') }</span>
</label>
<div className="s-tooltip-up" data-g-tooltip={t('settings_human_web_tooltip')}>
<img src="../../app/images/panel/icon-information-tooltip.svg" className="s-question" />
</div>
</div>
</div>
)}
{!IS_CLIQZ && !IS_ANDROID && (
<div className="s-option-group" id="offers-section">
<div className="s-square-checkbox">
<input type="checkbox" id="settings-allow-offers" name="enable_offers" defaultChecked={settingsData.enable_offers} onClick={toggleCheckbox} />
<label htmlFor="settings-allow-offers">
<span>{ t('settings_allow_offers') }</span>
</label>
<div className="s-tooltip-up" data-g-tooltip={t('settings_offers_tooltip')}>
<img src="../../app/images/panel/icon-information-tooltip.svg" className="s-question" />
</div>
</div>
</div>
)}
</div>
</div>
</div>
);
);
};

OptIn.propTypes = {
toggleCheckbox: PropTypes.func.isRequired,
settingsData: PropTypes.shape({
enable_metrics: PropTypes.bool.isRequired,
enable_human_web: PropTypes.bool.isRequired,
enable_offers: PropTypes.bool.isRequired,
enable_abtests: PropTypes.bool.isRequired,
}).isRequired,
};

@@ -19,6 +19,7 @@ exports[`app/panel/Settings/OptIn.jsx Snapshot tests with react-test-renderer Op
</h5>
<div
className="s-option-group"
id=""
>
<div
className="s-square-checkbox"
@@ -112,6 +113,37 @@ exports[`app/panel/Settings/OptIn.jsx Snapshot tests with react-test-renderer Op
</div>
</div>
</div>
<div
className="s-option-group"
id="abtests-section"
>
<div
className="s-square-checkbox"
>
<input
id="settings-allow-abtests"
name="enable_abtests"
onClick={[Function]}
type="checkbox"
/>
<label
htmlFor="settings-allow-abtests"
>
<span>
settings_allow_abtests
</span>
</label>
<div
className="s-tooltip-up"
data-g-tooltip="settings_abtests_tooltip"
>
<img
className="s-question"
src="../../app/images/panel/icon-information-tooltip.svg"
/>
</div>
</div>
</div>
</div>
</div>
</div>
@@ -136,6 +168,7 @@ exports[`app/panel/Settings/OptIn.jsx Snapshot tests with react-test-renderer Op
</h5>
<div
className="s-option-group"
id=""
>
<div
className="s-square-checkbox"
@@ -229,6 +262,37 @@ exports[`app/panel/Settings/OptIn.jsx Snapshot tests with react-test-renderer Op
</div>
</div>
</div>
<div
className="s-option-group"
id="abtests-section"
>
<div
className="s-square-checkbox"
>
<input
id="settings-allow-abtests"
name="enable_abtests"
onClick={[Function]}
type="checkbox"
/>
<label
htmlFor="settings-allow-abtests"
>
<span>
settings_allow_abtests
</span>
</label>
<div
className="s-tooltip-up"
data-g-tooltip="settings_abtests_tooltip"
>
<img
className="s-question"
src="../../app/images/panel/icon-information-tooltip.svg"
/>
</div>
</div>
</div>
</div>
</div>
</div>
ProTip! Use n and p to navigate between commits in a pull request.