Skip to content

Commit 16a63d2

Browse files
Change buttonType -> buttonName
1 parent 398493b commit 16a63d2

File tree

11 files changed

+17
-17
lines changed

11 files changed

+17
-17
lines changed

src/layouts/Header/components/UserDropdown/UserDropdown.test.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ describe('UserDropdown', () => {
243243
expect(eventTracker().track).toHaveBeenCalledWith({
244244
type: 'Button Clicked',
245245
properties: {
246-
buttonType: 'Install GitHub App',
246+
buttonName: 'Install GitHub App',
247247
buttonLocation: 'User dropdown',
248248
},
249249
})

src/layouts/Header/components/UserDropdown/UserDropdown.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ function UserDropdown() {
4747
eventTracker().track({
4848
type: 'Button Clicked',
4949
properties: {
50-
buttonType: 'Install GitHub App',
50+
buttonName: 'Install GitHub App',
5151
buttonLocation: 'User dropdown',
5252
},
5353
}),

src/pages/OwnerPage/HeaderBanners/GithubConfigBanner/GithubConfigBanner.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const GithubConfigBanner = () => {
2626
eventTracker().track({
2727
type: 'Button Clicked',
2828
properties: {
29-
buttonType: 'Install GitHub App',
29+
buttonName: 'Install GitHub App',
3030
buttonLocation: 'Configure GitHub app banner',
3131
},
3232
})

src/pages/OwnerPage/HeaderBanners/GithubConfigBanner/GithubConfigBanner.test.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ describe('GithubConfigBanner', () => {
5353
expect(eventTracker().track).toHaveBeenCalledWith({
5454
type: 'Button Clicked',
5555
properties: {
56-
buttonType: 'Install GitHub App',
56+
buttonName: 'Install GitHub App',
5757
buttonLocation: 'Configure GitHub app banner',
5858
},
5959
})

src/services/events/amplitude/amplitude.test.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -104,14 +104,14 @@ describe('AmplitudeEventTracker', () => {
104104
tracker.track({
105105
type: 'Button Clicked',
106106
properties: {
107-
buttonType: 'Configure Repo',
107+
buttonName: 'Configure Repo',
108108
},
109109
})
110110

111111
expect(mockAmplitude.track).toHaveBeenCalledWith({
112112
event_type: 'Button Clicked',
113113
event_properties: {
114-
buttonType: 'Configure Repo',
114+
buttonName: 'Configure Repo',
115115
},
116116
})
117117
})
@@ -133,14 +133,14 @@ describe('AmplitudeEventTracker', () => {
133133
tracker.track({
134134
type: 'Button Clicked',
135135
properties: {
136-
buttonType: 'Configure Repo',
136+
buttonName: 'Configure Repo',
137137
},
138138
})
139139

140140
expect(mockAmplitude.track).toHaveBeenCalledWith({
141141
event_type: 'Button Clicked',
142142
event_properties: {
143-
buttonType: 'Configure Repo',
143+
buttonName: 'Configure Repo',
144144
owner: {
145145
id: 123,
146146
},

src/services/events/events.test.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ describe('EventTracker', () => {
3232
stubbedEventTracker.track({
3333
type: 'Button Clicked',
3434
properties: {
35-
buttonType: 'Install GitHub App',
35+
buttonName: 'Install GitHub App',
3636
buttonLocation: 'test',
3737
},
3838
})
@@ -70,7 +70,7 @@ describe('EventTracker', () => {
7070
tracker.track({
7171
type: 'Button Clicked',
7272
properties: {
73-
buttonType: 'Install GitHub App',
73+
buttonName: 'Install GitHub App',
7474
buttonLocation: 'test',
7575
},
7676
})

src/services/events/types.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { Provider } from 'shared/api/helpers'
55
//
66
// Adding event types in this way provides type safety for names and event
77
// properties.
8-
// E.g., every 'Button Clicked' event must have the buttonType property.
8+
// E.g., every 'Button Clicked' event must have the buttonName property.
99
//
1010
// Guidelines:
1111
// - Event names should:
@@ -27,7 +27,7 @@ export type Event =
2727
| {
2828
type: 'Button Clicked'
2929
properties: {
30-
buttonType: ButtonType
30+
buttonName: ButtonName
3131
buttonLocation?: string
3232
}
3333
}
@@ -85,5 +85,5 @@ export abstract class EventTracker {
8585
// Extend as needed.
8686
//
8787

88-
type ButtonType = 'Install GitHub App' | 'Configure Repo'
88+
type ButtonName = 'Install GitHub App' | 'Configure Repo'
8989
type PageName = 'Owner Page'

src/shared/ListRepo/InactiveRepo/InactiveRepo.test.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ describe('InactiveRepo', () => {
6969
expect(eventTracker().track).toHaveBeenCalledWith({
7070
type: 'Button Clicked',
7171
properties: {
72-
buttonType: 'Configure Repo',
72+
buttonName: 'Configure Repo',
7373
buttonLocation: 'Repo list',
7474
},
7575
})

src/shared/ListRepo/InactiveRepo/InactiveRepo.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ function InactiveRepo({
3131
eventTracker().track({
3232
type: 'Button Clicked',
3333
properties: {
34-
buttonType: 'Configure Repo',
34+
buttonName: 'Configure Repo',
3535
buttonLocation: 'Repo list',
3636
},
3737
})

src/ui/ContextSwitcher/ContextSwitcher.test.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,7 @@ describe('ContextSwitcher', () => {
768768
expect(eventTracker().track).toHaveBeenCalledWith({
769769
type: 'Button Clicked',
770770
properties: {
771-
buttonType: 'Install GitHub App',
771+
buttonName: 'Install GitHub App',
772772
buttonLocation: 'Org selector',
773773
},
774774
})

src/ui/ContextSwitcher/ContextSwitcher.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ function ContextSwitcher({
217217
eventTracker().track({
218218
type: 'Button Clicked',
219219
properties: {
220-
buttonType: 'Install GitHub App',
220+
buttonName: 'Install GitHub App',
221221
buttonLocation: 'Org selector',
222222
},
223223
})

0 commit comments

Comments
 (0)