-
Notifications
You must be signed in to change notification settings - Fork 5k
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: Add metrics event for advanced details section toggling #26083
Conversation
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
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.
PR Summary
This PR introduces a metrics event for tracking the toggling of the advanced details section in transaction confirmations.
- test/e2e/tests/confirmations/transactions/metrics.spec.ts: Added a test case to verify the metrics event for the advanced details toggle.
- ui/pages/confirmations/components/confirm/header/header-info.tsx: Implemented the
trackEvent
function to log the advanced details toggle event. - ui/pages/confirmations/hooks/useTransactionEventFragment.js: Updated to include the
fragment
object in the returned value, ensuring proper tracking and updating of transaction event fragments.
3 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
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.
PR Summary
(updates since last review)
This PR adds a metrics event for tracking the toggling of the advanced details section in transaction confirmations.
- app/scripts/lib/transaction/metrics.test.ts: Added
getIsConfirmationAdvancedDetailsOpen
mock function tomockTransactionMetricsRequest
. - app/scripts/lib/transaction/metrics.ts: Introduced
getIsConfirmationAdvancedDetailsOpen
method to capture the state of the advanced details section. - app/scripts/metamask-controller.js: Added
getIsConfirmationAdvancedDetailsOpen
method tocontrollerActions
for state retrieval. - test/e2e/tests/confirmations/transactions/metrics.spec.ts: Added assertions for
transaction_advanced_view
property in metrics events. - ui/pages/confirmations/components/confirm/header/header-info.tsx: Removed
trackEvent
call fromsetShowAdvancedDetails
function.
5 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
6111d2d
to
abb8454
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.
PR Summary
(updates since last review)
This PR introduces a metrics event for tracking the toggling of the advanced details section in transaction confirmations.
- test/e2e/tests/confirmations/transactions/metrics.spec.ts: Added end-to-end test to verify metrics events for advanced details toggling.
- app/scripts/lib/transaction/metrics.test.ts: Introduced
getIsConfirmationAdvancedDetailsOpen
mock function. - app/scripts/lib/transaction/metrics.ts: Added
getIsConfirmationAdvancedDetailsOpen
method to capture advanced details state. - app/scripts/metamask-controller.js: Integrated
getIsConfirmationAdvancedDetailsOpen
method for state retrieval. - ui/pages/confirmations/components/confirm/header/header-info.tsx: Removed
trackEvent
call fromsetShowAdvancedDetails
function.
1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
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.
PR Summary
(updates since last review)
This PR introduces a metrics event for tracking the toggling of the advanced details section in transaction confirmations.
- app/scripts/lib/transaction/metrics.ts: Added
getIsConfirmationAdvancedDetailsOpen
method to capture advanced details state. - app/scripts/metamask-controller.js: Integrated
getIsConfirmationAdvancedDetailsOpen
method for state retrieval. - ui/pages/confirmations/components/confirm/header/header-info.tsx: Added metrics event for advanced details toggling.
- test/e2e/tests/confirmations/transactions/metrics.spec.ts: Added end-to-end test to verify metrics events for advanced details toggling.
- app/scripts/lib/transaction/metrics.test.ts: Introduced
getIsConfirmationAdvancedDetailsOpen
mock function.
115 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
2c1f6f6
to
f1a9015
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.
PR Summary
(updates since last review)
This PR introduces a metrics event for tracking the toggling of the advanced details section in transaction confirmations.
- ui/pages/confirmations/components/confirm/header/header-info.tsx: Removed unused import and added a new metrics event for toggling the advanced details section.
- app/scripts/metamask-controller.js: Added
getIsConfirmationAdvancedDetailsOpen
method for state retrieval. - shared/constants/metametrics.ts: Updated to include the new event name for advanced details toggling.
These changes ensure that every time the advanced details section is toggled, a corresponding metrics event is fired.
1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
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.
PR Summary
(updates since last review)
This PR introduces a metrics event for tracking the toggling of the advanced details section in transaction confirmations.
- app/scripts/lib/transaction/metrics.ts: Added
getIsConfirmationAdvancedDetailsOpen
method and updatedbuildEventFragmentProperties
to includetransaction_advanced_view
. - app/scripts/metamask-controller.js: Added
getIsConfirmationAdvancedDetailsOpen
method tocontrollerActions
. - ui/pages/confirmations/components/confirm/header/header-info.tsx: Integrated
trackEvent
for advanced details toggle. - test/e2e/tests/confirmations/transactions/metrics.spec.ts: Added assertions for
transaction_advanced_view
property in metrics events. - app/scripts/lib/transaction/metrics.test.ts: Added mock function
getIsConfirmationAdvancedDetailsOpen
tomockTransactionMetricsRequest
.
10 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
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.
PR Summary
(updates since last review)
This PR introduces a metrics event for tracking the toggling of the advanced details section in transaction confirmations.
- app/scripts/lib/transaction/metrics.test.ts: Added
transaction_advanced_view
toexpectedProperties
for various transaction scenarios. - shared/modules/metametrics.test.ts: Introduced mock function
getIsConfirmationAdvancedDetailsOpen
increateTransactionMetricsRequest
. - ui/pages/confirmations/hooks/useTransactionEventFragment.js: Simplified return object by removing
fragment
property, exposing onlyupdateTransactionEventFragment
.
3 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
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.
👍
4d7e7c5
to
f093e6d
Compare
Quality Gate passedIssues Measures |
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.
PR Summary
(updates since last review)
This PR introduces a metrics event for tracking the toggling of the advanced details section in transaction confirmations.
- app/scripts/lib/transaction/metrics.ts: Added
getIsConfirmationAdvancedDetailsOpen
method andtransaction_advanced_view
property to track advanced details toggling. - app/scripts/metamask-controller.js: Introduced
getIsConfirmationAdvancedDetailsOpen
method tocontrollerActions
. - test/e2e/tests/confirmations/transactions/metrics.spec.ts: Added assertions for
transaction_advanced_view
property in metrics events. - ui/pages/confirmations/components/confirm/header/header-info.tsx: Added metrics event dispatch for advanced details toggle.
- app/_locales/en/messages.json: Added
onboardingMetametricsPrivacyDescription
message key for enhanced onboarding privacy information.
23 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
Builds ready [f093e6d]
Page Load Metrics (246 ± 258 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #26083 +/- ##
===========================================
- Coverage 69.67% 69.67% -0.00%
===========================================
Files 1405 1405
Lines 49733 49737 +4
Branches 13751 13751
===========================================
+ Hits 34651 34652 +1
- Misses 15082 15085 +3 ☔ View full report in Codecov by Sentry. |
Description
We recently introduced the advanced details toggle for redesigned transactions. This PR adds a metrics event that gets fired every time that toggle is pressed.
Related issues
Fixes: https://github.com/MetaMask/MetaMask-planning/issues/2736
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist