Skip to content

Commit 94bffc8

Browse files
[getsentry/action-github-commit] Auto commit
1 parent 84395e8 commit 94bffc8

File tree

2 files changed

+34
-33
lines changed

2 files changed

+34
-33
lines changed

src/components/debugSymbolConfig/debugSymbolConfig.tsx

Lines changed: 33 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,49 @@
11
'use client';
22

3+
import {useState} from 'react';
34
import styled from '@emotion/styled';
45
import {Checkbox} from '@radix-ui/themes';
5-
import {useState} from 'react';
66

77
type DebugSymbolConfigProps = {
88
defaultOptions?: string[];
99
};
1010

1111
const options = [
1212
{
13-
id: 'dsym',
14-
name: 'dSYM',
13+
id: 'dsym',
14+
name: 'dSYM',
1515
configLine: '',
16-
comment: 'Debug symbols (dSYM) are uploaded by default. You can disable this by setting upload_debug_symbols: false',
17-
required: true
16+
comment:
17+
'Debug symbols (dSYM) are uploaded by default. You can disable this by setting upload_debug_symbols: false',
18+
required: true,
1819
},
1920
{
20-
id: 'source-maps',
21-
name: 'Source Maps',
21+
id: 'source-maps',
22+
name: 'Source Maps',
2223
configLine: ' upload_source_maps: true\n',
23-
comment: 'Enabling this option allows Sentry to provide readable stack traces\n # for Flutter web apps.',
24-
required: false
24+
comment:
25+
'Enabling this option allows Sentry to provide readable stack traces\n # for Flutter web apps.',
26+
required: false,
2527
},
2628
{
27-
id: 'source-context',
28-
name: 'Source Context',
29+
id: 'source-context',
30+
name: 'Source Context',
2931
configLine: ' upload_sources: true\n',
30-
comment: 'Source context uploads your source files to Sentry, allowing you to see\n # the actual code around the location of errors. \n # This only uploads Dart/Flutter code, not native code.',
31-
required: false
32+
comment:
33+
'Source context uploads your source files to Sentry, allowing you to see\n # the actual code around the location of errors. \n # This only uploads Dart/Flutter code, not native code.',
34+
required: false,
3235
},
3336
];
3437

35-
export function DebugSymbolConfig({
36-
defaultOptions = ['dsym'],
37-
}: DebugSymbolConfigProps) {
38+
export function DebugSymbolConfig({defaultOptions = ['dsym']}: DebugSymbolConfigProps) {
3839
// Ensure dsym is always in the selected options
3940
const initialOptions = [...new Set([...defaultOptions, 'dsym'])];
4041
const [selectedOptions, setSelectedOptions] = useState<string[]>(initialOptions);
4142

4243
const handleOptionToggle = (optionId: string) => {
4344
// If it's dsym, don't allow toggling
4445
if (optionId === 'dsym') return;
45-
46+
4647
setSelectedOptions(prev => {
4748
// If already selected, remove it
4849
if (prev.includes(optionId)) {
@@ -59,13 +60,13 @@ export function DebugSymbolConfig({
5960
project: ___PROJECT_SLUG___
6061
org: ___ORG_SLUG___
6162
auth_token: ___ORG_AUTH_TOKEN___\n`;
62-
63+
6364
// Add other selected options with their comments
6465
const additionalConfig = options
6566
.filter(option => option.id !== 'dsym' && selectedOptions.includes(option.id))
6667
.map(option => `\n # ${option.comment}\n${option.configLine}`)
6768
.join('');
68-
69+
6970
return baseConfig + additionalConfig;
7071
};
7172

@@ -84,7 +85,7 @@ export function DebugSymbolConfig({
8485
isRequired={option.required}
8586
>
8687
<CheckboxWrapper>
87-
<Checkbox
88+
<Checkbox
8889
checked={selectedOptions.includes(option.id)}
8990
onCheckedChange={() => handleOptionToggle(option.id)}
9091
disabled={option.required}
@@ -107,16 +108,15 @@ export function DebugSymbolConfig({
107108
</CopyButton>
108109
</HeaderRight>
109110
</CodeBlockHeader>
110-
<CodeBlock>
111-
{getConfigSnippet()}
112-
</CodeBlock>
111+
<CodeBlock>{getConfigSnippet()}</CodeBlock>
113112
</CodeBlockContainer>
114-
113+
115114
{selectedOptions.includes('dsym') && (
116115
<DescriptionSection>
117116
<DescriptionTitle>Debug Symbols (dSYM)</DescriptionTitle>
118117
<Description>
119-
Debug symbols (dSYM) are uploaded by default. You can disable this by setting the `upload_debug_symbols` option to `false`.
118+
Debug symbols (dSYM) are uploaded by default. You can disable this by
119+
setting the `upload_debug_symbols` option to `false`.
120120
</Description>
121121
</DescriptionSection>
122122
)}
@@ -153,17 +153,18 @@ const OptionButton = styled('button')<{isActive: boolean; isRequired?: boolean}>
153153
font-size: 14px;
154154
display: flex;
155155
align-items: center;
156-
156+
157157
&:hover {
158158
background: ${props => {
159159
if (props.isRequired) return props.isActive ? '#6C5FC7' : '#f4f2f7';
160160
return props.isActive ? '#6C5FC7' : '#e7e1ef';
161161
}};
162162
}
163-
163+
164164
&:focus {
165165
outline: none;
166-
box-shadow: ${props => (props.isRequired ? 'none' : '0 0 0 2px rgba(108, 95, 199, 0.3)')};
166+
box-shadow: ${props =>
167+
props.isRequired ? 'none' : '0 0 0 2px rgba(108, 95, 199, 0.3)'};
167168
}
168169
`;
169170

@@ -214,11 +215,11 @@ const CopyButton = styled('button')`
214215
align-items: center;
215216
justify-content: center;
216217
padding: 4px;
217-
218+
218219
&:hover {
219220
opacity: 0.8;
220221
}
221-
222+
222223
&:focus {
223224
outline: none;
224225
}
@@ -242,7 +243,7 @@ const DescriptionSection = styled('div')`
242243
margin-bottom: 20px;
243244
padding-bottom: 20px;
244245
border-bottom: 1px solid #e2e2e2;
245-
246+
246247
&:last-child {
247248
margin-bottom: 0;
248249
padding-bottom: 0;
@@ -257,4 +258,4 @@ const DescriptionTitle = styled('h4')`
257258
const Description = styled('p')`
258259
margin: 0 0 16px 0;
259260
line-height: 1.5;
260-
`;
261+
`;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export * from './debugSymbolConfig';
1+
export * from './debugSymbolConfig';

0 commit comments

Comments
 (0)