Skip to content

Make NEW_STATS flag visible for all builds#22626

Merged
adalpari merged 2 commits intotrunkfrom
adalpari/stats-flag-all-builds
Feb 25, 2026
Merged

Make NEW_STATS flag visible for all builds#22626
adalpari merged 2 commits intotrunkfrom
adalpari/stats-flag-all-builds

Conversation

@adalpari
Copy link
Copy Markdown
Contributor

@adalpari adalpari commented Feb 24, 2026

Description

Enable the NEW_STATS experimental feature flag in all build variants, not just debug builds. Additionally, hide the Insights and Subscribers tabs in release builds since they are still under construction.

Testing instructions

Feature flag visibility in non-debug builds:

  1. Build and run a release/vanilla variant
  2. Navigate to experimental features settings
  • Verify NEW_STATS flag is listed and can be toggled
  1. Enable the NEW_STATS feature flag
  2. Open Stats
  • Verify only the Traffic tab is visible
Screenshot 2026-02-24 at 16 48 28

Feature flag visibility in debug builds:

  1. Build and run a debug variant
  2. Navigate to experimental features settings
  • Verify NEW_STATS flag is listed and can be toggled
  1. Enable the NEW_STATS feature flag
  2. Open Stats
  • Verify all 3 tabs are visible: Traffic, Insights, Subscribers
Screenshot 2026-02-24 at 16 34 58

… Subscribers tabs in releases

Enable the NEW_STATS experimental feature flag in all build variants (not just debug builds), while keeping the Insights and Subscribers tabs hidden in non-debug builds since they are still under construction.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
@dangermattic
Copy link
Copy Markdown
Collaborator

dangermattic commented Feb 24, 2026

1 Warning
⚠️ PR is not assigned to a milestone.

Generated by 🚫 Danger

@wpmobilebot
Copy link
Copy Markdown
Contributor

wpmobilebot commented Feb 24, 2026

App Icon📲 You can test the changes from this Pull Request in WordPress Android by scanning the QR code below to install the corresponding build.

App NameWordPress Android
FlavorJalapeno
Build TypeDebug
Versionpr22626-372abc6
Build Number1485
Application IDorg.wordpress.android.prealpha
Commit372abc6
Installation URL4h12rshsbkb88
Note: Google Login is not supported on these builds.

@wpmobilebot
Copy link
Copy Markdown
Contributor

wpmobilebot commented Feb 24, 2026

App Icon📲 You can test the changes from this Pull Request in Jetpack Android by scanning the QR code below to install the corresponding build.

App NameJetpack Android
FlavorJalapeno
Build TypeDebug
Versionpr22626-372abc6
Build Number1485
Application IDcom.jetpack.android.prealpha
Commit372abc6
Installation URL0cfl1ajfucll8
Note: Google Login is not supported on these builds.

@adalpari adalpari requested a review from nbradbury February 24, 2026 16:20
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 24, 2026

Codecov Report

❌ Patch coverage is 5.00000% with 19 lines in your changes missing coverage. Please review.
✅ Project coverage is 38.13%. Comparing base (00d1a09) to head (372abc6).
⚠️ Report is 1 commits behind head on trunk.

Files with missing lines Patch % Lines
.../wordpress/android/ui/newstats/NewStatsActivity.kt 0.00% 19 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            trunk   #22626      +/-   ##
==========================================
- Coverage   38.13%   38.13%   -0.01%     
==========================================
  Files        2254     2254              
  Lines      114262   114270       +8     
  Branches    15913    15916       +3     
==========================================
  Hits        43578    43578              
- Misses      67072    67080       +8     
  Partials     3612     3612              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@nbradbury
Copy link
Copy Markdown
Contributor

@adalpari This all works great, but I'm wondering if we should hide the tabs in release builds? Having a single "Traffic" tab at the top looks odd.

Screenshot_20260225_054803

Instead of per-tab visibility flags, use a single BuildConfig.DEBUG
check to determine whether to show the tab bar and include all tabs
or restrict to only the Traffic tab.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@adalpari
Copy link
Copy Markdown
Contributor Author

@adalpari This all works great, but I'm wondering if we should hide the tabs in release builds? Having a single "Traffic" tab at the top looks odd.

Sounds reasonable. Done here

@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown
Contributor

@nbradbury nbradbury left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! :shipit:

@adalpari adalpari enabled auto-merge (squash) February 25, 2026 16:06
@adalpari adalpari merged commit 3cee710 into trunk Feb 25, 2026
21 of 22 checks passed
@adalpari adalpari deleted the adalpari/stats-flag-all-builds branch February 25, 2026 16:08
adalpari added a commit that referenced this pull request Feb 25, 2026
* Make NEW_STATS feature flag visible for all builds, hide Insights and Subscribers tabs in releases

Enable the NEW_STATS experimental feature flag in all build variants (not just debug builds), while keeping the Insights and Subscribers tabs hidden in non-debug builds since they are still under construction.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>

* Hide tab bar in new stats for non-debug builds

Instead of per-tab visibility flags, use a single BuildConfig.DEBUG
check to determine whether to show the tab bar and include all tabs
or restrict to only the Traffic tab.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants