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 1775/feature/promo modal metrics pings #466

Merged
merged 4 commits into from Oct 28, 2019
Merged
Changes from 1 commit
Commits
File filter
Filter file types
Jump to
Jump to file
Failed to load files.

Always

Just for now

Remove some unused arguments and imports and outdated comments

  • Loading branch information
wlycdgr committed Oct 28, 2019
commit 8f710861969c5e2aa742acb1e9bbe89b5e5bd01e
@@ -61,7 +61,6 @@ class HomeViewContainer extends Component {
* @private
* Function to handle clicks on Select Basic in the Plus Promo Modal
*/
// TODO send appropriate metrics ping
_handlePromoSelectBasicClick = () => {
// GH-1777
// we want to show the Plus Promo modal once per Hub visit
@@ -76,7 +75,6 @@ class HomeViewContainer extends Component {
* @private
* Function to handle clicks on Select Plus in the Plus Promo Modal
*/
// TODO send appropriate metrics ping
_handlePromoSelectPlusClick = () => {
// GH-1777
// we want to show the Plus Promo modal once per Hub visit
@@ -27,8 +27,6 @@ const CTA_LINK = globals.DEBUG ? 'https://checkout.ghosterystage.com/insights' :
class InsightsPromoModal extends React.Component {
handleNoThanksClick = () => { this.props.handleNoThanksClick(INSIGHTS); };

handleSignInClick = () => { this.props.handleSignInClick(INSIGHTS); };

handleXClick = () => { this.props.handleXClick(INSIGHTS); };

render() {
@@ -80,7 +78,7 @@ class InsightsPromoModal extends React.Component {
</PanelToTabLink>
</div>
<div className="InsightsModal__other-options-container flex-container align-justify">
<span onClick={this.handleSignInClick} className="InsightsModal__link">{t('subscribe_pitch_sign_in')}</span>
<span onClick={this.props.handleSignInClick} className="InsightsModal__link">{t('subscribe_pitch_sign_in')}</span>
<span onClick={this.handleNoThanksClick} className="InsightsModal__link">{t('no_thanks_turn_promos_off')}</span>
</div>
</div>
@@ -13,7 +13,7 @@

import React from 'react';
import Header from '../containers/HeaderContainer';
import { PlusPromoModal, Modal } from '../../shared-components';
import { PlusPromoModal } from '../../shared-components';
import InsightsPromoModal from './InsightsPromoModal';
import PlusUpgradePromoModal from './PlusUpgradePromoModal';
import { DynamicUIPortContext } from '../contexts/DynamicUIPortContext';
@@ -209,21 +209,21 @@ class Panel extends React.Component {
}
};

_handlePromoSignInClick = (modal) => {
_handlePromoSignInClick = () => {
// TODO metrics ping
this.props.actions.togglePromoModal();
history.push({
pathname: '/login',
});
};

_handlePromoSelectBasicClick = (location) => {
_handlePromoSelectBasicClick = () => {
this.props.actions.togglePromoModal();

sendMessage('ping', 'promo_modals_select_basic_panel');
};

_handlePromoSelectPlusClick = (location) => {
_handlePromoSelectPlusClick = () => {
this.props.actions.togglePromoModal();

sendMessage('ping', 'promo_modals_select_plus_panel');
@@ -293,7 +293,7 @@ class Panel extends React.Component {
_renderInsightsPromoModal = () => {
if (this._insightsSubscriber()) return null;

sendMessage('promoModals.sawInsightsPromo', '', 'metrics');
sendMessage('promoModals.sawInsightsPromo', {});

sendMessage('ping', 'promo_modals_show_insights');

@@ -28,8 +28,6 @@ const DOMAIN = globals.DEBUG ? 'ghosterystage' : 'ghostery';
class PlusUpgradePromoModal extends React.Component {
handleNoThanksClick = () => { this.props.handleNoThanksClick(PLUS_UPGRADE); }

handleSignInClick = () => { this.props.handleSignInClick(PLUS_UPGRADE); };

handleSubscribeClick = () => { this.props.handleSubscribeClick(PLUS_UPGRADE); }

handleXClick = () => { this.props.handleXClick(PLUS_UPGRADE); }
@@ -69,7 +67,7 @@ class PlusUpgradePromoModal extends React.Component {
{
!loggedIn &&
(
<div onClick={this.handleSignInClick} className="PlusPromoModal__text-link">
<div onClick={this.props.handleSignInClick} className="PlusPromoModal__text-link">
{t('already_subscribed_sign_in')}
</div>
)
ProTip! Use n and p to navigate between commits in a pull request.