User story
As a user of the activity tab, I want to give feedback, so the team building the activity tab can hear my thoughts and make improvements.
Background
The team is testing an activity tab that would add reading insights to existing history tab with the goal of deepening engagement and increasing retention of readers.
Requirements
- ✅ Present survey once, upon users' 3rd entry into Activity Tab
- - We should only count it as a "view" if they tap the activity tab bottom (or top) tab bar button, and activity tab is at the root view. (Do not count navigating "back" into the tab as a view, or a view of the tab when an article is on top of the tab)
- ✅ logged-in and logged-out users are eligible
- Survey results should go to analytics
- ✅ Allow free-text responses
- ✅ Show confirmation toast that feedback has been submitted
- Stop showing the survey after January 15
Boilerplate requirements
- Should lay out well with long translations. Truncate, wrap text, or scroll where necessary.
- Should change colors according to multiple themes
- Should navigate easily and have understandable accessibility labels for Voice Over
- Should lay out well on larger font sizes. Truncate, wrap text, or scroll where necessary.
Designs
Engineering notes
Re-use WMFSurveyView component.
For incrementing the visited count, there are various callbacks in WMFAppViewController for detecting when someone tapped the bottom tab bar. shouldSelectViewController might be the best area to increment the count, since I expect it to fire before ActivityTabViewController's viewDidAppear.
Here, you could check self.currentTabNavigationController (which should be of type UINavigationController), check that it's viewControllers.count == 1 to indicate it is at the root, and check that it's rootViewController class is of type ActivityTabViewController. If it passes these, increment the count.
Presenting the survey can still occur from ActivityTabViewController's viewDidAppear, after you check that the visited count >= 3.
Testing Notes
These fixes are in the TestFlight Wikipedia app 7.8.7, starting in build 5894 (this can also be tested in a later build number).