-
Notifications
You must be signed in to change notification settings - Fork 79
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
Conversation
Jenkins BuildsClick to see older builds (62)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
77b5d44
to
bb284bd
Compare
dbedf7a
to
d2d7fe9
Compare
bb284bd
to
5b2d30f
Compare
d2d7fe9
to
0e412d4
Compare
0e412d4
to
aa5321c
Compare
3a0e9b9
to
c13a96b
Compare
c13a96b
to
8537b0a
Compare
35bea58
to
668777f
Compare
There was a problem hiding this 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) |
There was a problem hiding this comment.
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:
// 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 |
There was a problem hiding this comment.
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
There was a problem hiding this 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
668777f
to
b14dcf3
Compare
@caybro @micieslak I addressed your comments. It's way smaller and cleaner now |
There was a problem hiding this 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.
b14dcf3
to
344d28f
Compare
@micieslak gotcha. Fixed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
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
My PR is consistent with this document: Status Desktop Architecture Guide
Impact on end user
None, it works as before
How to test
messageType=AsyncAddCentralizedMetricIfEnabledTaskArg
.Risk
Tick one:
The only difference is the pages are not named the same as before, but that's expected since we changed the whole design.