Skip to content
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

VPN-5092: Help sheet telemetry #9023

Merged
merged 8 commits into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 18 additions & 5 deletions nebula/ui/components/MZBottomSheet.qml
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,21 @@ Loader {
readonly property int maxSheetHeight: (Qt.platform.os === "ios" ? window.safeContentHeight : window.height) - MZTheme.theme.sheetTopMargin
required default property var contentItem
property bool sizeToContent: false
property bool opened: active ? item.opened : null
property bool isOpen: active ? item.opened : null

signal close
signal opened
signal closed

active: false
function open() {
active = true
item.open()
}

onClose: item.close()
function close() {
item.close()
}

active: false

sourceComponent: Drawer {
implicitWidth: window.width
Expand All @@ -50,7 +58,12 @@ Loader {
edge: Qt.BottomEdge
contentItem: root.contentItem

onClosed: root.active = false
onOpened: root.opened()

onClosed: {
root.closed()
root.active = false
}

background: Rectangle {

Expand Down
3 changes: 2 additions & 1 deletion nebula/ui/components/MZHelpSheet.qml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import Mozilla.Shared 1.0
//"type": MZHelpSheet.BlockType (eg MZHelpSheet.BlockType.PrimaryButton)
//"text": label or button text (eg "Hello world")
//"margin": top margin above the component (eg 16)
//"objectName": objectName for the component (used for functional tests)
//"action": action performed on button click - only applicable when type is MZHelpSheet.BlockType.PrimaryButton or MZHelpSheet.BlockType.LinkButton
//(eg () => { MZUrlOpener.openUrl("https://mozilla.org") })
/*
Expand All @@ -30,7 +31,7 @@ import Mozilla.Shared 1.0
{type: MZHelpSheet.BlockType.Text, margin: 16, text: "text"},
{type: MZHelpSheet.BlockType.Text, margin: 16, text: "text"},
{type: MZHelpSheet.BlockType.PrimaryButton, text: "Primary", margin: 16, action: () => { sheet.close(); MZNavigator.requestScreen(VPN.ScreenGetHelp) } },
{type: MZHelpSheet.BlockType.LinkButton, text: "Link", margin: 8, action: () => { MZUrlOpener.openUrl("https://mozilla.org") } }
{type: MZHelpSheet.BlockType.LinkButton, text: "Link", margin: 8, objectName: "learnMoreLink", action: () => { MZUrlOpener.openUrl("https://mozilla.org") }}
]
}
*/
Expand Down
164 changes: 163 additions & 1 deletion src/telemetry/impression_metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -529,4 +529,166 @@ impression:
- [email protected]
- [email protected]
expires: never
extra_keys: *impression_extra_keys
extra_keys: *impression_extra_keys
app_exclusions_info_screen:
type: event
lifetime: ping
send_in_pings:
- main
description: |
The user has opened the app exclusions help sheet
bugs:
- https://mozilla-hub.atlassian.net/browse/VPN-5092
data_reviews:
- TODO
data_sensitivity:
- interaction
notification_emails:
- [email protected]
- [email protected]
expires: never
extra_keys: *impression_extra_keys
dns_settings_info_screen:
type: event
lifetime: ping
send_in_pings:
- main
description: |
The user has opened the dns settings help sheet
bugs:
- https://mozilla-hub.atlassian.net/browse/VPN-5092
data_reviews:
- TODO
data_sensitivity:
- interaction
notification_emails:
- [email protected]
- [email protected]
expires: never
extra_keys: *impression_extra_keys
my_devices_screen:
type: event
lifetime: ping
send_in_pings:
- main
description: |
The user has opened the devices settings
bugs:
- https://mozilla-hub.atlassian.net/browse/VPN-5092
data_reviews:
- TODO
data_sensitivity:
- interaction
notification_emails:
- [email protected]
- [email protected]
expires: never
extra_keys: *impression_extra_keys
my_devices_info_screen:
type: event
lifetime: ping
send_in_pings:
- main
description: |
The user has opened the devices help sheet
bugs:
- https://mozilla-hub.atlassian.net/browse/VPN-5092
data_reviews:
- TODO
data_sensitivity:
- interaction
notification_emails:
- [email protected]
- [email protected]
expires: never
extra_keys: *impression_extra_keys
privacy_features_screen:
type: event
lifetime: ping
send_in_pings:
- main
description: |
The user has opened the privacy features settings
bugs:
- https://mozilla-hub.atlassian.net/browse/VPN-5092
data_reviews:
- TODO
data_sensitivity:
- interaction
notification_emails:
- [email protected]
- [email protected]
expires: never
extra_keys: *impression_extra_keys
privacy_features_info_screen:
type: event
lifetime: ping
send_in_pings:
- main
description: |
The user has opened the privacy features help sheet
bugs:
- https://mozilla-hub.atlassian.net/browse/VPN-5092
data_reviews:
- TODO
data_sensitivity:
- interaction
notification_emails:
- [email protected]
- [email protected]
expires: never
extra_keys: *impression_extra_keys
location_singlehop_screen:
type: event
lifetime: ping
send_in_pings:
- main
description: |
The user has opened to the singlehop screen
bugs:
- https://mozilla-hub.atlassian.net/browse/VPN-5092
data_reviews:
- TODO
data_sensitivity:
- interaction
notification_emails:
- [email protected]
- [email protected]
expires: never
extra_keys: *impression_extra_keys
location_multihop_screen:
type: event
lifetime: ping
send_in_pings:
- main
description: |
The user has opened to the multihop screen
bugs:
- https://mozilla-hub.atlassian.net/browse/VPN-5092
data_reviews:
- TODO
data_sensitivity:
- interaction
notification_emails:
- [email protected]
- [email protected]
expires: never
extra_keys: *impression_extra_keys
location_info_screen:
type: event
lifetime: ping
send_in_pings:
- main
description: |
The user has opened the select location help sheet
bugs:
- https://mozilla-hub.atlassian.net/browse/VPN-5092
data_reviews:
- TODO
data_sensitivity:
- interaction
notification_emails:
- [email protected]
- [email protected]
expires: never
extra_keys: *impression_extra_keys
36 changes: 36 additions & 0 deletions src/telemetry/interaction_metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1140,4 +1140,40 @@ interaction:
- [email protected]
- [email protected]
expires: never
extra_keys: *interaction_extra_keys
help_tooltip_selected:
type: event
lifetime: ping
send_in_pings:
- main
description: |
The user has clicked a help tooltip button
bugs:
- https://mozilla-hub.atlassian.net/browse/VPN-5092
data_reviews:
- TODO
data_sensitivity:
- interaction
notification_emails:
- [email protected]
- [email protected]
expires: never
extra_keys: *interaction_extra_keys
learn_more_selected:
type: event
lifetime: ping
send_in_pings:
- main
description: |
The user has clicked a learn more link
bugs:
- https://mozilla-hub.atlassian.net/browse/VPN-5092
data_reviews:
- TODO
data_sensitivity:
- interaction
notification_emails:
- [email protected]
- [email protected]
expires: never
extra_keys: *interaction_extra_keys
29 changes: 25 additions & 4 deletions src/ui/screens/devices/ViewDevices.qml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ MZViewBase {
id: vpnFlickable
objectName: "devicesSettingsView"

readonly property string telemetryScreenId : "my_devices"
property var isModalDialogOpened: removePopup.visible
property var wasmView
property string deviceCountLabelText: ""
Expand Down Expand Up @@ -64,7 +65,13 @@ MZViewBase {
sourceComponent: MZIconButton {
objectName: "devicesHelpButton"

onClicked: helpSheet.active = true
onClicked: {
helpSheet.open()

Glean.interaction.helpTooltipSelected.record({
screen: vpnFlickable.telemetryScreenId,
});
}

accessibleName: MZI18n.GetHelpLinkTitle

Expand Down Expand Up @@ -107,19 +114,29 @@ MZViewBase {
id: helpSheet
objectName: "devicesHelpSheet"

property string telemetryScreenId: "my_devices_info"

title: MZI18n.HelpSheetsDevicesTitle

model: [
{type: MZHelpSheet.BlockType.Title, text: MZI18n.HelpSheetsDevicesHeader},
{type: MZHelpSheet.BlockType.Text, text: MZI18n.HelpSheetsDevicesBody1, margin: MZTheme.theme.helpSheetTitleBodySpacing},
{type: MZHelpSheet.BlockType.Text, text: MZI18n.HelpSheetsDevicesBody2, margin: MZTheme.theme.helpSheetBodySpacing},
{type: MZHelpSheet.BlockType.LinkButton, text: MZI18n.GlobalLearnMore, margin: MZTheme.theme.helpSheetBodyButtonSpacing, action: () => { MZUrlOpener.openUrlLabel("sumoDevices") }, objectName: "learnMoreLink"},
{type: MZHelpSheet.BlockType.LinkButton, text: MZI18n.GlobalLearnMore, margin: MZTheme.theme.helpSheetBodyButtonSpacing, objectName: "learnMoreLink", action: () => {
MZUrlOpener.openUrlLabel("sumoDevices")
Glean.interaction.learnMoreSelected.record({
screen: telemetryScreenId
});
}}
]

onActiveChanged: if (active) item.open()
onOpened: {
Glean.impression.myDevicesInfoScreen.record({
screen: telemetryScreenId,
});
}
}


Connections {
target: deviceList
function onIsEditing(isEditing) {
Expand All @@ -129,5 +146,9 @@ MZViewBase {

Component.onCompleted: {
VPN.refreshDevices()

Glean.impression.myDevicesScreen.record({
screen: telemetryScreenId,
});
}
}
Loading
Loading