@@ -6,16 +6,12 @@ import type {ComboBoxState} from '@react-stately/combobox';
6
6
import { FeatureBadge } from 'sentry/components/core/badge/featureBadge' ;
7
7
import InteractionStateLayer from 'sentry/components/core/interactionStateLayer' ;
8
8
import { makeOrganizationSeerSetupQueryKey } from 'sentry/components/events/autofix/useOrganizationSeerSetup' ;
9
- import {
10
- setupCheckQueryKey ,
11
- useSeerAcknowledgeMutation ,
12
- } from 'sentry/components/events/autofix/useSeerAcknowledgeMutation' ;
9
+ import { setupCheckQueryKey } from 'sentry/components/events/autofix/useSeerAcknowledgeMutation' ;
13
10
import ExternalLink from 'sentry/components/links/externalLink' ;
14
11
import LoadingIndicator from 'sentry/components/loadingIndicator' ;
15
12
import { useSearchQueryBuilder } from 'sentry/components/searchQueryBuilder/context' ;
16
13
import { IconSeer } from 'sentry/icons' ;
17
14
import { t , tct } from 'sentry/locale' ;
18
- import { space } from 'sentry/styles/space' ;
19
15
import { trackAnalytics } from 'sentry/utils/analytics' ;
20
16
import { useIsFetching , useIsMutating } from 'sentry/utils/queryClient' ;
21
17
import useOrganization from 'sentry/utils/useOrganization' ;
@@ -24,10 +20,8 @@ export const ASK_SEER_ITEM_KEY = 'ask_seer';
24
20
export const ASK_SEER_CONSENT_ITEM_KEY = 'ask_seer_consent' ;
25
21
26
22
function AskSeerConsentOption < T > ( { state} : { state : ComboBoxState < T > } ) {
27
- const organization = useOrganization ( ) ;
28
23
const itemRef = useRef < HTMLDivElement > ( null ) ;
29
24
const [ optionDisableOverride , setOptionDisableOverride ] = useState ( false ) ;
30
- const { mutate : seerAcknowledgeMutate } = useSeerAcknowledgeMutation ( ) ;
31
25
32
26
const { optionProps, labelProps, isFocused, isPressed} = useOption (
33
27
{
@@ -41,28 +35,15 @@ function AskSeerConsentOption<T>({state}: {state: ComboBoxState<T>}) {
41
35
itemRef
42
36
) ;
43
37
44
- const handleClick = ( ) => {
45
- trackAnalytics ( 'trace.explorer.ai_query_interface' , {
46
- organization,
47
- action : 'consent_accepted' ,
48
- } ) ;
49
- seerAcknowledgeMutate ( ) ;
50
- } ;
51
-
52
38
return (
53
- < AskSeerListItem
54
- ref = { itemRef }
55
- onClick = { handleClick }
56
- { ...optionProps }
57
- justifyContent = "space-between"
58
- >
39
+ < AskSeerListItem ref = { itemRef } { ...optionProps } justifyContent = "space-between" >
59
40
< InteractionStateLayer isHovered = { isFocused } isPressed = { isPressed } />
60
- < div style = { { display : 'flex' , alignItems : 'center' , gap : space ( 1 ) } } >
41
+ < AskSeerConsentLabelWrapper >
61
42
< IconSeer />
62
43
< AskSeerLabel { ...labelProps } >
63
44
{ t ( 'Enable Gen AI' ) } < FeatureBadge type = "beta" />
64
45
</ AskSeerLabel >
65
- </ div >
46
+ </ AskSeerConsentLabelWrapper >
66
47
< SeerConsentText >
67
48
{ tct (
68
49
'Query assistant requires Generative AI which is subject to our [dataProcessingPolicy:data processing policy].' ,
@@ -188,7 +169,7 @@ const AskSeerListItem = styled('div')<{justifyContent?: 'flex-start' | 'space-be
188
169
display: flex;
189
170
align-items: center;
190
171
width: 100%;
191
- padding: ${ space ( 1 ) } ${ space ( 1.5 ) } ;
172
+ padding: ${ p => p . theme . space . md } ${ p => p . theme . space . lg } ;
192
173
background: transparent;
193
174
border-radius: 0;
194
175
background-color: none;
@@ -198,7 +179,7 @@ const AskSeerListItem = styled('div')<{justifyContent?: 'flex-start' | 'space-be
198
179
font-weight: ${ p => p . theme . fontWeight . bold } ;
199
180
text-align: left;
200
181
justify-content: ${ p => p . justifyContent ?? 'flex-start' } ;
201
- gap: ${ space ( 1 ) } ;
182
+ gap: ${ p => p . theme . space . md } ;
202
183
list-style: none;
203
184
margin: 0;
204
185
@@ -220,6 +201,12 @@ const AskSeerLabel = styled('span')<{width?: 'auto'}>`
220
201
font-weight: ${ p => p . theme . fontWeight . bold } ;
221
202
display: flex;
222
203
align-items: center;
223
- gap: ${ space ( 1 ) } ;
204
+ gap: ${ p => p . theme . space . md } ;
224
205
width: ${ p => p . width } ;
225
206
` ;
207
+
208
+ const AskSeerConsentLabelWrapper = styled ( 'div' ) `
209
+ display: flex;
210
+ align-items: center;
211
+ gap: ${ p => p . theme . space . md } ;
212
+ ` ;
0 commit comments