Skip to content

Commit

Permalink
Bug 1821032 - Add telemetry for the homescreen no collections placeho…
Browse files Browse the repository at this point in the history
…lder close button
  • Loading branch information
Alexandru2909 authored and mergify[bot] committed Mar 9, 2023
1 parent ef84249 commit 2bd4ff2
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
17 changes: 17 additions & 0 deletions fenix/app/metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4897,6 +4897,23 @@ collections:
metadata:
tags:
- Collections
placeholder_cancel:
type: event
description: |
User interacted with the `X` button from the homescreen no collections
placeholder.
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1821032
data_reviews:
- https://github.com/mozilla-mobile/firefox-android/pull/1167
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
expires: 122
metadata:
tags:
- Collections

search_widget:
new_tab_button:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,7 @@ class DefaultSessionControlController(

override fun handleRemoveCollectionsPlaceholder() {
settings.showCollectionsPlaceholderOnHome = false
Collections.placeholderCancel.record()
appStore.dispatch(AppAction.RemoveCollectionsPlaceholder)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1050,6 +1050,9 @@ class DefaultSessionControlControllerTest {
fun handleRemoveCollectionsPlaceholder() {
createController().handleRemoveCollectionsPlaceholder()

val recordedEvents = Collections.placeholderCancel.testGetValue()!!
assertEquals(1, recordedEvents.size)
assertEquals(null, recordedEvents.single().extra)
verify {
settings.showCollectionsPlaceholderOnHome = false
appStore.dispatch(AppAction.RemoveCollectionsPlaceholder)
Expand Down

0 comments on commit 2bd4ff2

Please sign in to comment.