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

refactor(app): refactor protocol event analytics hooks #14552

Merged

Conversation

ncdiehl11
Copy link
Collaborator

reinstates change accidentally rolled back by this PR

Overview

Recent implementation of analytics hooks for protocol events broke a rule of hooks, resulting in broken functionality when trying to proceed to protocol setup. Here, I refactor the use of 'useRobot' into 'useTrackProtocolRunEvent' to follow the rule of hooks and avoid the use of 'useRobot' in the parsing utility function 'parseProtocolRunAnalyticsData'.

Review requests

@mjhuff per finding the bug

Risk assessment

low

Recent implementation of analytics hooks for protocol events broke a rule of hooks, resulting in
broken functionality when trying to proceed to protocol setup. Here, I refactor the use of
'useRobot' into 'useTrackProtocolRunEvent' to follow the rule of hooks and avoid the use of
'useRobot' in the parsing utility function 'parseProtocolRunAnalyticsData'.
Copy link

codecov bot commented Feb 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.75%. Comparing base (bfd3145) to head (9fabc0a).

Additional details and impacted files

Impacted file tree graph

@@                 Coverage Diff                  @@
##           chore_release-7.2.0   #14552   +/-   ##
====================================================
  Coverage                67.74%   67.75%           
====================================================
  Files                     2521     2521           
  Lines                    72200    72201    +1     
  Branches                  9293     9293           
====================================================
+ Hits                     48915    48917    +2     
  Misses                   21064    21064           
+ Partials                  2221     2220    -1     
Flag Coverage Δ
app 64.60% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...nisms/Devices/hooks/useProtocolRunAnalyticsData.ts 63.63% <ø> (-1.07%) ⬇️
...ms/Devices/hooks/useTrackCreateProtocolRunEvent.ts 83.33% <100.00%> (+1.51%) ⬆️
...rganisms/Devices/hooks/useTrackProtocolRunEvent.ts 90.00% <100.00%> (+1.11%) ⬆️

... and 1 file with indirect coverage changes

@ncdiehl11 ncdiehl11 marked this pull request as ready for review February 27, 2024 16:00
@ncdiehl11 ncdiehl11 requested a review from a team as a code owner February 27, 2024 16:00
@ncdiehl11 ncdiehl11 requested review from mjhuff and removed request for a team February 27, 2024 16:00
Copy link
Contributor

@mjhuff mjhuff left a comment

Choose a reason for hiding this comment

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

Thank you!

@ncdiehl11 ncdiehl11 merged commit 6dca3d6 into chore_release-7.2.0 Feb 27, 2024
28 checks passed
@ncdiehl11 ncdiehl11 deleted the refactor_app-analytics-hook-post-reversion branch February 27, 2024 16:41
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.

3 participants