Skip to content

Commit 482c10a

Browse files
leeandherandrewshie-sentry
authored andcommitted
chore(perf-issues): Allow experimental pages to use existing page configs (#91821)
Allow experiments to use the templates/config from the base issues. **Before** <img width="197" alt="image" src="https://github.com/user-attachments/assets/8f705f49-9c7e-442f-aea4-19561af76649" /> <img width="321" alt="image" src="https://github.com/user-attachments/assets/f29bf7b5-9a21-48b6-a798-06f9f3625727" /> After: <img width="180" alt="image" src="https://github.com/user-attachments/assets/fbc49ab4-5bc4-43ad-a476-d688ed5d9339" /> <img width="308" alt="image" src="https://github.com/user-attachments/assets/8a846320-03a2-42e8-9cf2-34fc789e7715" />
1 parent df2f72f commit 482c10a

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

static/app/types/group.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,10 +232,12 @@ const OCCURRENCE_TYPE_TO_ISSUE_TYPE = {
232232
1001: IssueType.PERFORMANCE_SLOW_DB_QUERY,
233233
1004: IssueType.PERFORMANCE_RENDER_BLOCKING_ASSET,
234234
1006: IssueType.PERFORMANCE_N_PLUS_ONE_DB_QUERIES,
235+
1906: IssueType.PERFORMANCE_N_PLUS_ONE_DB_QUERIES,
235236
1007: IssueType.PERFORMANCE_CONSECUTIVE_DB_QUERIES,
236237
1008: IssueType.PERFORMANCE_FILE_IO_MAIN_THREAD,
237238
1009: IssueType.PERFORMANCE_CONSECUTIVE_HTTP,
238239
1010: IssueType.PERFORMANCE_N_PLUS_ONE_API_CALLS,
240+
1910: IssueType.PERFORMANCE_N_PLUS_ONE_API_CALLS,
239241
1012: IssueType.PERFORMANCE_UNCOMPRESSED_ASSET,
240242
1013: IssueType.PERFORMANCE_DB_MAIN_THREAD,
241243
1015: IssueType.PERFORMANCE_LARGE_HTTP_PAYLOAD,

static/app/utils/issueTypeConfig/index.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,14 +153,20 @@ export const getConfigForIssueType = (
153153
? getIssueCategoryAndTypeFromOccurrenceType(params.eventOccurrenceType)
154154
: params;
155155

156+
const refinedIssueType: IssueType | undefined = issueType?.replace(
157+
'_experimental',
158+
''
159+
) as IssueType | undefined;
160+
156161
const categoryMap = issueTypeConfig[issueCategory];
157162

158163
if (!categoryMap) {
159164
return BASE_CONFIG;
160165
}
161166

162167
const categoryConfig = categoryMap._categoryDefaults;
163-
const overrideConfig = issueType ? categoryMap[issueType] : {};
168+
169+
const overrideConfig = refinedIssueType ? categoryMap[refinedIssueType] : {};
164170
const errorResourceConfig = shouldShowCustomErrorResourceConfig(params, project)
165171
? getErrorHelpResource({title: title!, project})
166172
: null;

0 commit comments

Comments
 (0)