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-1774 et al; promo modal logic bug fixes #468

Merged
merged 2 commits into from Oct 29, 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

Next

Show initial plus promo in Panel until user makes a choice. Up Insigh…

…st panel target to 7 opens on staging.
  • Loading branch information
wlycdgr committed Oct 29, 2019
commit 7306ef3a39652d11d1356039ad63ade02251e171
@@ -229,12 +229,20 @@ class Panel extends React.Component {
_handlePromoSelectBasicClick = () => {
this.props.actions.togglePromoModal();

// we do not mark the choice-required initial plus promo as 'seen' until
// the user has clicked Select Basic or Select Plus
sendMessage('promoModals.sawPlusPromo', {});

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

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

// we do not mark the choice-required initial plus promo as 'seen' until
// the user has clicked Select Basic or Select Plus
sendMessage('promoModals.sawPlusPromo', {});

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

@@ -273,9 +281,9 @@ class Panel extends React.Component {
_renderPlusPromoModal = () => {
if (this._plusSubscriber() || this._insightsSubscriber()) return null;

sendMessage('promoModals.sawPlusPromo', {});

if (this.props.promoModal === 'plus_upgrade') {
// the upgrade promo does not require the user to make a choice, so we mark it as 'seen' immediately
sendMessage('promoModals.sawPlusPromo', {});
sendMessage('ping', 'promo_modals_show_upgrade_plus');
return (
<PlusUpgradePromoModal
@@ -20,7 +20,7 @@ const DAYS_BETWEEN_PROMOS = {
insights: globals.DEBUG ? 0.00025 : 30
};
const WEEKLY_INSIGHTS_TARGET = globals.DEBUG ? 1 : 3;
const DAILY_INSIGHTS_TARGET = 3;
const DAILY_INSIGHTS_TARGET = globals.DEBUG ? 7 : 3;

const MSECS_IN_DAY = 86400000; // 1000 msecs-in-sec * 60 secs-in-min * 60 mins-in-hour * 24 hours-in-day
const PLUS = 'plus';
ProTip! Use n and p to navigate between commits in a pull request.