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

For #7249 Create a search widget #7474

Merged
merged 1 commit into from
Aug 19, 2022
Merged

Conversation

iorgamgabriel
Copy link
Collaborator

@iorgamgabriel iorgamgabriel commented Aug 9, 2022

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.

QA

  • QA Needed

To download an APK when reviewing a PR:

  1. click on Show All Checks,
  2. click Details next to build-focus-debug or build-klar-debug for changes targeting Klar,
  3. click View task in Taskcluster,
  4. click the Artifacts row,
  5. click to download any of the apks listed here which use an appropriate name for each CPU architecture.

GitHub Automation

Fixes #7249

@iorgamgabriel iorgamgabriel added the 🕵️‍♀️ needs review PRs that need to be reviewed label Aug 9, 2022
Copy link
Contributor

@Mugurell Mugurell left a comment

Choose a reason for hiding this comment

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

Some small nits but this LGTM.
If you have time to add some tests for the new code would be great!
r+ for the code.

@iorgamgabriel iorgamgabriel force-pushed the 7249 branch 6 times, most recently from ff375ed to 1a41f99 Compare August 11, 2022 13:25
@iorgamgabriel
Copy link
Collaborator Author

iorgamgabriel commented Aug 11, 2022

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?
  • search_widget_installed - If the user has the search widget added on the home screen
  • new_tab_button - When the user has pressed anywhere from the Focus logo until the start of the microphone icon, opening a new tab search screen.
  • voice_button - When the user pressed the microphone icon, opening a new voice search screen.
  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 are adding new features in history to make users' interactions more efficient.
  1. What alternative methods did you consider to answer these questions? Why were they not sufficient?
  • There are no other alternatives.

  1. Can current instrumentation answer these questions?
  • No.

  1. List all proposed measurements and indicate the category of data collection for each measurement, using the Firefox data collection categories found on the Mozilla wiki.

    Note that the data steward reviewing your request will characterize your data collection based on the highest (and most sensitive) category.
Measurement Description Data Collection Category Tracking Bug #
Search Widget Installed: If the user has the search widget added on the home screen. Category 2 - interaction data #7249
Search Widget New Tab Button: When the user has pressed anywhere from the Focus logo until the start of the microphone icon, opening a new tab search screen. Category 2 - interaction data #7249
Search Widget Voice Button: When the user pressed the microphone icon, opening a new voice search screen. Category 2 - interaction data #7249
  1. Please provide a link to the documentation for this data collection which describes the ultimate data set in a public, complete, and accurate way.
  1. How long will this data be collected? Choose one of the following:
  • Up until version 119, with the option to renew at that point.
  1. What populations will you measure?
  • All channels, all locales, all countries

  1. If this data collection is default on, what is the opt-out mechanism for users?
  • Default Glean SDK opt-out mechanism.

  1. Please provide a general description of how you will analyze this data.
  • GlAM.

  1. Where do you intend to share the results of your analysis?
  • 
Only on Glean, Glam, and with mobile teams.

  1. Is there a third-party tool (i.e. not Telemetry) that you are proposing to use for this data collection?
  • No third-party tools.

@rocketsroger
Copy link
Contributor

Please make sure you answer question 5 for the data review request. Thanks

@iorgamgabriel
Copy link
Collaborator Author

Done @rocketsroger

@rocketsroger
Copy link
Contributor

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?


* search_widget_installed - If the user has the search widget added on the home screen

* new_tab_button - When the user has pressed anywhere from the Focus logo until the start of the microphone icon, opening a new tab search screen.

* voice_button - When the user pressed the microphone icon, opening a new voice search screen.


2. 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 are adding new features in history to make users' interactions more efficient.


3. What alternative methods did you consider to answer these questions? Why were they not sufficient?


* There are no other alternatives.


4. Can current instrumentation answer these questions?


* No.


5. List all proposed measurements and indicate the category of data collection for each measurement, using the Firefox data collection categories found on the Mozilla wiki.
   
   Note that the data steward reviewing your request will characterize your data collection based on the highest (and most sensitive) category.

Measurement Description Data Collection Category Tracking Bug #
Search Widget Installed: If the user has the search widget added on the home screen. Category 2 - interaction data #7249
Search Widget New Tab Button: When the user has pressed anywhere from the Focus logo until the start of the microphone icon, opening a new tab search screen. Category 2 - interaction data #7249
Search Widget Voice Button: When the user pressed the microphone icon, opening a new voice search screen. Category 2 - interaction data #7249

6. Please provide a link to the documentation for this data collection which describes the ultimate data set in a public, complete, and accurate way.


* https://dictionary.telemetry.mozilla.org/apps/focus_android


7. How long will this data be collected? Choose one of the following:


* Up until version 119, with the option to renew at that point.


8. What populations will you measure?


* All channels, all locales, all countries


9. If this data collection is default on, what is the opt-out mechanism for users?


* Default Glean SDK opt-out mechanism.


10. Please provide a general description of how you will analyze this data.


* GlAM.


11. Where do you intend to share the results of your analysis?


* Only on Glean, Glam, and with mobile teams.


12. Is there a third-party tool (i.e. not Telemetry) that you are proposing to use for this data collection?


* No third-party tools.

Data Review

  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, through the metrics.yaml file and the Glean Dictionary

  1. Is there a control mechanism that allows the user to turn the data collection on and off?

Yes, through the "Send Usage Data" preference in the application settings

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

N/A, collection set to end or be renewed by version 119

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

Category 2, Interaction data

  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?

No

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

Yes

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

No

Result

data-review+

@rocketsroger rocketsroger removed 🕵️‍♀️ needs review PRs that need to be reviewed needs:data-review PR is awaiting a data review labels Aug 17, 2022
Copy link
Contributor

@Mugurell Mugurell left a comment

Choose a reason for hiding this comment

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

Looks and functions nicely 👍 ✨

Comment on lines 134 to 139
<activity
android:name=".searchwidget.VoiceSearchActivity"
android:theme="@style/Theme.AppCompat.Translucent" />

Copy link
Contributor

Choose a reason for hiding this comment

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

The previous version of the patch contained an important bug fix related to the search activity which was implemented in https://github.com/mozilla-mobile/fenix/pull/24296/files. Do we need that back?

Suggested change
<activity
android:name=".searchwidget.VoiceSearchActivity"
android:theme="@style/Theme.AppCompat.Translucent" />
<activity
android:name=".searchwidget.VoiceSearchActivity"
android:excludeFromRecents="true"
android:taskAffinity=""
android:theme="@style/Theme.AppCompat.Translucent" />

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

startActivity(intent)
}

companion object {
const val SEARCH_WIDGET = "search_widget"
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: It's not clear what this property represents and when to be used. Can you update the naming and/or add documentation?
I see other such properties in the app using the EXTRA prefix.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

Comment on lines 31 to 33
if (intent.getBooleanExtra(SEARCH_WIDGET, false)) {
SearchWidget.newTabButton.record(NoExtras())
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Can this be moved to MainActivity?
Just to have a better separation of responsabilities. This would be the first time IntentReceiverActivity records telemetry while MainActivity already does this, even for AppOpened events.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

@iorgamgabriel iorgamgabriel force-pushed the 7249 branch 2 times, most recently from 11f0a0c to 4e1a431 Compare August 19, 2022 10:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🛬 needs landing PRs that are ready to land
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create a search widget
3 participants