-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Stats Traffic: Create an empty Traffic tab behind the feature flag #22381
Stats Traffic: Create an empty Traffic tab behind the feature flag #22381
Conversation
- Replace allPeriod with displayedPeriods within StatsPeriodType that depends on a feature flag - To support different Stats tabs configurations: -- Replace usage of StatsPeriodType.rawValue to usage of StatsPeriodType. displayedPeriods.firstIndex -- Replace usage of StatsPeriodType(rawValue:..) initializer with StatsPeriodType.displayedPeriods[] -- Assume first displayedPeriod is a default tab
Avoid issues when feature flag updates when we have Stats already opened.
📲 You can test the changes from this Pull Request in WordPress Alpha by scanning the QR code below to install the corresponding build.
|
📲 You can test the changes from this Pull Request in Jetpack Alpha by scanning the QR code below to install the corresponding build.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! All the cases work perfectly.
@@ -46,6 +56,7 @@ fileprivate extension StatsPeriodType { | |||
case .weeks: return .statsPeriodWeeksAccessed | |||
case .months: return .statsPeriodMonthsAccessed | |||
case .years: return .statsPeriodYearsAccessed | |||
case .traffic: return .statsPeriodDaysAccessed // TODO |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: This could return .noStat
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't know about this case, thanks!
…affic-tab-behind-the-feature-flag
Fixes #22380
The goal of PR is to create a mechanism to support:
stats_traffic_tab
feature flag is disabledstats_traffic_tab
feature flag is enabledWhile continuing to support existing mechanisms of remembering previous tab or period selection.
To test:
Regression
Stats Traffic tab
Stats Traffic tab after feature flag update update
Simulator.Screen.Recording.-.iPhone.15.-.2024-01-12.at.12.18.52.mp4
Widgets and Deep Links regression
Simulator.Screen.Recording.-.iPhone.15.-.2024-01-12.at.12.21.27.mp4
Regression Notes
Breaking current Stats tab switching functionality
Manual testing
PR submission checklist:
RELEASE-NOTES.txt
if necessary.UI Changes testing checklist: