Skip to content

Commit

Permalink
Remove newsletter goal feature flag (#99445)
Browse files Browse the repository at this point in the history
This change removes the feature flag for the newsletter goal from the
onboarding flow. The flag is no longer necessary as the feature we are
enabling the feature for all users.

I left the ability to mock feature flags in the `goalsToIntent()`. Seems
like it could be useful in the future.
  • Loading branch information
p-jackson authored Feb 7, 2025
1 parent 32fb2ad commit 5406049
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 19 deletions.
4 changes: 0 additions & 4 deletions client/landing/stepper/declarative-flow/onboarding.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import config from '@automattic/calypso-config';
import { PLAN_PERSONAL } from '@automattic/calypso-products';
import { OnboardSelect, Onboard, UserSelect, ProductsList } from '@automattic/data-stores';
import { ONBOARDING_FLOW, clearStepPersistedState } from '@automattic/onboarding';
Expand Down Expand Up @@ -198,9 +197,6 @@ const onboarding: Flow = {
const destination = addQueryArgs( '/setup/site-setup', {
siteSlug: providedDependencies.siteSlug,
...( isGoalsAtFrontExperiment && { 'goals-at-front-experiment': true } ),
...( config.isEnabled( 'onboarding/newsletter-goal' ) && {
flags: 'onboarding/newsletter-goal',
} ),
} );

return [ destination, addQueryArgs( destination, { skippedCheckout: 1 } ) ];
Expand Down
1 change: 0 additions & 1 deletion config/development.json
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@
"onboarding/import-light": false,
"onboarding/import-redirect-to-themes": true,
"onboarding/interval-dropdown": true,
"onboarding/newsletter-goal": false,
"onboarding/trail-map-feature-grid-copy": false,
"onboarding/trail-map-feature-grid-structure": false,
"onboarding/trail-map-feature-grid": false,
Expand Down
12 changes: 0 additions & 12 deletions packages/data-stores/src/onboard/test/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,25 +42,13 @@ describe( 'Test onboard utils', () => {
goals: [ SiteGoal.Write, SiteGoal.Engagement ],
expectedIntent: SiteIntent.Write,
},
{
goals: [ SiteGoal.Write, SiteGoal.Newsletter ],
expectedIntent: SiteIntent.Write,
featureFlags: { 'onboarding/newsletter-goal': false },
},
{
goals: [ SiteGoal.Write, SiteGoal.Newsletter ],
expectedIntent: SiteIntent.NewsletterGoal,
featureFlags: { 'onboarding/newsletter-goal': true },
},
{
goals: [ SiteGoal.Sell, SiteGoal.Newsletter ],
expectedIntent: SiteIntent.Sell,
featureFlags: { 'onboarding/newsletter-goal': false },
},
{
goals: [ SiteGoal.Sell, SiteGoal.Newsletter ],
expectedIntent: SiteIntent.NewsletterGoal,
featureFlags: { 'onboarding/newsletter-goal': true },
},
] )(
'Should map the $goals to $expectedIntent intent ($featureFlags)',
Expand Down
3 changes: 1 addition & 2 deletions packages/data-stores/src/onboard/utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import config from '@automattic/calypso-config';
import { SiteGoal, SiteIntent } from './constants';

export const goalsToIntent = ( goals: SiteGoal[] ): SiteIntent => {
Expand All @@ -12,7 +11,7 @@ export const goalsToIntent = ( goals: SiteGoal[] ): SiteIntent => {
}

// Newsletter flow
if ( config.isEnabled( 'onboarding/newsletter-goal' ) && goals.includes( SiteGoal.Newsletter ) ) {
if ( goals.includes( SiteGoal.Newsletter ) ) {
return SiteIntent.NewsletterGoal;
}

Expand Down

0 comments on commit 5406049

Please sign in to comment.