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

feat(nav): Add analytics for secondary items #87249

Merged
merged 2 commits into from
Mar 18, 2025

Conversation

malwilley
Copy link
Member

  • Adds navigation.secondary_item_clicked analytic event for secondary nav items
  • Renames primary analytic event from growth.sidebar_clicked to navigation.primary_item_clicked

@malwilley malwilley requested review from a team as code owners March 17, 2025 23:02
@malwilley malwilley removed request for a team March 17, 2025 23:02
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Mar 17, 2025
Copy link

codecov bot commented Mar 17, 2025

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
9950 1 9949 4
View the top 1 failed test(s) by shortest run time
Nav analytics tracks primary sidebar item
Stack Traces | 0.092s run time
Error: expect(jest.fn()).toHaveBeenCalledWith(...expected)

Expected: "growth.clicked_sidebar", ObjectContaining {"item": "issues"}
Received: "navigation.primary_item_clicked", {"item": "issues", "organization": {"access": ["org:read", "org:write", "org:admin", "org:integrations", "project:read", "project:write", "project:releases", "project:admin", "team:read", "team:write", …], "aggregatedDataConsent": false, "alertsMemberWrite": false, "allowJoinRequests": false, "allowMemberInvite": true, "allowMemberProjectCreation": false, "allowSharedIssues": false, "allowSuperuserAccess": false, "attachmentsRole": "member", "availableRoles": [], "avatar": {"avatarType": "default", "avatarUrl": null, "avatarUuid": null}, "codecovAccess": false, "dataScrubber": false, "dataScrubberDefaults": false, "dateCreated": "2017-10-17T02:41:20.000Z", "debugFilesRole": "", "defaultRole": "", "enhancedPrivacy": false, "eventsMemberAdmin": false, "experiments": {}, "features": ["insights-entry-points", "discover", "discover-basic", "discover-query", "dashboards-basic", "dashboards-edit", "user-feedback-ui", "session-replay-ui", "ourlogs-enabled", "performance-view", …], "genAIConsent": false, "githubNudgeInvite": false, "githubOpenPRBot": false, "githubPRBot": false, "hideAiFeatures": false, "id": "3", "isDefault": false, "isDynamicallySampled": true, "isEarlyAdopter": false, "issueAlertsThreadFlag": false, "links": {"organizationUrl": "https://org-slug.sentry.io", "regionUrl": "https://us.sentry.io"}, "metricAlertsThreadFlag": false, "name": "Organization Name", "onboardingTasks": [], "openMembership": false, "orgRoleList": [{"desc": "Can manage subscription and billing details.", "id": "billing", "isAllowed": false, "isGlobal": false, "isRetired": false, "isTeamRolesAllowed": false, "is_global": false, "minimumTeamRole": "contributor", "name": "Billing"}, {"desc": "Members can view and act on events, as well as view most other data within the organization.", "id": "member", "isAllowed": false, "isGlobal": false, "isRetired": false, "isTeamRolesAllowed": true, "is_global": false, "minimumTeamRole": "contributor", "name": "Member"}, {"desc": "Admin privileges on any teams of which they're a member. They can create new teams and projects, as well as remove teams and projects on which they already hold membership (or all teams, if open membership is enabled). Additionally, they can manage memberships of teams that they are members of. They cannot invite members to the organization.", "id": "admin", "isAllowed": false, "isGlobal": false, "isRetired": true, "isTeamRolesAllowed": true, "is_global": false, "minimumTeamRole": "admin", "name": "Admin"}, {"desc": "Gains admin access on all teams as well as the ability to add and remove members.", "id": "manager", "isAllowed": false, "isGlobal": true, "isRetired": false, "isTeamRolesAllowed": true, "is_global": true, "minimumTeamRole": "admin", "name": "Manager"}, {"desc": "Gains full permission across the organization. Can manage members as well as perform catastrophic operations such as removing the organization.", "id": "owner", "isAllowed": false, "isGlobal": true, "isRetired": false, "isTeamRolesAllowed": true, "is_global": true, "minimumTeamRole": "admin", "name": "Owner"}], "pendingAccessRequests": 0, "quota": {"accountLimit": null, "maxRate": null, "maxRateInterval": null, "projectLimit": null}, "relayPiiConfig": null, "require2FA": false, "requiresSso": false, "safeFields": [], "samplingMode": "organization", "scrapeJavaScript": true, "scrubIPAddresses": false, "sensitiveFields": [], "slug": "org-slug", "status": {"id": "active", "name": "active"}, "storeCrashReports": 0, "streamlineOnly": null, "targetSampleRate": 1, "teamRoleList": [{"desc": "...", "id": "contributor", "isMinimumRoleFor": "", "isRetired": false, "name": "Contributor"}, {"desc": "...", "id": "admin", "isMinimumRoleFor": "", "isRetired": false, "name": "Team Admin"}], "trustedRelays": []}}

Number of calls: 1
    at Object.<anonymous> (.../components/nav/index.spec.tsx:162:41)

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@malwilley malwilley merged commit d00c80c into master Mar 18, 2025
40 checks passed
@malwilley malwilley deleted the malwilley/feat/nav-secondary-analytics branch March 18, 2025 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants