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

feat(onboarding): hook metrics to the new onboarding #17058

Merged
merged 3 commits into from
Jan 27, 2025

Conversation

jrainville
Copy link
Member

What does the PR do

Fixes #17047

Hooks the same old metrics we had previously to the new onboarding.

The only difference is we cannot easily track the flow during page navigation because the flow is often jsut sent at the end. Anyway, I think mobile also doesn't give it and it's easy to infer the flow from the page name.

I added a required property to the OnboardinPages so that we cna get the page name and send it. If it's not set on some page, we just don't send a metric.

Affected areas

Onboarding metrics

Architecture compliance

Impact on end user

None, it works as before

How to test

  • Either enable the metrics in the onbaording and then check the metrics on mixpanel or just check the logs. You'll see messageType=AsyncAddCentralizedMetricIfEnabledTaskArg.

Risk

Tick one:

  • Low risk: 2 devs MUST perform testing as specified above and attach their results as comments to this PR before merging.
  • High risk: QA team MUST perform additional testing in the specified affected areas before merging.

The only difference is the pages are not named the same as before, but that's expected since we changed the whole design.

@jrainville jrainville requested review from micieslak, caybro, alexjba and a team as code owners January 10, 2025 20:21
@jrainville jrainville requested a review from a team January 10, 2025 20:21
@status-im-auto
Copy link
Member

status-im-auto commented Jan 10, 2025

Jenkins Builds

Click to see older builds (62)
Commit #️⃣ Finished (UTC) Duration Platform Result
dbedf7a #1 2025-01-10 20:25:33 ~3 min macos/aarch64 📄log
✔️ dbedf7a #1 2025-01-10 20:31:17 ~9 min tests/nim 📄log
dbedf7a #1 2025-01-10 20:34:19 ~12 min tests/ui 📄log
✔️ dbedf7a #1 2025-01-10 20:41:39 ~19 min linux/x86_64 📦tgz
✔️ dbedf7a #1 2025-01-10 20:41:39 ~19 min macos/x86_64 🍎dmg
✔️ dbedf7a #1 2025-01-10 20:42:17 ~20 min linux-nix/x86_64 📦tgz
✔️ dbedf7a #1 2025-01-10 20:46:50 ~24 min windows/x86_64 💿exe
d2d7fe9 #2 2025-01-14 14:43:48 ~6 min macos/aarch64 📄log
✔️ d2d7fe9 #2 2025-01-14 14:50:47 ~13 min tests/nim 📄log
✔️ d2d7fe9 #2 2025-01-14 14:53:31 ~15 min tests/ui 📄log
✔️ d2d7fe9 #2 2025-01-14 14:53:39 ~15 min macos/x86_64 🍎dmg
✔️ d2d7fe9 #2 2025-01-14 15:00:29 ~22 min windows/x86_64 💿exe
✔️ d2d7fe9 #2 2025-01-14 15:02:35 ~24 min linux-nix/x86_64 📦tgz
✔️ d2d7fe9 #2 2025-01-14 15:03:53 ~26 min linux/x86_64 📦tgz
0e412d4 #3 2025-01-16 16:33:02 ~2 min macos/aarch64 📄log
✔️ 0e412d4 #3 2025-01-16 16:39:57 ~9 min tests/nim 📄log
0e412d4 #3 2025-01-16 16:42:46 ~12 min tests/ui 📄log
✔️ 0e412d4 #3 2025-01-16 16:45:20 ~15 min macos/x86_64 🍎dmg
✔️ 0e412d4 #3 2025-01-16 16:51:30 ~21 min linux/x86_64 📦tgz
✔️ 0e412d4 #3 2025-01-16 16:52:39 ~22 min linux-nix/x86_64 📦tgz
✔️ 0e412d4 #3 2025-01-16 16:56:51 ~26 min windows/x86_64 💿exe
aa5321c #4 2025-01-16 17:14:59 ~3 min macos/aarch64 📄log
✔️ aa5321c #4 2025-01-16 17:20:45 ~9 min tests/nim 📄log
✔️ aa5321c #4 2025-01-16 17:23:20 ~11 min tests/ui 📄log
✔️ aa5321c #4 2025-01-16 17:24:51 ~13 min macos/x86_64 🍎dmg
✔️ aa5321c #4 2025-01-16 17:30:51 ~19 min linux-nix/x86_64 📦tgz
✔️ aa5321c #4 2025-01-16 17:32:08 ~20 min linux/x86_64 📦tgz
✔️ aa5321c #4 2025-01-16 17:34:07 ~22 min windows/x86_64 💿exe
✔️ aa5321c #5 2025-01-21 20:35:48 ~6 min macos/aarch64 🍎dmg
✔️ aa5321c #5 2025-01-21 20:38:20 ~8 min tests/nim 📄log
✔️ aa5321c #5 2025-01-21 20:42:12 ~12 min tests/ui 📄log
✔️ aa5321c #5 2025-01-21 20:43:16 ~13 min macos/x86_64 🍎dmg
✔️ aa5321c #5 2025-01-21 20:47:22 ~18 min linux/x86_64 📦tgz
✔️ aa5321c #5 2025-01-21 20:54:09 ~24 min linux-nix/x86_64 📦tgz
✔️ aa5321c #5 2025-01-21 20:55:32 ~26 min windows/x86_64 💿exe
476e752 #7 2025-01-23 16:48:25 ~3 min macos/aarch64 📄log
476e752 #7 2025-01-23 16:52:46 ~7 min macos/x86_64 📄log
✔️ 476e752 #7 2025-01-23 16:53:41 ~8 min tests/nim 📄log
476e752 #7 2025-01-23 17:01:48 ~16 min tests/ui 📄log
✔️ 476e752 #7 2025-01-23 17:03:37 ~18 min linux-nix/x86_64 📦tgz
ea66246 #8 2025-01-23 17:05:56 ~1 min macos/aarch64 📄log
ea66246 #8 2025-01-23 17:08:56 ~4 min macos/x86_64 📄log
✔️ ea66246 #8 2025-01-23 17:13:03 ~9 min tests/nim 📄log
ea66246 #8 2025-01-23 17:15:25 ~11 min tests/ui 📄log
✔️ ea66246 #8 2025-01-23 17:21:35 ~17 min linux-nix/x86_64 📦tgz
✔️ ea66246 #8 2025-01-23 17:21:55 ~17 min linux/x86_64 📦tgz
✔️ ea66246 #8 2025-01-23 17:39:27 ~35 min windows/x86_64 💿exe
35bea58 #9 2025-01-23 18:20:55 ~2 min macos/aarch64 📄log
35bea58 #9 2025-01-23 18:21:45 ~3 min macos/x86_64 📄log
✔️ 35bea58 #9 2025-01-23 18:27:29 ~9 min tests/nim 📄log
35bea58 #9 2025-01-23 18:30:10 ~11 min tests/ui 📄log
✔️ 35bea58 #9 2025-01-23 18:38:34 ~20 min linux/x86_64 📦tgz
✔️ 35bea58 #9 2025-01-23 18:39:01 ~20 min windows/x86_64 💿exe
✔️ 35bea58 #9 2025-01-23 18:39:40 ~21 min linux-nix/x86_64 📦tgz
35bea58 #10 2025-01-23 19:31:55 ~11 min tests/ui 📄log
668777f #10 2025-01-23 22:03:58 ~2 min macos/aarch64 📄log
668777f #10 2025-01-23 22:06:04 ~4 min macos/x86_64 📄log
✔️ 668777f #10 2025-01-23 22:10:19 ~9 min tests/nim 📄log
668777f #11 2025-01-23 22:13:20 ~12 min tests/ui 📄log
✔️ 668777f #10 2025-01-23 22:21:37 ~20 min linux-nix/x86_64 📦tgz
✔️ 668777f #10 2025-01-23 22:21:55 ~20 min linux/x86_64 📦tgz
✔️ 668777f #10 2025-01-23 22:24:44 ~23 min windows/x86_64 💿exe
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ b14dcf3 #11 2025-01-24 15:36:28 ~7 min macos/aarch64 🍎dmg
✔️ b14dcf3 #11 2025-01-24 15:39:45 ~10 min tests/nim 📄log
✔️ b14dcf3 #11 2025-01-24 15:42:01 ~12 min macos/x86_64 🍎dmg
b14dcf3 #12 2025-01-24 15:47:42 ~18 min tests/ui 📄log
✔️ b14dcf3 #11 2025-01-24 15:48:41 ~19 min linux-nix/x86_64 📦tgz
✔️ b14dcf3 #11 2025-01-24 15:48:58 ~19 min linux/x86_64 📦tgz
✔️ b14dcf3 #11 2025-01-24 15:51:41 ~22 min windows/x86_64 💿exe
✔️ 344d28f #12 2025-01-24 18:32:39 ~6 min macos/aarch64 🍎dmg
✔️ 344d28f #12 2025-01-24 18:35:26 ~9 min tests/nim 📄log
344d28f #13 2025-01-24 18:38:26 ~12 min tests/ui 📄log
✔️ 344d28f #12 2025-01-24 18:39:06 ~12 min macos/x86_64 🍎dmg
✔️ 344d28f #12 2025-01-24 18:46:33 ~20 min linux/x86_64 📦tgz
✔️ 344d28f #12 2025-01-24 18:47:03 ~20 min windows/x86_64 💿exe
✔️ 344d28f #12 2025-01-24 18:48:14 ~21 min linux-nix/x86_64 📦tgz
✔️ 344d28f #14 2025-01-27 14:33:51 ~11 min tests/ui 📄log

Copy link
Member

@caybro caybro left a comment

Choose a reason for hiding this comment

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

LGTM 👍

ui/app/AppLayouts/Onboarding2/OnboardingLayout.qml Outdated Show resolved Hide resolved
ui/app/AppLayouts/Onboarding2/pages/KeycardBasePage.qml Outdated Show resolved Hide resolved
@jrainville jrainville force-pushed the feat/new-onbaording-integration branch from 77b5d44 to bb284bd Compare January 14, 2025 14:35
@jrainville jrainville requested review from a team as code owners January 14, 2025 14:35
@jrainville jrainville requested review from dlipicar and glitchminer and removed request for a team January 14, 2025 14:35
@jrainville jrainville force-pushed the feat/new-onboarding-metrics branch from dbedf7a to d2d7fe9 Compare January 14, 2025 14:37
@jrainville jrainville force-pushed the feat/new-onbaording-integration branch from bb284bd to 5b2d30f Compare January 16, 2025 16:29
@jrainville jrainville force-pushed the feat/new-onboarding-metrics branch from d2d7fe9 to 0e412d4 Compare January 16, 2025 16:29
@jrainville jrainville force-pushed the feat/new-onboarding-metrics branch from 0e412d4 to aa5321c Compare January 16, 2025 17:11
@jrainville jrainville force-pushed the feat/new-onbaording-integration branch from 3a0e9b9 to c13a96b Compare January 21, 2025 14:43
@glitchminer glitchminer self-requested a review January 21, 2025 18:11
@jrainville jrainville force-pushed the feat/new-onbaording-integration branch from c13a96b to 8537b0a Compare January 21, 2025 19:41
Base automatically changed from feat/new-onbaording-integration to master January 21, 2025 20:29
@jrainville jrainville force-pushed the feat/new-onboarding-metrics branch 3 times, most recently from 35bea58 to 668777f Compare January 23, 2025 22:00
Copy link
Member

@caybro caybro left a comment

Choose a reason for hiding this comment

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

LGTM in general

else
stack.push(loginScreenComponent)
onboardingFlow.init()
// if (loginAccountsModel.ModelCount.empty)
Copy link
Member

Choose a reason for hiding this comment

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

You could keep this in 🤔 or just invert the condition:

Suggested change
// if (loginAccountsModel.ModelCount.empty)
if (!!loginAccountsModel && !loginAccountsModel.ModelCount.empty)
stack.push(loginScreenComponent)
else
onboardingFlow.init()

@@ -35,6 +37,7 @@ type
viewVariant: QVariant
controller: Controller
localPairingStatus: LocalPairingStatus
currentFlow: SecondaryFlow
Copy link
Member

Choose a reason for hiding this comment

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

I think you can rename it here in NIM to sth like OnboardingFlow; I'll do the same in enums.h but I think it'd be nice to actually use the one from enums.h

Copy link
Member

@micieslak micieslak left a comment

Choose a reason for hiding this comment

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

lgtm in general, some thoughts shared in comments

ui/app/AppLayouts/Onboarding2/OnboardingLayout.qml Outdated Show resolved Hide resolved
ui/app/AppLayouts/Onboarding2/OnboardingLayout.qml Outdated Show resolved Hide resolved
ui/app/AppLayouts/Onboarding2/OnboardingLayout.qml Outdated Show resolved Hide resolved
ui/app/AppLayouts/Onboarding2/OnboardingLayout.qml Outdated Show resolved Hide resolved
@jrainville jrainville force-pushed the feat/new-onboarding-metrics branch from 668777f to b14dcf3 Compare January 24, 2025 15:28
@jrainville
Copy link
Member Author

@caybro @micieslak I addressed your comments. It's way smaller and cleaner now

Copy link
Member

@micieslak micieslak left a comment

Choose a reason for hiding this comment

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

There is one problem regarding InspectionUtils::baseName move.

Generally, Storybook is intended to be independent from the application code. Only hosted pages should use app's functionality. By using utils we start mixing those two areas. In inspection utils the function is quite specific for needs of inspection itself. In the app I would use a bit altered version:

  function objectTypeName(item) {
      let typeName = item.toString()

      if (typeName.startsWith("QQuick"))
          typeName = name.substring(6)

      const underscoreIndex = typeName.indexOf("_")

      if (underscoreIndex !== -1)
          return typeName.substring(0, underscoreIndex)

      const bracketIndex = typeName.indexOf("(")

      if (bracketIndex !== -1)
          return typeName.substring(0, bracketIndex)

      return typeName
  }

Because of that I would opt for just copying the function to Utils.qml, under more descriptive name, maybe objectTypeName.

At some point in the future we can consider excluding some small "core" library to be shared among storybook app and the status-desktop app itself.

@jrainville jrainville force-pushed the feat/new-onboarding-metrics branch from b14dcf3 to 344d28f Compare January 24, 2025 18:26
@jrainville
Copy link
Member Author

@micieslak gotcha. Fixed

Copy link
Member

@micieslak micieslak left a comment

Choose a reason for hiding this comment

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

Nice!

@jrainville
Copy link
Member Author

The tests passed but the report failed
Screenshot from 2025-01-27 11-05-50

java.nio.file.FileAlreadyExistsException: /var/jenkins_home/jobs/status-desktop/jobs/e2e/jobs/prs/builds/4011/archive/allure-report.zip

Merging.

@jrainville jrainville merged commit e0c3adc into master Jan 27, 2025
8 of 9 checks passed
@jrainville jrainville deleted the feat/new-onboarding-metrics branch January 27, 2025 16:06
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.

[Onboarding] Hook metrics to new onboarding
5 participants