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

Add vertical tabs P3A metrics #18834

Merged
merged 4 commits into from
Jun 27, 2023
Merged

Add vertical tabs P3A metrics #18834

merged 4 commits into from
Jun 27, 2023

Conversation

DJAndries
Copy link
Collaborator

@DJAndries DJAndries commented Jun 9, 2023

Resolves brave/brave-browser#30928

Submitter Checklist:

  • I confirm that no security/privacy review is needed, or that I have requested one
  • There is a ticket for my issue
  • Used Github auto-closing keywords in the PR description above
  • Wrote a good PR/commit description
  • Squashed any review feedback or "fixup" commits before merge, so that history is a record of what happened in the repo, not your PR
  • Added appropriate labels (QA/Yes or QA/No; release-notes/include or release-notes/exclude; OS/...) to the associated issue
  • Checked the PR locally:
    • npm run test -- brave_browser_tests, npm run test -- brave_unit_tests wiki
    • npm run lint, npm run presubmit wiki, npm run gn_check, npm run tslint
  • Ran git rebase master (if needed)

Reviewer Checklist:

  • A security review is not needed, or a link to one is included in the PR description
  • New files have MPL-2.0 license header
  • Adequate test coverage exists to prevent regressions
  • Major classes, functions and non-trivial code blocks are well-commented
  • Changes in component dependencies are properly reflected in gn
  • Code follows the style guide
  • Test plan is specified in PR before merging

After-merge Checklist:

Test Plan:

For open tabs metric:

  1. Start with fresh profile. Ensure metric does not exist in local state.
  2. Enable vertical tabs, reload local state, ensure metric has value of 0.
  3. Open multiple tabs, ensure metric value changes as expected.
  4. Open multiple tabs in another window, ensure metric value changes as expected.
  5. Close most of the tabs in both windows, ensure metric value is the same.
  6. Close browser, advance system time by seven days, ensure metric has value of 0.

For group tabs metric:

  1. Start with fresh profile. Ensure metric does not exist in local state.
  2. Enable vertical tabs, reload local state, ensure metric does not exist.
  3. Create a group, quickly switch between tabs (to trigger the underlying tab model callback), ensure metric has value of 0.
  4. Create multiple groups, quickly switch between tabs, ensure metric value changes as expected.
  5. Create multiple groups in another window, quickly switch between tabs, ensure metric value changes as expected.
  6. Close most of the groups in both windows,quickly switch between tabs, ensure metric value is the same.
  7. Close all groups, ensure metric is sent, close browser, advance system time by seven days, ensure metric does not exist.

For pinned tabs metric:

  1. Start with fresh profile. Ensure metric does not exist in local state.
  2. Enable vertical tabs, reload local state, ensure metric does not exist.
  3. Create and pin a tab, quickly switch between tabs (to trigger the underlying tab model callback), ensure metric has value of 0.
  4. Pin multiple tabs, quickly switch between tabs, ensure metric value changes as expected.
  5. Pin multiple tabs in another window, quickly switch between tabs, ensure metric value changes as expected.
  6. Unpin most tabs in both windows, quickly switch between tabs, ensure metric value is the same.
  7. Unpin all tabs, ensure metric is sent, close browser, advance system time by seven days, ensure metric does not exist.

@DJAndries DJAndries requested a review from a team as a code owner June 9, 2023 00:08
@DJAndries DJAndries force-pushed the vertical-tab-p3a branch 5 times, most recently from 297e596 to 84e9f64 Compare June 10, 2023 01:22
@iefremov
Copy link
Contributor

i think we need an author(s) of the vertical tabs feature to review, maybe @sangwoo108 is a proper person?

@DJAndries DJAndries requested a review from sangwoo108 June 17, 2023 04:18
@DJAndries DJAndries requested a review from sangwoo108 June 19, 2023 23:45
@DJAndries DJAndries force-pushed the vertical-tab-p3a branch 2 times, most recently from 998110d to ecccb63 Compare June 21, 2023 05:11
Copy link
Contributor

@sangwoo108 sangwoo108 left a comment

Choose a reason for hiding this comment

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

LGTM with a last question 👍

@DJAndries DJAndries merged commit 97f6043 into master Jun 27, 2023
@DJAndries DJAndries deleted the vertical-tab-p3a branch June 27, 2023 01:45
@github-actions github-actions bot added this to the 1.55.x - Nightly milestone Jun 27, 2023
@GeetaSarvadnya
Copy link

GeetaSarvadnya commented Jun 27, 2023

Verification PASSED on

Brave | 1.55.17 Chromium: 115.0.5790.40 (Official Build) nightly (64-bit)
-- | --
Revision | 071c9ddea889c3c7887daf4eac13fed72d4fff62-refs/branch-heads/5790@{#979}
OS | Windows 10 Version 22H2 (Build 19045.3086)

Brave.VerticalTabs.OpenTabs

Case 0: Brave.VerticalTabs.OpenTabs = 0_PASSED
  1. Clean profile 1.55.17
  2. Enable vertical tabs via brave://settings/appearance
  3. Open brave://local-state
  4. Make sure that there is only 1 tab is opened
  5. Look for the metrics Brave.VerticalTabs.OpenTabs
  6. Confirmed that the metrics Brave.VerticalTabs.OpenTabs response value is 0

image

Case 1: Brave.VerticalTabs.OpenTabs = 1_PASSED
Case 1.1: no of tabs opened = 2_PASSED
  1. Clean profile 1.55.17
  2. Enable vertical tabs via brave://settings/appearance
  3. Open brave://local-state
  4. Make sure that 2 tabs are opened
  5. Look for the metrics Brave.VerticalTabs.OpenTabs
  6. Confirmed that the metrics Brave.VerticalTabs.OpenTabs response value is 1
    image
Case 1.2: no of tabs opened = 5_PASSED
  1. Clean profile 1.55.17
  2. Enable vertical tabs via brave://settings/appearance
  3. Open brave://local-state
  4. Make sure that 5 tabs are opened
  5. Look for the metrics Brave.VerticalTabs.OpenTabs
  6. Confirmed that the metrics Brave.VerticalTabs.OpenTabs response value is 1

image

Case 1.3: no of tabs opened < 5_PASSED
  1. Clean profile 1.55.17
  2. Enable vertical tabs via brave://settings/appearance
  3. Open brave://local-state
  4. Make sure that 3 tabs are opened
  5. Look for the metrics Brave.VerticalTabs.OpenTabs
  6. Confirmed that the metrics Brave.VerticalTabs.OpenTabs response value is 1

image

Case 2: Brave.VerticalTabs.OpenTabs = 2_PASSED
Case 2.1: no of tabs opened = 6_PASSED
  1. Clean profile 1.55.17
  2. Enable vertical tabs via brave://settings/appearance
  3. Open brave://local-state
  4. Make sure that 6 tabs are opened
  5. Look for the metrics Brave.VerticalTabs.OpenTabs
  6. Confirmed that the metrics Brave.VerticalTabs.OpenTabs response value is 2 as expected

image

Case 2.2: no of tabs opened = 10_PASSED
  1. Clean profile 1.55.17
  2. Enable vertical tabs via brave://settings/appearance
  3. Open brave://local-state
  4. Make sure that 10 tabs are opened
  5. Look for the metrics Brave.VerticalTabs.OpenTabs
  6. Confirmed that the metrics Brave.VerticalTabs.OpenTabs response value is 2 as expected

image

Case 2.3: no of tabs opened < 10_PASSED
  1. Clean profile 1.55.17
  2. Enable vertical tabs via brave://settings/appearance
  3. Open brave://local-state
  4. Make sure that 9 tabs are opened
  5. Look for the metrics Brave.VerticalTabs.OpenTabs
  6. Confirmed that the metrics Brave.VerticalTabs.OpenTabs response value is 2 as expected

image

Case 3: Brave.VerticalTabs.OpenTabs = 3_PASSED
Case 3.1: no of tabs opened = 11_PASSED
  1. Clean profile 1.55.17
  2. Enable vertical tabs via brave://settings/appearance
  3. Open brave://local-state
  4. Make sure that 11 tabs are opened
  5. Look for the metrics Brave.VerticalTabs.OpenTabs
  6. Confirmed that the metrics Brave.VerticalTabs.OpenTabs response value is 3 as expected

image

Case 3.2: no of tabs opened = 50_PASSED
  1. Clean profile 1.55.17
  2. Enable vertical tabs via brave://settings/appearance
  3. Open brave://local-state
  4. Make sure that 50 tabs are opened
  5. Look for the metrics Brave.VerticalTabs.OpenTabs
  6. Confirmed that the metrics Brave.VerticalTabs.OpenTabs response value is 3 as expected

image

Case 4: Brave.VerticalTabs.OpenTabs = 4_PASSED
Case 4.1: no of tabs opened = 11_PASSED
  1. Clean profile 1.55.17
  2. Enable vertical tabs via brave://settings/appearance
  3. Open brave://local-state
  4. Make sure that 51+ tabs are opened
  5. Look for the metrics Brave.VerticalTabs.OpenTabs
  6. Confirmed that the metrics Brave.VerticalTabs.OpenTabs response value is 4 as expected

image

Brave.VerticalTabs.PinnedTabs

Case 1: Brave.VerticalTabs.PinnedTabs = 0_PASSED
Case 1.1: Brave.VerticalTabs.PinnedTabs = 0_PASSED
  1. Clean profile 1.55.17
  2. Open brave://local-state
  3. Right click on the brave://local-state tab, select Use vertical tabs context menu option
  4. Make sure these is only one tab in the vertical tab view
  5. Pin the tab on the vertical tab view
  6. Reload brave://local-state file
  7. Restart the browser
  8. Look for the metrics Brave.VerticalTabs.PinnedTabs
  9. Confirmed that the metrics Brave.VerticalTabs.PinnedTabs response value is 0 as expected

image

Case 1.1: Brave.VerticalTabs.PinnedTabs = 0_PASSED
  1. Clean profile 1.55.17
  2. Open brave://local-state
  3. Right click on the brave://local-state tab, select Use vertical tabs context menu option
  4. Pin the tab on the vertical tab view
  5. Open another tab and Pin the tab and make sure there are 2 tabs pinned
  6. Reload brave://local-state file
  7. Restart the browser
  8. Look for the metrics Brave.VerticalTabs.PinnedTabs
  9. Confirmed that the metrics Brave.VerticalTabs.PinnedTabs response value is 0 as expected

image

Case 2: Brave.VerticalTabs.PinnedTabs = 1_PASSED
Case 2.1: Brave.VerticalTabs.PinnedTabs = 1_PASSED
  1. Clean profile 1.55.17
  2. Open brave://local-state
  3. Right click on the brave://local-state tab, select Use vertical tabs context menu option
  4. Pin the tab on the vertical tab view
  5. Open another 2 tabs and Pin the tabs and make sure there are 3 tabs pinned
  6. Reload brave://local-state file
  7. Restart the browser
  8. Look for the metrics Brave.VerticalTabs.PinnedTabs
  9. Confirmed that the metrics Brave.VerticalTabs.PinnedTabs response value is 1 as expected

image

Case 2.2: Brave.VerticalTabs.PinnedTabs = 1_PASSED
  1. Clean profile 1.55.17
  2. Open brave://local-state
  3. Right click on the brave://local-state tab, select Use vertical tabs context menu option
  4. Pin the tab on the vertical tab view
  5. Open another 3 tabs and Pin the tabs and make sure there are 4 tabs pinned
  6. Reload brave://local-state file
  7. Restart the browser
  8. Look for the metrics Brave.VerticalTabs.PinnedTabs
  9. Confirmed that the metrics Brave.VerticalTabs.PinnedTabs response value is 1 as expected

image

Case 2.3: Brave.VerticalTabs.PinnedTabs = 1_PASSED
  1. Clean profile 1.55.17
  2. Open brave://local-state
  3. Right click on the brave://local-state tab, select Use vertical tabs context menu option
  4. Pin the tab on the vertical tab view
  5. Open another 4 tabs and Pin the tabs and make sure there are 5 tabs pinned
  6. Reload brave://local-state file
  7. Restart the browser
  8. Look for the metrics Brave.VerticalTabs.PinnedTabs
  9. Confirmed that the metrics Brave.VerticalTabs.PinnedTabs response value is 1 as expected

image

Case 3: Brave.VerticalTabs.PinnedTabs = 2_PASSED
  1. Clean profile 1.55.17
  2. Open brave://local-state
  3. Right click on the brave://local-state tab, select Use vertical tabs context menu option
  4. Pin the tab on the vertical tab view
  5. Open another 5 tabs and Pin the tabs and make sure there are 6 tabs pinned
  6. Reload brave://local-state file
  7. Restart the browser
  8. Look for the metrics Brave.VerticalTabs.PinnedTabs
  9. Confirmed that the metrics Brave.VerticalTabs.PinnedTabs response value is 2 as expected

image

Brave.VerticalTabs.GroupTabs

Case 1: Brave.VerticalTabs.GroupTabs = 0_PASSED
Case 1.1: Brave.VerticalTabs.GroupTabs = 0_PASSED
  1. Clean profile 1.55.17 and enable vertical tabs
  2. Open few tabs with sites opened in tabs
  3. Create a tab group 1
  4. Open brave://local-state file
  5. Look for the metrics Brave.VerticalTabs.GroupTabs
  6. Confirm that the metrics Brave.VerticalTabs.GroupTabs response value is 0 as expected

image

Case 1.2: Brave.VerticalTabs.GroupTabs = 0_PASSED
  1. Clean profile 1.55.17 and enable vertical tabs
  2. Open few tabs with sites opened in tabs
  3. Create two tab groups
  4. Open brave://local-state file
  5. Look for the metrics Brave.VerticalTabs.GroupTabs
  6. Confirm that the metrics Brave.VerticalTabs.GroupTabs response value is 0 as expected

image

Case 2: Brave.VerticalTabs.GroupTabs = 1_PASSED
Case 2.1: Brave.VerticalTabs.GroupTabs = 1_PASSED
  1. Clean profile 1.55.17 and enable vertical tabs
  2. Open few tabs with sites opened in tabs
  3. Create 3 tab groups
  4. Open brave://local-state file
  5. Look for the metrics Brave.VerticalTabs.GroupTabs
  6. Confirm that the metrics Brave.VerticalTabs.GroupTabs response value is 1 as expected

image

Case 2.2: Brave.VerticalTabs.GroupTabs = 1_PASSED
  1. Clean profile 1.55.17 and enable vertical tabs
  2. Open few tabs with sites opened in tabs
  3. Create 4 tab groups
  4. Open brave://local-state file
  5. Look for the metrics Brave.VerticalTabs.GroupTabs
  6. Confirm that the metrics Brave.VerticalTabs.GroupTabs response value is 1 as expected

image

Case 2.3: Brave.VerticalTabs.GroupTabs = 1_PASSED
  1. Clean profile 1.55.17 and enable vertical tabs
  2. Open few tabs with sites opened in tabs
  3. Create 5 tab groups
  4. Open brave://local-state file
  5. Look for the metrics Brave.VerticalTabs.GroupTabs
  6. Confirm that the metrics Brave.VerticalTabs.GroupTabs response value is 1 as expected

image

Brave.VerticalTabs.GroupTabs = 2_PASSED
  1. Clean profile 1.55.17
  2. Open few tabs with sites opened in tabs
  3. Create 6 tab groups
  4. Open brave://local-state file
  5. Look for the metrics Brave.VerticalTabs.GroupTabs
  6. Confirm that the metrics Brave.VerticalTabs.GroupTabs response value is 2 as expected

image


Additional scenarios

Case 1: Tabs added via PT/TOR/Guest_PASSED
  1. Clean profile 1.55.17
  2. Enable vertical tabs view
  3. Add 7 sites in 7 tabs
  4. Confirm that the metrics Brave.VerticalTabs.OpenTabs response value is 2 as expected
  5. Open a PT window and add two tabs with sites loaded
  6. Open a TOR window and add two tabs with sites loaded
  7. Number tabs in all the 3 window types (normal, PT and TOR window) is 11
  8. Reload brave://local-state file
  9. The metrics Brave.VerticalTabs.OpenTabs response value is 2 instead of 3
  10. If we look at the metrics Brave.Core.TabCount it gives the correct reponse when tab count is 7 and 11
Case 2: Move Tabs to new window_PASSED
Case 2.1: Move Tabs to new window_PASSED
  1. Clean profile 1.55.17
  2. Enable vertical tabs view
  3. Add 5 sites in 5 tabs
  4. Confirm that the metrics Brave.VerticalTabs.OpenTabs response value is 1 as expected
  5. Right click on any tab in vertical tav view and select the Move tab to another window context menu
  6. Confirm that the tab is moved to the new window
  7. Add second tab in new window (step 6 window)
  8. Confirm that the total tabs opened in the original window and new window is 6
  9. Reload brave://local-state file
  10. Confirm that the metrics Brave.VerticalTabs.OpenTabs response value is 2 as expected

image

Case 2.2: Move pinned Tabs to new window_PASSED
  1. Clean profile 1.55.17
  2. Enable vertical tabs view
  3. Add 2 sites in 2 tabs
  4. Pin both the tabs
  5. Confirm that the metrics Brave.VerticalTabs.PinnedTabs response value is 0 as expected
  6. Right click on any pinned tab in vertical tab view and select the Move tab to another window context menu
  7. Confirm that the pinned tab is moved to the new window
  8. Add second tab in new window and pin it (step 6 window)
  9. Confirm that the total tabs pinned in the original window and new window is 3
  10. Reload brave://local-state file
  11. the metrics Brave.VerticalTabs.PinnedTabs response value is 0 instead of 1
Case 2.3: Move Tab group to new window_PASSED
  1. Clean profile 1.55.17
  2. Enable vertical tabs view
  3. Add 2 sites in 2 tabs
  4. Create two tab groups (Group 1 and Group 2)
  5. Confirm that the metrics Brave.VerticalTabs.GroupTabs response value is 0 as expected
  6. Right click on any tabgroup in vertical tab view and select the Move tab to another window context menu
  7. Confirm that the tabgroup is moved to the new window
  8. Add second tab in new window and create a 3rd tab gropu (step 6 window)
  9. Confirm that the total tabgroups in the original window and new window is 3
  10. Reload brave://local-state file
  11. the metrics Brave.VerticalTabs.PinnedTabs response value is 0 instead of 1

image

Case 3: Brave.VerticalTabs.OpenTabs_PASSED
  1. Set sys date to 19th June, clean profile 1.55.17
  2. Open brave://local-state
  3. Enable vertical tabs via brave://settings/appearance
  4. Ensure that there are two tabs on the vertical tab view
  5. Look for the metrics Brave.VerticalTabs.OpenTabs
  6. Confirmed that the metrics Brave.VerticalTabs.OpenTabs response value is 1 as expected
  7. Close one tab and make sure there is only one tab on the vertical tab view
  8. Reload brave://local-state file
  9. Wait for 1 minute and restart the browser
  10. The metrics Brave.VerticalTabs.OpenTabs response value is 1 for the 1st week
  11. Fwd the sys clock ahead by 8 days (i.e 26th June in my case) [If I fwd the sys clock to 25th June the value 1 remains same]
  12. Reload brave://local-state file
  13. The metrics Brave.VerticalTabs.PinnedTabs response value is 0 as expected in the 2nd week
Case 4: Brave.VerticalTabs.PinnedTabs_PASSED
  1. Set sys date to 19th June
  2. Clean profile 1.55.17
  3. Open brave://local-state file, right click on the tab and select Use vertical tabs context menu
  4. Open 5 more tabs and pin all the tabs including brave://local-state file, total pinned tabs count is 6
  5. Reload brave://local-state file
  6. The metrics Brave.VerticalTabs.PinnedTabs response value is 2 as expected
  7. Unpin 3 tabs and reload brave://local-state file and enured metrics response value is still 2 for the 1st week
  8. Fwd the sys clock ahead by 8 days (i.e 26th June in my case) [If I fwd the sys clock to 25th June the value 2 remains same]
  9. Reload brave://local-state file
  10. The metrics Brave.VerticalTabs.PinnedTabs response value is 1 as expected in the 2nd week
Case 5: Brave.VerticalTabs.GroupTabs_PASSED
  1. Set sys date to 19th June
  2. Clean profile 1.55.17
  3. Open brave://local-state file, right click on the tab and select Use vertical tabs context menu
  4. Open a bunch of sites
  5. Create 6 tab groups
  6. Reload the bave://local-state file
  7. Look for the metrics Brave.VerticalTabs.GroupTabs
  8. Confirmed that the metrics Brave.VerticalTabs.GroupTabs response value is 2 as expected
  9. Remove 6th tab group
  10. Reload the bave://local-state file
  11. The metrics Brave.VerticalTabs.GroupTabs response value is 2 in the 1st week
  12. Close the browser
  13. Fwd the sys clock ahead by 8 days (i.e 26th June in my case) [If I fwd the sys clock to 25th June the value 2 remains same]
  14. Reload brave://local-state file
  15. Confirmed that the metrics Brave.VerticalTabs.GroupTabs response value is 1 as expected in the 2nd week

brave-builds added a commit that referenced this pull request Jul 6, 2023
kjozwiak pushed a commit that referenced this pull request Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add vertical tabs P3A metrics
4 participants