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 1813/feature/in app plus promo upgrade #463

Merged
merged 35 commits into from Oct 24, 2019
Merged
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
5102f35
Show plus promo modal on first view of Home view of each Hub session
wlycdgr Sep 16, 2019
e1c1f54
Stub out intro hub plus promo modal layout and implement its buttons
wlycdgr Sep 16, 2019
64869a5
Remove some unnecessary plus promo modal related CSS
wlycdgr Sep 17, 2019
5289bb9
Continue adding styling for plus promo modal
wlycdgr Sep 17, 2019
ce1fac9
Continue styling plus promo modal
wlycdgr Sep 18, 2019
361debe
Refactor plus promo modal CSS to improve alignment of elements
wlycdgr Sep 20, 2019
3c96366
Merge branch 'develop' into GH-1777/plus-intro-hub-promo
wlycdgr Sep 20, 2019
a60d6b4
Continue CSS work for plus promo modal
wlycdgr Sep 20, 2019
4f84229
Implement recommended gold banner in plus promo modal
wlycdgr Sep 23, 2019
3794709
Merge branch 'develop' into GH-1777/plus-intro-hub-promo
wlycdgr Sep 26, 2019
5cb13d5
Update and tweak plus promo modal design
wlycdgr Sep 27, 2019
f6d3298
Fix path bug in i18n-checker tool. Consolidate redundant entries in m…
wlycdgr Oct 1, 2019
4b16723
Additional consolidation of redundant and unused entries in messages
wlycdgr Oct 2, 2019
92d4923
Merge branch 'develop' into GH-1777/plus-intro-hub-promo
wlycdgr Oct 3, 2019
a1f102b
Merge branch 'develop' into GH-1777/plus-intro-hub-promo
wlycdgr Oct 3, 2019
569382e
Factor plus promo modal rendering out to shared component. Implement …
wlycdgr Oct 6, 2019
509f9eb
Move Plus Promo modal rendering to a PlusPromoModal shared component.…
wlycdgr Oct 7, 2019
833fdff
Create ModalPromos background class responsible for modal promo relat…
wlycdgr Oct 7, 2019
9e80640
Add local state to Panel to make sure component rerenders after user …
wlycdgr Oct 8, 2019
b03e312
Make PromoModals code more robust
wlycdgr Oct 8, 2019
a1270cc
Factor PlusPromoModal rendering out to helper in Panel. Extend condit…
wlycdgr Oct 8, 2019
cac56c1
Mark PromoModals methods as static. Refine PlusPromoModal implementat…
wlycdgr Oct 8, 2019
be05ce9
Add logic to hide plus promo modal from Insights subscribers. Cleanup…
wlycdgr Oct 9, 2019
ee361ad
Clean up. Finish string localization in PlusPromoModal
wlycdgr Oct 9, 2019
e19e5ab
Add gold ghostie badge svg. Begin fleshing out upgrade plus promo mod…
wlycdgr Oct 16, 2019
80d75fb
Pull non-shared upgrade version of plus promo modal out of shared Plu…
wlycdgr Oct 16, 2019
842d5ae
Merge GH-1777 into branch
wlycdgr Oct 16, 2019
d51aeec
Merge in initial plus promo modal implementation
wlycdgr Oct 18, 2019
a33c88e
Merge branch 'release/8.4.5' into GH-1813/feature/in-app-plus-promo-u…
wlycdgr Oct 18, 2019
811a19f
Flesh out upgrade promo modal UI and styles
wlycdgr Oct 18, 2019
2e4f060
Implement panel to tab link for the upgrade to plus button
wlycdgr Oct 21, 2019
c246530
Add no thanks link click handling
wlycdgr Oct 21, 2019
49161bf
Localization-proof upgrade modal CSS. Finalize UI and display logic.
wlycdgr Oct 21, 2019
05291b5
Implement ability to turn off promotions from inside plus upgrade pro…
wlycdgr Oct 23, 2019
2da1171
Merge in release/8.4.5
wlycdgr Oct 24, 2019
File filter
Filter file types
Jump to
Jump to file
Failed to load files.

Always

Just for now

Factor plus promo modal rendering out to shared component. Implement …

…rendering in panel. Implement display context CSS adjustments.
  • Loading branch information
wlycdgr committed Oct 6, 2019
commit 569382ef1230330c0151b5815e54916ac433f558
@@ -385,6 +385,15 @@
"password_field_label_required": {
"message": "Password required."
},
"name": {
"description": "The title of this extension (Ghostery).",
"message": "$EXTENSION_NAME$ – Privacy Ad Blocker",
"placeholders": {
"extension_name": {
"content": "Ghostery"
}
}
},
"none": {
"description": "Used to say that this item does not belong to any of the groups, as in \"Groups: None\" (as opposed to \"Groups: Group A, Group B, Group C\").",
"message": "None"
@@ -1960,6 +1969,9 @@
"choose_your_privacy_plan": {
"message": "Choose your privacy plan"
},
"choose_your_ghostery_privacy_plan": {
"message": "Choose your Ghostery privacy plan"
},
"ghostery_basic": {
"message": "Ghostery Basic"
},
@@ -40,7 +40,7 @@ exports[`app/hub/Views/CreateAccount component Snapshot tests with react-test-re
className="CreateAccountView__inputLabel"
htmlFor="create-account-email"
>
hub_create_account_label_email
email_colon
</label>
<input
autoComplete="off"
@@ -60,7 +60,7 @@ exports[`app/hub/Views/CreateAccount component Snapshot tests with react-test-re
className="CreateAccountView__inputLabel"
htmlFor="create-account-confirmEmail"
>
hub_create_account_label_email_confirm
confirm_email_colon
</label>
<input
autoComplete="off"
@@ -128,7 +128,7 @@ exports[`app/hub/Views/CreateAccount component Snapshot tests with react-test-re
className="CreateAccountView__inputLabel"
htmlFor="create-account-password"
>
hub_create_account_label_password
password_colon
</label>
<input
autoComplete="off"
@@ -240,7 +240,7 @@ exports[`app/hub/Views/CreateAccount component Snapshot tests with react-test-re
className="CreateAccountView__button button success"
type="submit"
>
hub_create_account_button_submit
create_account
</button>
</div>
</div>
@@ -288,7 +288,7 @@ exports[`app/hub/Views/CreateAccount component Snapshot tests with react-test-re
className="CreateAccountView__inputLabel"
htmlFor="create-account-email"
>
hub_create_account_label_email
email_colon
</label>
<input
autoComplete="off"
@@ -303,7 +303,7 @@ exports[`app/hub/Views/CreateAccount component Snapshot tests with react-test-re
<div
className="CreateAccountView__inputError"
>
hub_create_account_label_email_invalid
please_enter_a_valid_email
</div>
</div>
<div
@@ -313,7 +313,7 @@ exports[`app/hub/Views/CreateAccount component Snapshot tests with react-test-re
className="CreateAccountView__inputLabel"
htmlFor="create-account-confirmEmail"
>
hub_create_account_label_email_confirm
confirm_email_colon
</label>
<input
autoComplete="off"
@@ -328,7 +328,7 @@ exports[`app/hub/Views/CreateAccount component Snapshot tests with react-test-re
<div
className="CreateAccountView__inputError"
>
hub_create_account_label_email_confirm_invalid
your_emails_do_not_match
</div>
</div>
</div>
@@ -386,7 +386,7 @@ exports[`app/hub/Views/CreateAccount component Snapshot tests with react-test-re
className="CreateAccountView__inputLabel"
htmlFor="create-account-password"
>
hub_create_account_label_password
password_colon
</label>
<input
autoComplete="off"
@@ -508,7 +508,7 @@ exports[`app/hub/Views/CreateAccount component Snapshot tests with react-test-re
className="CreateAccountView__button button success"
type="submit"
>
hub_create_account_button_submit
create_account
</button>
</div>
</div>
@@ -152,176 +152,6 @@
}
}

.PlusPromoModal__content {
position: relative;
width: 646px;
height: 553px;
background-color: #f7f7f7;
border: 1.9px solid #930194;
z-index: 10;
}

.PlusPromoModal__buttons-background {
background-color: #e7ecee;
position: absolute;
bottom: 3px;
width: 99%;
height: 72px;
z-index: -1;
}

.PlusPromoModal__thanks-for-download {
padding-top: 30px;
font-size: 26px;
font-weight: bold;
}

.PlusPromoModal__choose-your-plan {
padding-top: 10px;
font-size: 18px;
font-weight: bold;
}

.PlusPromoModal__options-container {
height: 100%;
margin-top: 44px;
display: flex;
justify-content: space-evenly;
}

.PlusPromoModal__option-container {
display: flex;
align-items: center;
flex-direction: column;
}

.PlusPromoModal__option-description-box {
width: 240px;
height: 298px;
margin-bottom: 45px;
border-style: solid;
border-width: 3px;
background-color: #FFFFFF;

&.basic {
border-color: #1dafed;
}

&.plus {
position: relative; // so that the recommended banner is positioned relative to this element
border-image-source: linear-gradient(39deg, #f2daa2, #eab968);
border-image-slice: 1;
}
}

.PlusPromoModal__recommended-banner {
position: absolute;
left: -30px;
top: -30px;
}

.PlusPromoModal__recommended-banner-text {
position: relative;
left: 18px;
top: -47px;
transform: rotate(-15deg);
color: white;
font-size: 16px;
font-weight: bold;
}

.PlusPromoModal__option-header {
margin-top: 20px;
font-size: 19px;
font-weight: bold;
letter-spacing: -0.5px;
text-align: center;

&.basic { color: #1dafed; }
&.plus { color: #ebbf73; }
}

.PlusPromoModal__price-text {
line-height: 1.3;
text-align: center;

&.basic { color: #1dafed; }
&.plus { color: #ebbf73; }
}

.PlusPromoModal__currency-sign {
font-size: 30px;
font-weight: bold;
}

.PlusPromoModal__amount {
vertical-align: middle;
font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 58px;
}

.PlusPromoModal__per-month {
vertical-align: sub;
font-size: 18px;
font-weight: bold;
}

.PlusPromoModal__option-description-item {
font-size: 16px;
text-align: center;
color: #333333;

&.italic {
font-style: italic;
}
}

.PlusPromoModal__check-icon {
padding-right: 5px;
margin-top: -18px;
}

.PlusPromoModal__plus-option-description-item-container {
display: flex;
justify-content: center;
}

.PlusPromoModal__button {
margin: 0;
font-size: 11px;
font-weight: 600;
letter-spacing: 0.5px;
display: flex;
align-items: center;
justify-content: center;
box-shadow: none;

&.basic {
width: 135px;
height: 40px;
border: solid 2px #15b4f2;
background-color: white;
color: #2cbcf4;
}
&.basic:hover {
background-color: #2cbcf4;
color: white;
}

&.plus {
width: 163px;
height: 38px;
border: none;
background-image: linear-gradient(to bottom, #2fdbfa, #15b4f2);
color: white;
font-weight: 600;
letter-spacing: 0.5px;
}
&.plus:hover {
background-image: linear-gradient(to bottom, #1fcbea, #05a4e2);
}
}

// Firefox Font Size Override and Image Size Override
@-moz-document url-prefix() {
.HomeView--firefoxFontSize {
@@ -59,7 +59,7 @@ class HomeViewContainer extends Component {

/**
* @private
* Dismisses the Plus promo modal if user opts to stick with the basic plan
* Dismisses the Plus promo modal when user clicks either the Select Plus or Select Basic button
*/
_dismissModal = () => {
this.setState({
@@ -68,73 +68,6 @@ class HomeViewContainer extends Component {
this.props.actions.markPlusPromoModalShown();
}

_renderPlusPromoModal = () => (
<div className="PlusPromoModal__content flex-container flex-dir-column align-middle">
<div className="PlusPromoModal__buttons-background" />
<div className="PlusPromoModal__thanks-for-download">
{t('thanks_for_downloading_ghostery')}
</div>
<div className="PlusPromoModal__choose-your-plan">
{t('choose_your_privacy_plan')}
</div>
<div className="PlusPromoModal__options-container full-width">
<div className="PlusPromoModal__option-container">
<div className="PlusPromoModal__option-description-box basic">
<div className="PlusPromoModal__option-header basic">{t('ghostery_basic')}</div>
<div className="PlusPromoModal__price-text basic">
<span className="PlusPromoModal__currency-sign">{t('locale_appropriate_currency_icon')}</span>
<span className="PlusPromoModal__amount">0</span>
<span> </span>
<span className="PlusPromoModal__per-month">{t('per_month')}</span>
</div>
<div className="PlusPromoModal__option-description">
<p className="PlusPromoModal__option-description-item no-capitalize">{t('protection_for_this_browser')}</p>
<p className="PlusPromoModal__option-description-item">{t('blocks_ads')}</p>
<p className="PlusPromoModal__option-description-item">{t('blocks_trackers')}</p>
<p className="PlusPromoModal__option-description-item">{t('fast_browsing')}</p>
</div>
</div>
<div className="PlusPromoModal__button basic button" onClick={this._dismissModal}>
<span>{t('select_basic')}</span>
</div>
</div>
<div className="PlusPromoModal__option-container">
<div className="PlusPromoModal__option-description-box plus">
<div className="PlusPromoModal__recommended-banner">
<img src="/app/images/hub/home/recommended-banner.svg" />
<div className="PlusPromoModal__recommended-banner-text">{t('recommended')}</div>
</div>
<div className="PlusPromoModal__option-header plus">Ghostery Plus</div>
<div className="PlusPromoModal__price-text plus">
<span className="PlusPromoModal__currency-sign">{t('locale_appropriate_currency_icon')}</span>
<span className="PlusPromoModal__amount">{t('plus_monthly_subscription_price_number')}</span>
<span> </span>
<span className="PlusPromoModal__per-month">per month</span>
</div>
<div className="PlusPromoModal__option-description">
<p className="PlusPromoModal__option-description-item italic">All basic features, plus:</p>
<div className="PlusPromoModal__plus-option-description-item-container">
<img className="PlusPromoModal__check-icon" src="/app/images/hub/home/check-icon.svg" />
<p className="PlusPromoModal__option-description-item">Historical Tracker Stats</p>
</div>
<div className="PlusPromoModal__plus-option-description-item-container">
<img className="PlusPromoModal__check-icon" src="/app/images/hub/home/check-icon.svg" />
<p className="PlusPromoModal__option-description-item">Priority Support</p>
</div>
<div className="PlusPromoModal__plus-option-description-item-container">
<img className="PlusPromoModal__check-icon" src="/app/images/hub/home/check-icon.svg" />
<p className="PlusPromoModal__option-description-item">New Color Themes</p>
</div>
</div>
</div>
<a href="http://signon.ghostery.com/en/subscribe/" target="_blank" rel="noopener noreferrer" className="PlusPromoModal__button plus button" onClick={this._dismissModal}>
<span>Select Plus</span>
</a>
</div>
</div>
</div>
);

_render() {
const { justInstalled, plusPromoModalShown } = this.state;
const { home, user } = this.props;
@@ -157,7 +90,7 @@ class HomeViewContainer extends Component {
return (
<div className="full-height">
<Modal show={!isPlus && !plusPromoModalShown}>
{this._renderPlusPromoModal()}
{Modal.renderPlusPromo('inHub', this._dismissModal)}
</Modal>
<HomeView {...childProps} />
</div>
ProTip! Use n and p to navigate between commits in a pull request.