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 #14476

Merged
merged 1 commit into from
Feb 12, 2024

Conversation

ncdiehl11
Copy link
Collaborator

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 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (416d823) 67.78% compared to head (b3380d0) 67.78%.

Additional details and impacted files

Impacted file tree graph

@@                 Coverage Diff                  @@
##           chore_release-7.2.0   #14476   +/-   ##
====================================================
  Coverage                67.78%   67.78%           
====================================================
  Files                     2519     2519           
  Lines                    72011    72012    +1     
  Branches                  9263     9263           
====================================================
+ Hits                     48812    48814    +2     
  Misses                   20991    20991           
+ Partials                  2208     2207    -1     
Flag Coverage Δ
app 64.63% <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 12, 2024 20:08
@ncdiehl11 ncdiehl11 requested a review from a team as a code owner February 12, 2024 20:08
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.

Code looks and good and fix works as expected!

@ncdiehl11 ncdiehl11 merged commit 86c138b into chore_release-7.2.0 Feb 12, 2024
28 checks passed
@ncdiehl11 ncdiehl11 deleted the refactor_app-analytics-hook branch February 12, 2024 21:00
b-cooper added a commit that referenced this pull request Feb 21, 2024
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.

2 participants