-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[NoQA] Chore: Analytics - split SWITCH_REPORT
event
#46966
[NoQA] Chore: Analytics - split SWITCH_REPORT
event
#46966
Conversation
Right now we only measured opening of the reports (different ones like threads, previews but still just openings). With THREAD_GO_BACK it's quite different because we are not unmounting previous screen, so onLayout is not triggered (on this event we are finishing the measurements). Screen.Recording.2024-08-07.at.15.49.25.movWith that in mind, I'd consider removing this event for now and consider improving current approach in general (e.g. event invalidation when we are out of some scope like a specific report). It is out of the scope of this PR so I will revert the |
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.
Please fix linter, lgtm
@hannojg do you use these flags in the E2E tests? Is it ok to change it from that perspective |
@kacper-mikolajczak if this is noqa can you please mark it as such in the title? |
@mountiny yeah I think that will break e2e tests - @kirillzyusko what do you think? |
While working on the PR I have found one occurrence of App/src/libs/E2E/tests/linkingTest.e2e.ts Lines 56 to 82 in 0926267
The original If you could indeed check that @kirillzyusko. Much appreciated! ❤️ |
One curious observation is that we end the timer for
|
SWITCH_REPORT
eventSWITCH_REPORT
event
Wild take, but what about removing this one all together? I don't believe it's something with a super clear definition, to me it's more challenging to understand it and it's value than all the other ones that actually point to specific actions (we know when they start & finish). |
I think I'd also vote for getting rid of the Overall, I think we should track aggressively for the 'visiting' action in all scenarios, and skip the 'Back' (visit) which already happened with all the heavy operations that occurred the 1st time when mounting a Report screen. We also can always think about bringing it back here if it proves to be problematic at any point :) |
@mountiny curious of your take on this one |
I think it shouldn't break e2e test - in this PR @kacper-mikolajczak changed only However if you want I can checkout this branch tomorrow and run test locally to see if they pass or not 👀 I see the usage of |
@adhorodyski I like that, I think it makes sense to prioritize the visiting actions over going back.
Yeah, if we do not start it anywhere we can remove it, nobody seems to be using it so nobody will miss it. |
@mountiny PR is ready to be merged 🫡 |
Reviewer Checklist
Screenshots/VideosMacOS: Chrome / SafariNA MacOS: DesktopNA iOS: mWeb SafariNA Android: NativeNA Android: mWeb ChromeNA iOS: NativeNA |
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.
Code changes are straightforward. LGTM. Thanks.
[Sidequest] |
Well! Currently, it looks like the term
|
@@ -46,7 +46,7 @@ function ReportActionItemThread({numberOfReplies, icons, mostRecentReply, childR | |||
<PressableWithSecondaryInteraction | |||
onPress={() => { | |||
Report.navigateToAndOpenChildReport(childReportID); | |||
Timing.start(CONST.TIMING.SWITCH_REPORT); | |||
Timing.start(CONST.TIMING.SWITCH_REPORT_THREAD); |
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.
And, by the way, why do we start the timer after initiating a navigation? Shouldn't we call Timing.start
before navigateToAndOpenChildReport
? And could this be the reason for the high timings in the graph?
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 we can discuss but its NAB for this PR
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.
@mountiny Do you think we can create another issue for this and discuss? Or if there is another related issue on analytics we can add this issue there and discuss.
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.
Thanks!
@@ -46,7 +46,7 @@ function ReportActionItemThread({numberOfReplies, icons, mostRecentReply, childR | |||
<PressableWithSecondaryInteraction | |||
onPress={() => { | |||
Report.navigateToAndOpenChildReport(childReportID); | |||
Timing.start(CONST.TIMING.SWITCH_REPORT); | |||
Timing.start(CONST.TIMING.SWITCH_REPORT_THREAD); |
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 we can discuss but its NAB for this PR
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
Details
In this PR,
SWITCH_REPORT
is being divided into fine grained events in order to get better analytics result and fix event flooding issue.Current changes are:
SWITCH_REPORT_THREAD
SWITCH_REPORT_FROM_PREVIEW
SWITCH_REPORT
fromReportActionItemParentAction
- it was probably the reason we've got so high timing results, because it was not properly closedREPORT_INITIAL_RENDER
removed - incorrect implementationFixed Issues
$ #46965
PROPOSAL: https://expensify.slack.com/archives/C05LX9D6E07/p1722451784265129
Tests
INTERNAL QA
Check the App Timing dashboard and confirm these new events are reporting properly.
Offline tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop