Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

Issue #9208: Adds in-product prompt to homescreen #9836

Merged
merged 1 commit into from Apr 22, 2020

Conversation

sblatz
Copy link
Contributor

@sblatz sblatz commented Apr 9, 2020

Pull Request checklist

  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Screenshots: This PR includes screenshots or GIFs of the changes made or an explanation of why it does not
  • Accessibility: The code in this PR follows accessibility best practices or does not include any user facing features. In addition, it includes a screenshot of a successful accessibility scan to ensure no new defects are added to the product.

After merge

  • Milestone: Make sure issues finished by this pull request are added to the milestone of the version currently in development.

To download an APK when reviewing a PR:

  1. click on Show All Checks,
  2. click Details next to "Taskcluster (pull_request)" after it appears and then finishes with a green checkmark,
  3. click on the "Fenix - assemble" task, then click "Run Artifacts".
  4. the APK links should be on the left side of the screen, named for each CPU architecture

@sblatz sblatz added the pr:work-in-progress PRs that are not ready to be reviewed yet and are actively being worked on label Apr 9, 2020
@sblatz sblatz force-pushed the tips branch 4 times, most recently from 1b23f85 to 4eb7d36 Compare April 9, 2020 23:38
@codecov-io
Copy link

codecov-io commented Apr 9, 2020

Codecov Report

Merging #9836 into master will decrease coverage by 0.17%.
The diff coverage is 5.55%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #9836      +/-   ##
============================================
- Coverage     19.25%   19.07%   -0.18%     
  Complexity      533      533              
============================================
  Files           340      343       +3     
  Lines         13806    13942     +136     
  Branches       1849     1869      +20     
============================================
+ Hits           2658     2660       +2     
- Misses        10909    11042     +133     
- Partials        239      240       +1     
Impacted Files Coverage Δ Complexity Δ
...pp/src/main/java/org/mozilla/fenix/FeatureFlags.kt 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...in/java/org/mozilla/fenix/components/Components.kt 30.50% <ø> (ø) 1.00 <0.00> (ø)
...la/fenix/components/metrics/GleanMetricsService.kt 8.80% <0.00%> (-0.24%) 3.00 <0.00> (ø)
...va/org/mozilla/fenix/components/metrics/Metrics.kt 19.01% <0.00%> (-0.39%) 0.00 <0.00> (ø)
...va/org/mozilla/fenix/components/tips/TipManager.kt 0.00% <0.00%> (ø) 0.00 <0.00> (?)
.../components/tips/providers/MigrationTipProvider.kt 0.00% <0.00%> (ø) 0.00 <0.00> (?)
...c/main/java/org/mozilla/fenix/home/HomeFragment.kt 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...fenix/home/sessioncontrol/SessionControlAdapter.kt 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...ix/home/sessioncontrol/SessionControlController.kt 72.07% <0.00%> (-0.66%) 0.00 <0.00> (ø)
...ix/home/sessioncontrol/SessionControlInteractor.kt 69.23% <0.00%> (-2.77%) 18.00 <0.00> (ø)
... and 11 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fbfbb7c...9f4fe23. Read the comment docs.

@sblatz sblatz marked this pull request as ready for review April 10, 2020 17:13
@sblatz sblatz removed the pr:work-in-progress PRs that are not ready to be reviewed yet and are actively being worked on label Apr 10, 2020
@sblatz
Copy link
Contributor Author

sblatz commented Apr 10, 2020

Request for data collection review form

All questions are mandatory. You must receive review from a data steward peer on your responses to these questions before shipping new data collection.

  1. What questions will you answer with this data?
  • How often do users receive a product prompt
  • How often do users engage with the product prompt by taking its action
  • How often do users close the product prompt
  1. Why does Mozilla need to answer these questions? Are there benefits for users? Do we need this information to address product or business requirements?
  • We need to know if users are getting the prompt they should be receiving and whether or not they're engaging with it so we can make the prompt more effective in the future.
  1. What alternative methods did you consider to answer these questions? Why were they not sufficient?
  • N/A (These are baseline metrics)
  1. Can current instrumentation answer these questions?
  • No, this is a new feature and there is no telemetry surrounding it.
  1. List all proposed measurements and indicate the category of data collection for each measurement, using the Firefox data collection categories on the found on the Mozilla wiki.
  • All data is Category 2.
  1. How long will this data be collected?
  • Until 09/01/2020
  1. What populations will you measure?
  • All release, beta, and nightly users with telemetry enabled.
  1. Please provide a general description of how you will analyze this data.
  • Glean / Amplitude
  1. Where do you intend to share the results of your analysis?
  • Only on Glean, Amplitude and with mobile teams.

BUTTON
}

open class Tip(
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Since we're adding the abstraction of a ButtonType. Could we move some of the data that is associated with that type to the type itself?

sealed class Type {
    data class Button(val title: String, action: () -> Unit)
}

@StringRes val identifier: Int,
@DrawableRes val icon: Int = -1,
@StringRes val title: Int,
@StringRes val description: Int,
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we have "learn more" be a link inside of the description versus having a separate section? This would allow us to have it inline like the mocks

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The reason I didn't do this is for accessibility purposes. I remember a while back that we had to move our "learn more" links into separate views so they would be separately selectable for screen readers. See the private browsing "myths" and the private browsing "allow search suggestions" hint.

@StringRes val identifier: Int,
@DrawableRes val icon: Int = -1,
@StringRes val title: Int,
@StringRes val description: Int,
Copy link
Contributor

Choose a reason for hiding this comment

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

what are the thoughts behind making this resource values versus the actual string / drawables?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Really happy with doing either here, do you think doing actual strings/drawables is cleaner? :)

@sblatz sblatz force-pushed the tips branch 3 times, most recently from bd7fd65 to 6be4083 Compare April 16, 2020 17:08
@sblatz sblatz requested a review from boek April 17, 2020 19:01
@sblatz sblatz force-pushed the tips branch 2 times, most recently from b1a2587 to bf39e9c Compare April 20, 2020 17:13
@@ -137,6 +137,12 @@ class Settings private constructor(
default = true
)

// If any of the prefs have been modified, quit displaying the fenix moved tip
fun shouldDisplayFenixMovingTip(): Boolean =
preferences.getBoolean(appContext.getString(R.string.pref_key_migrating_from_fenix_nightly_tip), true) &&
Copy link
Contributor

Choose a reason for hiding this comment

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

should this be || instead of &&?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think so. Each of these default to "true" and each user will get served one of these fenix moving tips. If any of them become "false" we no longer want to display the tip.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If it was an OR here, then they'd always get the tip and have no way to set the other pref keys to false :)

Copy link
Contributor

@liuche liuche left a comment

Choose a reason for hiding this comment

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

data-review only

Data Review Form (to be filled by Data Stewards)

  1. Is there or will there be documentation that describes the schema for the ultimate data set in a public, complete, and accurate way?

Yes, tip behavior and user interaction with it is documented in metrics.yaml.

  1. Is there a control mechanism that allows the user to turn the data collection on and off? (Note, for data collection not needed for security purposes, Mozilla provides such a control mechanism) Provide details as to the control mechanism available.

Yes, in Fenix data controls

  1. If the request is for permanent data collection, is there someone who will monitor the data over time?

Expiry set for 09/2020

  1. Using the category system of data types on the Mozilla wiki, what collection type of data do the requested measurements fall under?

Type 2, when tips are shown and interacted with by the user.

  1. Is the data collection request for default-on or default-off?

Default on

  1. Does the instrumentation include the addition of any new identifiers (whether anonymous or otherwise; e.g., username, random IDs, etc. See the appendix for more details)?

No, interaction only

  1. Is the data collection covered by the existing Firefox privacy notice?

Yes, feature interaction

  1. Does there need to be a check-in in the future to determine whether to renew the data?

no, has expiry

  1. Does the data collection use a third-party collection tool?

No

@liuche liuche removed the needs:data-review PR is awaiting a data review label Apr 22, 2020
@sblatz sblatz merged commit dce1696 into mozilla-mobile:master Apr 22, 2020
@liuche liuche mentioned this pull request Apr 28, 2020
32 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants