Skip to content

Commit

Permalink
Stats: Add new date filtering feature flag (#95538)
Browse files Browse the repository at this point in the history
* Adds feature flag for new date filtering
* Adds callout to Traffic page when enabled
  • Loading branch information
a8ck3n authored Oct 21, 2024
1 parent 5d249a4 commit e0c048c
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 0 deletions.
9 changes: 9 additions & 0 deletions client/my-sites/stats/site.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ class StatsSite extends Component {
supportUserFeedback,
} = this.props;
const isNewStateEnabled = config.isEnabled( 'stats/empty-module-traffic' );
const isNewDateFilteringEnabled = config.isEnabled( 'stats/new-date-filtering' );
let defaultPeriod = PAST_SEVEN_DAYS;

const shouldShowUpsells = isOdysseyStats && ! isAtomic;
Expand Down Expand Up @@ -376,6 +377,14 @@ class StatsSite extends Component {
isOdysseyStats={ isOdysseyStats }
statsPurchaseSuccess={ context.query.statsPurchaseSuccess }
/>
{ isNewDateFilteringEnabled && (
<div
className="stats-new-date-filtering-callout"
style={ { background: 'antiquewhite', maring: '24px', padding: '24px' } }
>
<p>New date filtering enabled.</p>
</div>
) }
<HighlightsSection siteId={ siteId } currentPeriod={ defaultPeriod } />
<div id="my-stats-content" className={ wrapperClass }>
<>
Expand Down
1 change: 1 addition & 0 deletions config/client.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"signup_url",
"stats/empty-module-traffic",
"stats/empty-module-v2",
"stats/new-date-filtering",
"wpcom_concierge_schedule_id",
"wpcom_signup_id",
"wpcom_signup_key",
Expand Down
1 change: 1 addition & 0 deletions config/development.json
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@
"ssr/prefetch-timebox": false,
"stats/empty-module-traffic": true,
"stats/empty-module-v2": true,
"stats/new-date-filtering": true,
"stats/paid-wpcom-v2": true,
"stepper-woocommerce-poc": true,
"storage-addon": true,
Expand Down
1 change: 1 addition & 0 deletions config/horizon.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@
"ssr/prefetch-timebox": true,
"stats/empty-module-traffic": true,
"stats/empty-module-v2": true,
"stats/new-date-filtering": false,
"stats/paid-wpcom-v2": true,
"stepper-woocommerce-poc": true,
"storage-addon": true,
Expand Down
1 change: 1 addition & 0 deletions config/production.json
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@
"ssr/sample-log-cache-misses": true,
"stats/empty-module-traffic": true,
"stats/empty-module-v2": true,
"stats/new-date-filtering": false,
"stats/paid-wpcom-v2": true,
"stepper-woocommerce-poc": true,
"storage-addon": true,
Expand Down
1 change: 1 addition & 0 deletions config/stage.json
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@
"ssr/prefetch-timebox": true,
"stats/empty-module-traffic": true,
"stats/empty-module-v2": true,
"stats/new-date-filtering": false,
"stats/paid-wpcom-v2": true,
"stepper-woocommerce-poc": true,
"storage-addon": true,
Expand Down
1 change: 1 addition & 0 deletions config/test.json
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@
"ssr/prefetch-timebox": true,
"stats/empty-module-traffic": true,
"stats/empty-module-v2": true,
"stats/new-date-filtering": false,
"stepper-woocommerce-poc": true,
"storage-addon": true,
"themes/premium": true,
Expand Down
1 change: 1 addition & 0 deletions config/wpcalypso.json
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@
"ssr/prefetch-timebox": true,
"stats/empty-module-traffic": true,
"stats/empty-module-v2": true,
"stats/new-date-filtering": false,
"stats/paid-wpcom-v2": true,
"stepper-woocommerce-poc": true,
"storage-addon": true,
Expand Down

0 comments on commit e0c048c

Please sign in to comment.