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-2070: Main screen promotion box #551

Merged
merged 53 commits into from Jun 15, 2020
Merged
Changes from 48 commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
901c4fa
Show premium subscribers a premium badge in simple/detailed views, he…
benstrumeyer May 7, 2020
f944c6c
Use api version 2.1.0 to get multiple subscriptions
benstrumeyer May 7, 2020
e035e69
Add hover effect for premium icon in menu
benstrumeyer May 7, 2020
659749b
Use css as single source of truth for icon colors
benstrumeyer May 7, 2020
2a83d42
Handle case where a user has multiple subscriptions and display Premi…
benstrumeyer May 7, 2020
de02e6c
Display subscription name
benstrumeyer May 8, 2020
53378f0
Remove duplicate locale string
benstrumeyer May 8, 2020
a10bd6c
Handle case where user only has a premium subscription and clicks the…
benstrumeyer May 8, 2020
7e552d2
Refactor code
benstrumeyer May 8, 2020
eb43832
Merge branch 'develop' into GH-2048
benstrumeyer May 8, 2020
9eb39bd
Refactor subscriber badge css classes, image paths and comments
benstrumeyer May 11, 2020
2d2aa90
Fix account#getUserSubscriptionData behavior
benstrumeyer May 11, 2020
9383ab6
Add subscriptionsPremium property to user object to check if a user h…
benstrumeyer May 11, 2020
f7b36a9
Refactor Header component to use subscriptionsPremium property
benstrumeyer May 11, 2020
f545e7b
Add newline
benstrumeyer May 11, 2020
2fcc862
Refactor svg template literal
benstrumeyer May 11, 2020
ef91547
Refactor account#getUserSubscriptionData to return an array of subscr…
benstrumeyer May 12, 2020
4fc3f53
Pass object that allows destructuring of subscriptionData
benstrumeyer May 12, 2020
2a9ffcb
Add return statement after callbacks
benstrumeyer May 12, 2020
f120d4d
Add guard to account#_setSubscriptionData to prevent overriding premi…
benstrumeyer May 12, 2020
7fe5a24
Give user subscriptionsPlus bool if they have either plus or premium …
benstrumeyer May 12, 2020
33c506a
Rename subscriptionsPlus and subscriptionsPremium to plusAccess and p…
benstrumeyer May 12, 2020
0586ff5
Set subscription property on user object with highest tier subscripti…
benstrumeyer May 12, 2020
a77797c
Refactor menu upsell icon to use user.subscriber instead of plusAcces…
benstrumeyer May 12, 2020
1816764
test
benstrumeyer May 12, 2020
0847e49
Refactor Header logo and menu icon to use subscription instead of pre…
benstrumeyer May 13, 2020
d25d313
Rename subscriber variable to subscription
benstrumeyer May 13, 2020
c9ad1de
Refactor subscriber badge to use plusAccess and premiumAccess on clic…
benstrumeyer May 13, 2020
6398be1
Check if user object exists before accessing subscription property
benstrumeyer May 13, 2020
eb337bc
Display UI elements basedd off user scope
benstrumeyer May 13, 2020
3d51fd0
Remove unused subscription property on user
benstrumeyer May 13, 2020
23e5eb7
Base menu icon off of plusAccess and premiumAccess
benstrumeyer May 13, 2020
49eb749
Refactor isPlus to hasPlusAccess, destructure some things, and save s…
benstrumeyer May 13, 2020
47f1cd5
Use panel#hasPlusAccess() directly
benstrumeyer May 13, 2020
ead0930
Fix menu icon link
benstrumeyer May 14, 2020
cf73693
Add description and button for upgrade prompt
benstrumeyer May 15, 2020
01e96c8
Add shield icon without color params
benstrumeyer May 18, 2020
dd113ce
Add url-friendly-params to shield icon
benstrumeyer May 18, 2020
4bd057b
Add responsive styles for upgrade promo
benstrumeyer May 18, 2020
9e2774c
Merge branch 'GH-2048' into GH-2070
benstrumeyer May 18, 2020
c8c4606
Add purple border for non-premium users
benstrumeyer May 18, 2020
b4f891e
Update snapshot
benstrumeyer May 18, 2020
e992df0
Fix button from leaking outside the container right before hitting br…
benstrumeyer May 18, 2020
d44147f
Refactor colors
benstrumeyer May 18, 2020
5b22311
Small style changes
benstrumeyer May 18, 2020
5406aaf
Fix responsive styling for button when logged into a premium account
benstrumeyer May 19, 2020
03bdff3
Change copy
benstrumeyer May 19, 2020
16da3e8
Merge branch 'GH-2070' of github.com:ghostery/ghostery-extension into…
benstrumeyer Jun 15, 2020
f380b59
Fix passing wrong prop
benstrumeyer Jun 15, 2020
0fcce0f
Merge branch 'develop' into GH-2070
christophertino Jun 15, 2020
f060857
Update tests and snapshot
benstrumeyer Jun 15, 2020
9902d6e
Merge branch 'GH-2070' of github.com:ghostery/ghostery-extension into…
benstrumeyer Jun 15, 2020
01478a5
Merge branch 'develop' into GH-2070
christophertino Jun 15, 2020
File filter
Filter file types
Jump to
Jump to file
Failed to load files.

Always

Just for now

@@ -1294,9 +1294,6 @@
"hub_home_feature_setup_button_alt": {
"message": "Benutzerdefiniertes Setup abgeschlossen"
},
"hub_home_feature_supporter_text": {
"message": "Stufen Sie hoch auf Ghostery Plus und schalten Sie spezielle Funktionen frei."
},
"hub_setup_page_title": {
"message": "Ghostery Hub - Setup"
},
@@ -1297,8 +1297,14 @@
"hub_home_feature_setup_button_alt": {
"message": "Custom Setup Complete"
},
"hub_home_feature_supporter_text": {
"message": "Upgrade to Ghostery Plus and unlock special features."
"hub_home_plus_upgrade_text": {
"message": "Go beyond basic privacy. Upgrade your Ghostery plan to receive device-level protection, VPN access, and more!"
},
"hub_home_plus_upgrade_button_text": {
"message": "Upgrade now"
},
"hub_home_plus_full_protection": {
"message": "You are fully protected!"
},
"hub_setup_page_title": {
"message": "Ghostery Hub - Setup"
@@ -1294,9 +1294,6 @@
"hub_home_feature_setup_button_alt": {
"message": "Instalación personalizada completa"
},
"hub_home_feature_supporter_text": {
"message": "Mejora a Ghostery Plus y desbloquea funciones especiales."
},
"hub_setup_page_title": {
"message": "Centro de Ghostery: instalación"
},
@@ -1294,9 +1294,6 @@
"hub_home_feature_setup_button_alt": {
"message": "Configuration personnalisée terminée"
},
"hub_home_feature_supporter_text": {
"message": "Passez à Ghostery Plus et découvrez des fonctionnalités spéciales."
},
"hub_setup_page_title": {
"message": "Hub Ghostery — Configuration"
},
@@ -1294,9 +1294,6 @@
"hub_home_feature_setup_button_alt": {
"message": "Egyéni telepítés kész"
},
"hub_home_feature_supporter_text": {
"message": "Bővítsen Ghostery Plus verzióra és oldjon fel különleges funkciókat!"
},
"hub_setup_page_title": {
"message": "Ghostery Központ - Beállítás"
},
@@ -1294,9 +1294,6 @@
"hub_home_feature_setup_button_alt": {
"message": "Configurazione Personalizzata Completa"
},
"hub_home_feature_supporter_text": {
"message": "Effettua l'upgrade a Ghostery Plus e sblocca funzioni speciali."
},
"hub_setup_page_title": {
"message": "Ghostery Hub - Configurazione"
},
@@ -1294,9 +1294,6 @@
"hub_home_feature_setup_button_alt": {
"message": "カスタム設定完了"
},
"hub_home_feature_supporter_text": {
"message": "「Ghostery プラス」にアップグレードして高度な機能をご利用ください。"
},
"hub_setup_page_title": {
"message": "Ghostery ハブ - 設定"
},
@@ -1294,9 +1294,6 @@
"hub_home_feature_setup_button_alt": {
"message": "사용자 지정 설정 완료"
},
"hub_home_feature_supporter_text": {
"message": "Ghostery Plus로 업그레이드하고 특별 기능을 새롭게 이용하세요."
},
"hub_setup_page_title": {
"message": "Ghostery 허브 - 설정"
},
@@ -1294,9 +1294,6 @@
"hub_home_feature_setup_button_alt": {
"message": "Aangepaste instelling voltooid"
},
"hub_home_feature_supporter_text": {
"message": "Upgrade naar Ghostery Plus en ontgrendel speciale opties."
},
"hub_setup_page_title": {
"message": "Ghostery Instellen"
},
@@ -1294,9 +1294,6 @@
"hub_home_feature_setup_button_alt": {
"message": "Konfiguracja niestandardowa zakończona"
},
"hub_home_feature_supporter_text": {
"message": "Zaktualizuj do Ghostery Plus i odblokuj funkcje specjalne."
},
"hub_setup_page_title": {
"message": "Hub Ghostery - Konfiguracja"
},
@@ -1294,9 +1294,6 @@
"hub_home_feature_setup_button_alt": {
"message": "Configuração personalizada concluída"
},
"hub_home_feature_supporter_text": {
"message": "Atualize para o Ghostery Plus e desbloqueie recursos especiais."
},
"hub_setup_page_title": {
"message": "Ghostery Hub - Configuração"
},
@@ -1294,9 +1294,6 @@
"hub_home_feature_setup_button_alt": {
"message": "Пользовательская настройка завершена"
},
"hub_home_feature_supporter_text": {
"message": "Обновитесь до Ghostery Plus и разблокируйте специальные функции."
},
"hub_setup_page_title": {
"message": "Ghostery Hub - Настройка"
},
@@ -1294,9 +1294,6 @@
"hub_home_feature_setup_button_alt": {
"message": "自定义设置完毕"
},
"hub_home_feature_supporter_text": {
"message": "升级为Ghostery Plus,解锁特别功能。"
},
"hub_setup_page_title": {
"message": "Ghostery Hub - 设置"
},
@@ -1294,9 +1294,6 @@
"hub_home_feature_setup_button_alt": {
"message": "自定義設置完成"
},
"hub_home_feature_supporter_text": {
"message": "升級至Ghostery Plus并解鎖特別特色。"
},
"hub_setup_page_title": {
"message": "Ghostery 中心 - 設置 "
},
@@ -34,7 +34,7 @@ const HomeView = (props) => {
enable_metrics,
changeMetrics,
email,
isPlus,
isPremium
} = props;
const accountHref = globals.ACCOUNT_BASE_URL;

@@ -61,6 +61,9 @@ const HomeView = (props) => {
const setupButtonClassNames = ClassNames('HomeView__featureButton button primary', {
hollow: setup_complete,
});
const upgradeContainerClassNames = ClassNames('HomeView__upgradeContainer row align-center-middle', {
'purple-border': !isPremium
});

return (
<div className="HomeView row align-center">
@@ -141,17 +144,17 @@ const HomeView = (props) => {
</NavLink>
</div>
</div>
<div className="HomeView__plus row large-unstack">
<div className="HomeView__featureIcon feature-plus hide-for-large" />
<div className="HomeView__featureText columns">
{t('hub_home_feature_supporter_text')}
<div className={upgradeContainerClassNames}>
<div className="HomeView__upgradeIcon" />
<div className="HomeView__upgradeText">
{t('hub_home_plus_upgrade_text')}
</div>
<div className="HomeView__featureIcon columns shrink feature-plus show-for-large" />
<div className="columns flex-container align-center-middle">
<NavLink to="/plus" className="HomeView__featureButton button primary">
{isPlus ? t('already_subscribed') : t('get_ghostery_plus')}
<div className="HomeView__buttonContainer columns flex-container">
<NavLink to="/upgrade" className="HomeView__featureButton button primary">
{isPremium ? t('hub_home_plus_full_protection') : t('hub_home_plus_upgrade_button_text')}
</NavLink>
</div>

</div>
</div>
</div>
@@ -166,7 +169,7 @@ HomeView.propTypes = {
enable_metrics: PropTypes.bool.isRequired,
changeMetrics: PropTypes.func.isRequired,
email: PropTypes.string.isRequired,
isPlus: PropTypes.bool.isRequired,
isPremium: PropTypes.bool.isRequired,
};

export default HomeView;
@@ -15,7 +15,7 @@
.HomeView {
padding-top: 45px;
padding-bottom: 25px;
color: #4a4a4a;
color: $tundora;
}
.HomeView--bolded {
font-weight: 700;
@@ -28,14 +28,14 @@
margin-right: 23px;
}
.HomeView__header h1 {
color: #4a4a4a;
color: $tundora;
margin-bottom: 19px;
}
.HomeView__headerTagline {
margin-top: 7px;
font-size: 20px;
line-height: 30px;
color: #4a4a4a;
color: $tundora;
}
.HomeView__supportContainer {
margin-top: 12px;
@@ -54,7 +54,7 @@
margin-top: 7px;
padding: 27px 12px 30px;
border-radius: 4px;
background-color: #f0f3f4;
background-color: $porcelain;
}
.HomeView__onboardingFeature {
margin: 0 8px;
@@ -64,23 +64,32 @@
margin: 7px 0 4px;
max-width: 1px;
padding: 0;
background-color: #979797;
background-color: $dark-silver;
}
.HomeView__dividerHorizontal {
margin: 0 25px;
height: 1px;
width: 100%;
padding: 0;
background-color: #979797;
background-color: $dark-silver;
}
.HomeView__plus {
.HomeView__upgradeContainer {
display: flex;
margin-top: 22px;
padding: 22px 12px;
background-color: #f0f3f4;
background-color: $porcelain;
border-radius: 4px;

&.purple-border {
box-shadow: 0 0 8px 5px $dark-magenta;
border: solid 1.6px $dark-magenta;
}
}
.HomeView__plusFeature {
padding: 0 36px;
.HomeView__upgradeIcon {
background-image: upgradeShieldIcon($baby-blue, $tundora);
margin: 0px 35px 0 30px;
height: 50px;
width: 49px;
}
.HomeView__featureIcon {
height: 50px;
@@ -89,44 +98,36 @@
background-repeat: no-repeat;
background-position: center center;
}
.HomeView__upgradeText {
width: 226px;
font-size: 16px;
font-weight: bold;
line-height: 1.69;
}
.HomeView__featureButton {
margin: auto;
}
.HomeView__onboardingFeature.feature-tutorial .HomeView__featureIcon {
background-image: buildIconWand(#4a4a4a, #daf4ff);
background-image: buildIconWand($tundora, $baby-blue);
}
.HomeView__onboardingFeature.feature-tutorial-complete .HomeView__featureIcon {
width: 100px;
margin: 0 0 0 50px;
background-image: buildIconWandCheck(#4a4a4a, #daf4ff, #1dafed);
background-image: buildIconWandCheck($tundora, $baby-blue, $ghosty-blue-alt);
}
.HomeView__onboardingFeature.feature-setup .HomeView__featureIcon {
background-image: buildIconClipboard(#4a4a4a, #daf4ff);
background-image: buildIconClipboard($tundora, $baby-blue);
}
.HomeView__onboardingFeature.feature-setup-complete .HomeView__featureIcon {
width: 100px;
margin: 0 0 0 50px;
background-image: buildIconClipboardCheck(#4a4a4a, #daf4ff, #1dafed);
}
.HomeView__featureIcon.feature-plus {
position: relative;
margin-left: auto;
margin-right: auto;
top: -25px;
height: 46px;
background-image: buildIconGhosteryPlus(#4a4a4a, #daf4ff);
background-size: contain;
background-image: buildIconClipboardCheck($tundora, $baby-blue, $ghosty-blue-alt);
}
.HomeView__featureTitle {
text-align: center;
font-size: 18px;
padding: 22px 0 10px;
}
.HomeView__featureText {
text-align: center;
font-size: 14px;
line-height: 27px;
}
.HomeView__featureButton {
margin: 0;
}
.HomeView__onboarding .HomeView__featureButton {
margin-top: 26px;
min-width: 130px;
@@ -150,8 +151,20 @@
.HomeView__onboardingFeature.feature-setup-complete {
margin: 35px 0 15px;
}
.HomeView__upgradeContainer {
flex-direction: column;
}
.HomeView__upgradeIcon {
margin: 0 auto 15px auto;
}
.HomeView__upgradeText {
text-align: center;
margin: auto;
}
.HomeView__featureButton {
margin-top: 25px;
}
}

// Firefox Font Size Override and Image Size Override
@-moz-document url-prefix() {
.HomeView--firefoxFontSize {
ProTip! Use n and p to navigate between commits in a pull request.