Skip to content

Commit

Permalink
Merge pull request #1 from mozilla-mobile/master
Browse files Browse the repository at this point in the history
Merging changes from Master to My Fenix branch 4/19/21
  • Loading branch information
chrishernan authored Apr 20, 2021
2 parents c31d507 + 48460ce commit e0cc404
Show file tree
Hide file tree
Showing 296 changed files with 12,917 additions and 1,684 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/sync-strings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/

name: "Sync Strings"

on:
schedule:
- cron: '0 */4 * * *'

jobs:
main:
name: "Sync Strings"
runs-on: ubuntu-20.04
steps:
- name: "Discover Fenix Beta Version"
id: fenix-beta-version
uses: mozilla-mobile/fenix-beta-version@1.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "Checkout Master Branch"
uses: actions/checkout@v2
with:
path: main
ref: master
- name: "Checkout Beta Branch"
uses: actions/checkout@v2
with:
path: beta
ref: "releases_v${{ steps.fenix-beta-version.outputs.fenix-beta-version }}.0.0"
- name: "Sync Strings"
uses: mozilla-mobile/sync-strings-action@1.0.1
with:
src: main
dst: beta
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
path: beta
branch: automation/sync-strings-${{ steps.fenix-beta-version.outputs.major-beta-version }}
title: "Sync Strings from master to releases_${{steps.fenix-beta-version.outputs.fenix-beta-version}}.0"
body: "This (automated) PR syncs strings from `master` to `releases_${{steps.fenix-beta-version.outputs.fenix-beta-version}}.0.0`"
250 changes: 233 additions & 17 deletions app/metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,32 @@ events:
notification_emails:
- fenix-core@mozilla.com
expires: "2021-07-01"
default_browser_changed:
type: event
description: |
Indicates the default browser was changed
bugs:
- https://github.com/mozilla-mobile/fenix/issues/18857
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/18895
data_sensitivity:
- interaction
notification_emails:
- fenix-core@mozilla.com
expires: "2021-10-01"
toolbar_menu_visible:
type: event
description: |
The browser menu was displayed from toolbar menu
bugs:
- https://github.com/mozilla-mobile/fenix/issues/18855
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/18895
data_sensitivity:
- interaction
notification_emails:
- fenix-core@mozilla.com
expires: "2021-10-01"
total_uri_count:
type: counter
description: |
Expand Down Expand Up @@ -561,6 +587,20 @@ search_shortcuts:
- fenix-core@mozilla.com
expires: "2021-08-01"

experiments_default_browser:
toolbar_menu_clicked:
type: event
description: |
Set default browser was clicked from toolbar menu
bugs:
- https://github.com/mozilla-mobile/fenix/issues/18851
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/18895
data_sensitivity:
- interaction
notification_emails:
- fenix-core@mozilla.com
expires: "2021-10-01"
toolbar_settings:
changed_position:
type: event
Expand Down Expand Up @@ -1227,23 +1267,6 @@ metrics:
- perf-android-fe@mozilla.com
- mcomella@mozilla.com
expires: "2021-08-11"
activity_state_provider_error:
type: boolean
description: |
The `StartupActivityStateProvider...onActivityStarted` was unexpectedly
called twice. We can use this metric to validate our assumptions about
how these APIs are called. This probe can be removed once we validate
these assumptions.
bugs:
- https://github.com/mozilla-mobile/fenix/issues/18426
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/18632#issue-600193452
data_sensitivity:
- technical
notification_emails:
- perf-android-fe@mozilla.com
- mcomella@mozilla.com
expires: "2021-08-11"

preferences:
show_search_suggestions:
Expand Down Expand Up @@ -2490,6 +2513,19 @@ tabs_tray:
notification_emails:
- fenix-core@mozilla.com
expires: "2021-08-01"
synced_mode_tapped:
type: event
description: |
A user switched to synced mode
bugs:
- https://github.com/mozilla-mobile/fenix/issues/18948
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/19004
data_sensitivity:
- interaction
notification_emails:
- fenix-core@mozilla.com
expires: "2022-08-01"
new_tab_tapped:
type: event
description: |
Expand Down Expand Up @@ -4224,6 +4260,9 @@ perf.startup:
The hope is that these cases will not have a significant impact on the end
results but, if they appear to, we can replace it with a more complex
implementation.
<br><br>
Around April 8, 2021 the implementation was refactored. Functionally, it
should be the same but it's noted just in case there are bugs.
bugs:
- https://github.com/mozilla-mobile/fenix/issues/18426
data_reviews:
Expand All @@ -4248,6 +4287,9 @@ perf.startup:
<br><br>
See the `cold_main_app_to_first_frame` probe docs for other possible
known issues and more details.
<br><br>
Around April 8, 2021 the implementation was refactored. Functionally, it
should be the same but it's noted just in case there are bugs.
bugs:
- https://github.com/mozilla-mobile/fenix/issues/18426
data_reviews:
Expand All @@ -4270,6 +4312,9 @@ perf.startup:
<br><br>
See the `cold_main_app_to_first_frame` probe docs for known issues and
more details.
<br><br>
Around April 8, 2021 the implementation was refactored. Functionally, it
should be the same but it's noted just in case there are bugs.
bugs:
- https://github.com/mozilla-mobile/fenix/issues/18426
data_reviews:
Expand Down Expand Up @@ -4447,6 +4492,81 @@ perf.startup:
- perf-android-fe@mozilla.com
- mcomella@mozilla.com
expires: "2021-08-11"
startup_type:
type: labeled_counter
description: |
Indicates how the browser was started. The label is divided into two
variables. `state` is how cached the browser is when started. `path` is
what code path we are expected to take. Together, they create a combined
label: `state_path`. For brevity, the specific states are documented in
the [Fenix perf
glossary](https://wiki.mozilla.org/index.php?title=Performance/Fenix/Glossary).
<br><br>
This implementation is intended to be simple, not comprehensive. We list
the implications below.
<br><br>
These ways of opening the app undesirably adds events to our primary
buckets (non-`unknown` cases):
<br>- App switcher cold/warm: `cold/warm_` + duplicates path from
previous launch
<br>- Home screen shortcuts: `*_view`
<br>- An Intent is sent internally that's uses `ACTION_MAIN` or
`ACTION_VIEW` could be: `*_main/view` (unknown if this ever happens)
<br>- A command-line launch uses `ACTION_MAIN` or `ACTION_VIEW` could be:
`*_main/view`
<br><br>
These ways of opening the app undesirably do not add their events to our
primary buckets:
<br>- Close and reopen the app very quickly: no event is recorded.
<br><br>
These ways of opening the app don't affect our primary buckets:
<br>- App switcher hot: `hot_unknown`
<br>- PWA (all states): `unknown_unknown`
<br>- Custom tab: `unknown_view`
<br>- Cold start where a service or other non-activity starts the process
(not manually tested) - this seems to happen if you have the homescreen
widget: `unknown_*`
<br>- Another activity is drawn before HomeActivity (e.g. widget voice
search): `unknown_*`
<br>- Widget text search: `*_unknown`
<br><br>
In addition to the events above, the `unknown` state may be chosen when we
were unable to determine a cause due to implementation details or the API
was used incorrectly. We may be able to record the events listed above
into different buckets but we kept the implementation simple for now.
<br><br>
N.B.: for implementation simplicity, we duplicate the logic in app that
determines `path` so it's not perfectly accurate. In one way, we record we
is intended to happen rather than what actually happened (e.g. the user
may click a link so we record VIEW but the app does a MAIN by going to the
homescreen because the link was invalid).
labels:
- cold_main
- cold_view
- cold_unknown
- warm_main
- warm_view
- warm_unknown
- hot_main
- hot_view
- hot_unknown
- unknown_main
- unknown_view
- unknown_unknown
bugs:
- https://github.com/mozilla-mobile/fenix/issues/18836
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/19028
data_sensitivity:
- interaction
notification_emails:
- perf-android-fe@mozilla.com
- mcomella@mozilla.com
expires: "2021-10-09"

perf.awesomebar:
history_suggestions:
Expand Down Expand Up @@ -4965,6 +5085,46 @@ engine_tab:
- fenix-core@mozilla.com
- skaspari@mozilla.com
expires: "2021-12-31"
foreground_metrics:
type: event
description: |
Event collecting data about the state of tabs when the app comes back to
the foreground.
bugs:
- https://github.com/mozilla-mobile/android-components/issues/9997
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/18747#issuecomment-815731764
data_sensitivity:
- technical
notification_emails:
- fenix-core@mozilla.com
- skaspari@mozilla.com
expires: "2021-12-31"
extra_keys:
background_active_tabs:
description: |
Number of active tabs (with an engine session assigned) when the app
went to the background.
background_crashed_tabs:
description: |
Number of tabs marked as crashed when the app went to the background.
background_total_tabs:
description: |
Number of total tabs when the app went to the background.
foreground_active_tabs:
description: |
Number of active tabs (with an engine session assigned) when the
app came back to the foreground.
foreground_crashed_tabs:
description: |
Number of tabs marked as crashed when the app came back to the
foreground.
foreground_total_tabs:
description: |
Number of total tabs when the app came back to the foreground.
time_in_background:
description: |
Time (in milliseconds) the app was in the background.
synced_tabs:
synced_tabs_suggestion_clicked:
Expand Down Expand Up @@ -5061,6 +5221,34 @@ awesomebar:
- fenix-core@mozilla.com
expires: "2021-08-01"

home_menu:
settings_item_clicked:
type: event
description: The user clicked the settings option in home menu.
bugs:
- https://github.com/mozilla-mobile/fenix/issues/18856
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/18987
data_sensitivity:
- interaction
notification_emails:
- fenix-core@mozilla.com
expires: "2021-10-01"

home_screen:
home_screen_displayed:
type: event
description: The user clicked the settings option in home menu.
bugs:
- https://github.com/mozilla-mobile/fenix/issues/18856
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/19025
data_sensitivity:
- interaction
notification_emails:
- fenix-core@mozilla.com
expires: "2021-10-01"

android_keystore_experiment:
experiment_failure:
type: event
Expand Down Expand Up @@ -5161,3 +5349,31 @@ android_keystore_experiment:
notification_emails:
- fenix-core@mozilla.com
expires: "2021-09-01"

set_default_newtab_experiment:
set_default_browser_clicked:
type: event
description: |
Set default browser was clicked from new tab screen.
bugs:
- https://github.com/mozilla-mobile/fenix/issues/18853
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/18895
data_sensitivity:
- interaction
notification_emails:
- fenix-core@mozilla.com
expires: "2021-10-01"
close_experiment_card_clicked:
type: event
description: |
Close experiment card was clicked from new tab screen.
bugs:
- https://github.com/mozilla-mobile/fenix/issues/18853
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/18895
data_sensitivity:
- interaction
notification_emails:
- fenix-core@mozilla.com
expires: "2021-10-01"
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import org.mozilla.fenix.helpers.HomeActivityTestRule

// BEFORE INCREASING THESE VALUES, PLEASE CONSULT WITH THE PERF TEAM.
private const val EXPECTED_SUPPRESSION_COUNT = 11
private const val EXPECTED_RUNBLOCKING_COUNT = 2
private const val EXPECTED_RUNBLOCKING_COUNT = 3
private const val EXPECTED_COMPONENT_INIT_COUNT = 42
private const val EXPECTED_VIEW_HIERARCHY_DEPTH = 12
private const val EXPECTED_RECYCLER_VIEW_CONSTRAINT_LAYOUT_CHILDREN = 4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ class DefaultHomeScreenTest : ScreenshotTest() {
@Test
fun showDefaultHomeScreen() {
homeScreen {
verifyAccountsSignInButton()
swipeToBottom()
verifyAccountsSignInButton()
Screengrab.screenshot("HomeScreenRobot_home-screen-scroll")
TestAssetHelper.waitingTime
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ class MenuScreenShotTest : ScreenshotTest() {
editBookmarkFolder()
Screengrab.screenshot("ThreeDotMenuBookmarksRobot_edit-bookmark-folder-menu")
// It may be needed to wait here to have the screenshot
mDevice.pressBack()
bookmarksMenu {
navigateUp()
}.openThreeDotMenu("test") {
deleteBookmarkFolder()
Screengrab.screenshot("ThreeDotMenuBookmarksRobot_delete-bookmark-folder-menu")
Expand Down
Loading

0 comments on commit e0cc404

Please sign in to comment.