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

Ghostery browser intro hub #665

Merged
merged 120 commits into from Jan 29, 2021
Merged
Changes from 1 commit
Commits
Show all changes
120 commits
Select commit Hold shift + click to select a range
0d1136a
Work towards implementing stub of new intro hub
Nov 11, 2020
d295be0
Implement AppView for Ghostery Browser Hub
Nov 11, 2020
2afb600
Progress towards intro hub skeleton
Nov 13, 2020
9163edb
Merge in develop
Nov 29, 2020
3bb394a
Add stubs for the various onboarding views. Add top level onboarding …
Nov 29, 2020
5a9de84
Merge in develop
Dec 1, 2020
f59a5dd
Continued work on fleshing out the ghostery browser hub react app
Dec 2, 2020
078a137
Factor store creation and Redux HOC construction to utility functions
Dec 2, 2020
388f8f8
Factor out and clean up toast and anti suite reducers for the Hubs
Dec 2, 2020
5b957e3
Factor setup lifecycle actions and constants out to shared-hub dir. N…
Dec 3, 2020
382b81e
Move blocking policy reducer to shared-hub
Dec 3, 2020
a51e0ae
GH-2205: Onboarding - Welcome & Get Started (#637)
benstrumeyer Dec 3, 2020
fb7de96
GH-2207: Onboarding - Success Screen (#638)
benstrumeyer Dec 3, 2020
9799389
GH-2206: Onboarding - Step 1 - Create Account (#639)
benstrumeyer Dec 7, 2020
edc434e
GH-2211: Onboarding - Status Bar (#641)
benstrumeyer Dec 7, 2020
fe5ef4a
Work towards connecting and reconciling new intro hub views
Dec 8, 2020
80f0fcf
Connecting intro hub pieces
Dec 9, 2020
b901263
Merge in latest develop
Dec 9, 2020
5ebb12c
Cleaning up new intro hub SCSS
Dec 9, 2020
50bd0c6
Get inline script that branches to the correct hub to run
Dec 9, 2020
cf1ceaa
Update BlockSettingsView and localization messages (#643)
leuryr Dec 10, 2020
d87f5c2
GH-2210: Onboarding - Step 4 - Choose Plan (#640)
benstrumeyer Dec 10, 2020
e901117
Post-PR-merge SCSS imports cleanup
Dec 10, 2020
3e92e7d
Cleanup of index files and debugging in new intro hub
Dec 11, 2020
bfaf1f3
Continue cleanup of Step1 JSX
Dec 11, 2020
11f3a7e
Render hub step progress bar across all views
Dec 11, 2020
077f680
Add StepNavigator component to manage navigation within a step
Dec 11, 2020
4b55efd
Update data structure passed to OnboardingView by the container to ma…
Dec 11, 2020
89edc23
Finish converting index files to use buildReduxHOC
Dec 11, 2020
e2999d2
Merge in latest develop
Dec 16, 2020
7ad2916
Assorted intro hub fixes
Dec 16, 2020
4717269
Use constants for paths
Dec 22, 2020
0500444
Merge in develop
Dec 22, 2020
9552fc4
Cleanup StepProgressBar
Dec 22, 2020
d237448
Add new intro hub css to template
Dec 22, 2020
4d7a47e
Remove unused navigation mechanism
Dec 22, 2020
e0e806c
Removed unused setup lifecycle actions
Dec 23, 2020
3fc6876
Conditionally include the appropriate hub css
Dec 23, 2020
c444764
Clean up welcome view css, fix up button link
Dec 23, 2020
a24d53c
More welcome view cleanup. Make sure progress bar does not show on We…
Dec 23, 2020
38601b9
GH-2220: Onboarding - Telemetry (#650)
benstrumeyer Jan 4, 2021
6dd38b6
Replace search view element
Jan 4, 2021
66e7b5c
Iterate on search view layout
Jan 4, 2021
b35a01c
Option container design on default search select view
Jan 5, 2021
41677bd
Further work on default search view option containers
Jan 5, 2021
6806dad
Add confirmation modal for default search view
Jan 5, 2021
13b9fbe
Message search extension with user choice
Jan 5, 2021
0781671
Fix typo in template. Tidy up status bar
Jan 5, 2021
fa3b348
Implement updating search preference
Jan 5, 2021
a9e9cf2
GH-2218: Browser Onboarding Copy Edits & Tooltips (#652)
benstrumeyer Jan 5, 2021
bcf1a34
There was a coup attempt at The Capitol yesterday
Jan 7, 2021
c05c7cc
GH-2218: 8.5.5 Translations (#654)
benstrumeyer Jan 7, 2021
9100e95
Ghostery Dawn Intro Hub Miscellaneous Fixes (#653)
benstrumeyer Jan 7, 2021
2c72617
Reduce tooltip delay in Block Settings view
Jan 11, 2021
0bf679b
Make entire option box clickable on default search view
Jan 11, 2021
bf548b9
Rough out custom URL selector
Jan 11, 2021
d2e1f9b
Choose Default Search view option container adjustments
Jan 11, 2021
7c15c2f
Make toasts work
Jan 11, 2021
9472e03
Improvements to UX of custom URL input in choose default search view
Jan 11, 2021
c2a7204
Tidy up custom URL input a little more
Jan 11, 2021
0db8f7c
Remove console statement
Jan 12, 2021
e6e4392
GH-2236: Update onboarding branding (#658)
leuryr Jan 12, 2021
8addd79
Remove custom URL input from choose default search view. Style and co…
Jan 13, 2021
a6b43c1
Choose Default Search view modal styling
Jan 14, 2021
153077f
More choose default search view modal styling
Jan 14, 2021
359b7c2
GH-2244: Unit tests for Ghostery Dawn Intro Hub (#657)
benstrumeyer Jan 19, 2021
3630e93
Remove updates and promotions checkbox and dropdown (#659)
benstrumeyer Jan 19, 2021
3e7e2b9
Fix routing bug
wlycdgr Jan 20, 2021
c423fd7
Step Progress Bar Bug (#661)
benstrumeyer Jan 20, 2021
f877791
Update locale string keys to match new Dawn branding
wlycdgr Jan 20, 2021
0a8b70b
Redirect user to new onboarding from background script instead of thr…
wlycdgr Jan 21, 2021
8abda5e
Fixes for Dawn Onboarding toast messages (#660)
leuryr Jan 21, 2021
8044a41
Reenable search selection which had been disabled for testing purposes
wlycdgr Jan 22, 2021
a1118ca
Leet tool character limits and misc fixes (#662)
benstrumeyer Jan 22, 2021
e60eade
Ghostery Dawn Intro Hub Design Fixes (#663)
benstrumeyer Jan 22, 2021
f1ba4f0
Ghostery Dawn Miscellaneous Bug fixes (#664)
benstrumeyer Jan 22, 2021
4627a05
Update and clean up strings
wlycdgr Jan 25, 2021
d4a0c56
Merge branch 'ghostery-browser-intro-hub' of github.com:ghostery/ghos…
wlycdgr Jan 25, 2021
1b02dfe
Add search dropdown strings
wlycdgr Jan 25, 2021
f5e9536
Clean uphub templates and on install hub branching code
wlycdgr Jan 25, 2021
7f9cbf1
Linter updates and fixes
wlycdgr Jan 25, 2021
4206481
Use correct hub branching logic in background
wlycdgr Jan 25, 2021
9da9a53
Merge branch 'develop' into ghostery-browser-intro-hub
wlycdgr Jan 25, 2021
de2e78a
Open correct hub from Help view of panel
wlycdgr Jan 25, 2021
0e25788
Show the appropriate upgrade plan view to user based on their default…
wlycdgr Jan 25, 2021
8053eea
Copy and formatting fixes in the Choose Plan view
wlycdgr Jan 26, 2021
67a9bb3
Fix Startpage search selection confirmation modal copy
wlycdgr Jan 26, 2021
478ea52
Do not show progress bar on Sucess view
wlycdgr Jan 26, 2021
f5d4668
Prevent title text on Success view from wrapping to a new line
wlycdgr Jan 26, 2021
201f955
Implements Start Trial button logic that branches on user login state…
wlycdgr Jan 26, 2021
ba27815
Change StartPage identifier to Startpage
wlycdgr Jan 26, 2021
09ee4de
Modifications to faciliate testing
wlycdgr Jan 26, 2021
6d4d5ca
Update ghostery-common dependency to ^1.2.1
wlycdgr Jan 26, 2021
f7848dc
Update Startpage logo
wlycdgr Jan 26, 2021
f7ce546
Fix prop type mismatch console warnings on Welcome and Choose Plan sc…
wlycdgr Jan 26, 2021
f92160c
GH-2218: Browser Onboarding Copy Edits (#666)
benstrumeyer Jan 26, 2021
172af55
Fix <li> inside <li> console warning on Block Settings screen
wlycdgr Jan 26, 2021
e104fbc
Remove testing modifications for Dawn nightly build
wlycdgr Jan 26, 2021
ddeb7c5
Modifiations for ease of testing
wlycdgr Jan 26, 2021
776751c
Wrap call to search extension in a try catch to facilitate testing in…
wlycdgr Jan 26, 2021
a45ae4f
Make radio button labels clickable in Block Settings view. Factor ans…
wlycdgr Jan 26, 2021
d7fdfce
Minor copy fixes (#668)
leuryr Jan 27, 2021
7d32d5f
Add dropdown for search options (#667)
leuryr Jan 27, 2021
b321605
Guard against race condition in background when picking which hub to …
wlycdgr Jan 27, 2021
7c573de
Establish Dawn Hub naming consistency
wlycdgr Jan 27, 2021
895ac09
Implement other search engine option retrieval via browser.search.get
wlycdgr Jan 27, 2021
a761103
Only show other search options dropdown if there are actually other o…
wlycdgr Jan 27, 2021
5697c1d
Update search dropdown CSS to handle variable height
wlycdgr Jan 27, 2021
391bc6d
Remove search permission from manifest as it is added to Dawn GBE at …
wlycdgr Jan 28, 2021
13b92f5
setup_number ping parameter (#669)
benstrumeyer Jan 29, 2021
de28d6b
Remove comment that is no longer relevant
wlycdgr Jan 29, 2021
25c8483
Fix block settings styling, update Next or Start Trial button label o…
wlycdgr Jan 29, 2021
c5032c8
Filter our StartPage and Ghostery Glow fromother search engines dropdown
wlycdgr Jan 29, 2021
cffcc7a
GH-2248: Update CTA & links to Plus, Premium, and free trial subscrip…
benstrumeyer Jan 29, 2021
b23a933
Fix certain block settings not setting (#672)
leuryr Jan 29, 2021
b4df03c
Restore some clobbered paths in tests in the old Hub
wlycdgr Jan 29, 2021
649200b
Remove unused old-name directory
wlycdgr Jan 29, 2021
58b7b72
Update Block Settings view tests to match new value in the code
wlycdgr Jan 29, 2021
6455d56
Use our logger instead of console.log in ChooseDefaultSearchView
wlycdgr Jan 29, 2021
2199622
Remove hack that forced Dawn hub from background. Add support for ope…
wlycdgr Jan 29, 2021
File filter
Filter file types
Jump to
Jump to file
Failed to load files.

Always

Just for now

Fixes for Dawn Onboarding toast messages (#660)

* Fixes for Dawn toast styling and layout

* Add missing toast error message for Step 1

* Ensure toast remains above step progress bar

* Comment update

* Update snapshot for ToastMessage component

* Fix toast not clearing after block settings submit

* Move setToast code up in if block

* Center tooltip info icon

* Make toast message i18n-friendly
  • Loading branch information
leuryr committed Jan 21, 2021
commit 8abda5e12c3b198cfd9c22a833a7190d3632811a
@@ -1740,6 +1740,9 @@
"hub_create_account_toast_error": {
"message": "That email address is already in use. Please choose another."
},
"ghostery_dawn_onboarding_toast_fix_errors": {
"message": "Please fix errors before proceeding."
},
"ghostery_dawn_onboarding_install_heading": {
"message": "Ghostery Dawn now installing..."
},
@@ -1926,7 +1929,7 @@
"ghostery_dawn_onboarding_info_smart_browsing": {
"message": "Smart-browsing adjusts your blocking settings to decrease page breakage and accelerate page loads."
},
"ghostery_browser_hub__onboarding_choose_your_default_search": {
"ghostery_dawn_hub__onboarding_choose_your_default_search": {
"message": "Choose your default search"
},
"ghostery_dawn_onboarding_pick_a_default_search_engine": {
@@ -1959,8 +1962,11 @@
"ghostery_dawn_onboarding_other": {
"message": "Other"
},
"ghostery_dawn_onboarding_toast_error": {
"message": "Please answer all questions"
"ghostery_dawn_onboarding_toast_success": {
"message": "Success: "
},
"ghostery_dawn_onboarding_toast_alert": {
"message": "Error: "
},
"enable_when_paused": {
"message": "To use this function, Resume Ghostery."
@@ -2415,7 +2421,7 @@
"pick_a_default_search_engine": {
"message": "Pick a default engine for all your searches."
},
"ghostery_browser_hub_blocking_settings_view_toast_error_message": {
"message": "Error: Please answer all questions"
"ghostery_dawn_hub_blocking_settings_view_toast_error_message": {
"message": "Please answer all questions"
}
}
@@ -38,7 +38,7 @@ const AppView = (props) => {
return (
<div className="App full-height full-width flex-container">
<div className="App__mainContent full-height full-width">
{<ToastMessage toastText={toastMessage} toastClass={toastClass} toastExit={exitToast} />}
{<ToastMessage toastText={toastMessage} toastClass={toastClass} dawnHub toastExit={exitToast} />}
{children}
</div>
</div>
@@ -144,10 +144,15 @@ class CreateAccountFormContainer extends Component {
validateInput: true,
});

const { actions } = this.props;
if (!emailIsValid || !confirmIsValid || !legalConsentChecked || !passwordIsValid || confirmPasswordError) {
actions.setToast({
toastMessage: t('ghostery_dawn_onboarding_toast_fix_errors'),
toastClass: 'alert'
});
return;
}
const { actions } = this.props;

actions.setToast({
toastMessage: '',
toastClass: ''
@@ -66,9 +66,16 @@ class BlockSettingsView extends Component {
blockAds, kindsOfTrackers, antiTracking, smartBrowsing
} = this.state;

const { actions } = this.props;
const { setToast } = actions;

// Will only change user settings if all questions are answered
if (blockAds !== null && kindsOfTrackers !== null && antiTracking !== null && smartBrowsing !== null) {
const { actions } = this.props;
setToast({
toastMessage: '',
toastClass: ''
});

const {
setAdBlock, setAntiTracking, setSmartBlocking, setBlockingPolicy, setSetupStep
} = actions;
@@ -93,15 +100,13 @@ class BlockSettingsView extends Component {
break;
}
setBlockingPolicy({ blockingPolicy });

setSetupStep({ setup_step: CHOOSE_DEFAULT_SEARCH, origin: ONBOARDING });
history.push('/onboarding/3');
} else {
const { actions } = this.props;
const { setToast } = actions;

setToast({
toastMessage: t('ghostery_browser_hub_blocking_settings_view_toast_error_message'),
toastClass: 'error'
toastMessage: t('ghostery_dawn_hub_blocking_settings_view_toast_error_message'),
toastClass: 'alert'
});
}
}
@@ -121,12 +121,16 @@
}

.BlockSettingsView_checkbox {
width: 18px;
height: 18px;
width: 20px;
height: 20px;
padding: 0;
margin-right: 14px;
}

.BlockSettingsView__infoIcon {
width: 18px;
height: 25px;
background-position: center;
background-repeat: no-repeat;
background-image: url('/app/images/hub/setup/info.svg');
margin-left: 8px;
@@ -0,0 +1,18 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24" viewBox="0 0 24 24">
<defs>
<path id="wy9qqssfxa" d="M3.5 22c-.5 0-1-.1-1.5-.4C.6 20.8.1 18.9.9 17.5L9.4 3.3c.2-.4.6-.8 1-1 .7-.4 1.5-.5 2.3-.3.8.2 1.4.7 1.9 1.4L23 17.5c.3.5.4 1 .4 1.5 0 .8-.3 1.6-.9 2.1-.5.6-1.2.9-2 .9h-17zm7.6-17.6L2.7 18.5c-.3.5-.1 1.1.4 1.4.1.1.3.1.4.1h16.9c.3 0 .5-.1.7-.3.2-.2.3-.4.3-.7 0-.2 0-.3-.1-.5L12.9 4.4c-.3-.5-.9-.6-1.4-.4-.2.1-.3.2-.4.4zM13 13V9c0-.6-.4-1-1-1s-1 .4-1 1v4c0 .6.4 1 1 1s1-.4 1-1zm-.3 4.7c.2-.2.3-.4.3-.7 0-.1 0-.3-.1-.4 0-.1-.1-.2-.2-.3 0 0-.1-.1-.2-.1s-.1-.1-.2-.1-.1 0-.2-.1c-.2 0-.4 0-.6.1-.1 0-.2.1-.3.2-.1.1-.2.2-.2.3 0 .1-.1.2-.1.4 0 .3.1.5.3.7.2.2.4.3.7.3.4 0 .6-.1.8-.3z"/>
</defs>
<g fill="none" fill-rule="evenodd">
<g>
<g transform="translate(-165 -71) translate(165 71)">
<mask id="8dw5swpdwb" fill="#fff">
<use xlink:href="#wy9qqssfxa"/>
</mask>
<use fill="#000" fill-rule="nonzero" xlink:href="#wy9qqssfxa"/>
<g fill="#9F4948" mask="url(#8dw5swpdwb)">
<path d="M0 0H24V24H0z"/>
</g>
</g>
</g>
</g>
</svg>
@@ -0,0 +1,18 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24" viewBox="0 0 24 24">
<defs>
<path id="o0o06k6tda" d="M23 11.1v.9c0 6.1-4.9 11-11 11S1 18.1 1 12 5.9 1 12 1c1.5 0 3.1.3 4.5 1 .5.2.7.8.5 1.3-.2.5-.8.7-1.3.5-1.2-.5-2.4-.8-3.7-.8-5 0-9 4-9 9s4 9 9 9 9-4 9-9v-.9c0-.6.4-1 1-1s1 .4 1 1zm.7-8.8c-.4-.4-1-.4-1.4 0L12 12.6l-2.3-2.3c-.4-.4-1-.4-1.4 0-.4.4-.4 1 0 1.4l3 3c.2.2.5.3.7.3.2 0 .5-.1.7-.3l11-11c.4-.4.4-1 0-1.4z"/>
</defs>
<g fill="none" fill-rule="evenodd">
<g>
<g transform="translate(-165 -71) translate(165 71)">
<mask id="subc7yvwab" fill="#fff">
<use xlink:href="#o0o06k6tda"/>
</mask>
<use fill="#000" fill-rule="nonzero" xlink:href="#o0o06k6tda"/>
<g fill="#417505" mask="url(#subc7yvwab)">
<path d="M0 0H24V24H0z"/>
</g>
</g>
</g>
</g>
</svg>
@@ -19,24 +19,40 @@ import PropTypes from 'prop-types';
* @return {JSX} JSX for rendering a Toast Message
* @memberof SharedComponents
*/
const ToastMessage = ({ toastText, toastClass, toastExit }) => (
<div className="ToastMessage full-width">
{toastText && (
<div className="callout-container">
<div className={`callout toast ${toastClass}`}>
<div className="flex-container align-center-middle">
<div className="callout-text">
{toastText}
const ToastMessage = ({
toastText, toastClass, toastExit, dawnHub
}) => {
// These variables will be used to determine whether the toast should display with Dawn
// onboarding styling or the default styling used in GBE
const dawnHubClass = dawnHub ? 'dawn-hub' : '';
const dawnLayout = dawnHub ? 'align-justify align-middle' : 'align-center-middle';

const dawnToastText = dawnHub ? t(`ghostery_dawn_onboarding_toast_${toastClass}`) : '';

return (
<div className={`ToastMessage full-width ${dawnHubClass}`}>
{toastText && (
<div className="callout-container">
<div className={`callout toast ${toastClass}`}>
<div className={`flex-container ${dawnLayout}`}>
<div className="flex-container align-middle">
{dawnHub && (
<img className="ToastMessage_classIcon" src={`/app/images/hub/toast/toast-${toastClass}.svg`} />
)}
<div className="callout-text">
{`${dawnToastText}${toastText}`}
</div>
</div>
{toastExit && (
<div className="ToastMessage__close clickable" onClick={toastExit} />
)}
</div>
{toastExit && (
<div className="ToastMessage__close clickable" onClick={toastExit} />
)}
</div>
</div>
</div>
)}
</div>
);
)}
</div>
);
};

// PropTypes ensure we pass required props of the correct type
ToastMessage.propTypes = {
@@ -46,11 +62,13 @@ ToastMessage.propTypes = {
PropTypes.func,
PropTypes.bool,
]),
dawnHub: PropTypes.bool,
};

// Default props used in the Toast Message
ToastMessage.defaultProps = {
toastExit: false,
dawnHub: false,
};

export default ToastMessage;
@@ -16,7 +16,31 @@
position: relative;
top: 30px;
height: 0;
&.dawn-hub {
z-index: 1;
max-width: 700px;
margin: auto;
font-family: Roboto;
font-size: 14px;
font-weight: 500;
.alert {
background-color: #f8e6e6;
.callout-text {color: #9f4948;}
}
.success {
background-color: #dff0d8;
.callout-text {color: #417505;}
}
.ToastMessage__close {
background-image: buildIconX(#000000);
}
}
}

.ToastMessage_classIcon {
margin-right: 20px;
}

.ToastMessage__close {
height: 13px;
width: 13px;
@@ -2,15 +2,15 @@

exports[`app/shared-components/ToastMessage More Snapshot tests with react-test-renderer, but for edge cases edge case where text is empty string 1`] = `
<div
className="ToastMessage full-width"
className="ToastMessage full-width "
>

</div>
`;

exports[`app/shared-components/ToastMessage Snapshot tests with react-test-renderer toast message is rendered correctly 1`] = `
<div
className="ToastMessage full-width"
className="ToastMessage full-width "
>
<div
className="callout-container"
@@ -22,9 +22,13 @@ exports[`app/shared-components/ToastMessage Snapshot tests with react-test-rende
className="flex-container align-center-middle"
>
<div
className="callout-text"
className="flex-container align-middle"
>
sample text
<div
className="callout-text"
>
sample text
</div>
</div>
</div>
</div>
@@ -34,7 +38,7 @@ exports[`app/shared-components/ToastMessage Snapshot tests with react-test-rende

exports[`app/shared-components/ToastMessage Snapshot tests with react-test-renderer toast message is rendered correctly with a close button 1`] = `
<div
className="ToastMessage full-width"
className="ToastMessage full-width "
>
<div
className="callout-container"
@@ -46,9 +50,13 @@ exports[`app/shared-components/ToastMessage Snapshot tests with react-test-rende
className="flex-container align-center-middle"
>
<div
className="callout-text"
className="flex-container align-middle"
>
example text
<div
className="callout-text"
>
example text
</div>
</div>
<div
className="ToastMessage__close clickable"
ProTip! Use n and p to navigate between commits in a pull request.