-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
ref(performance): Add missing types to performance widgets #79301
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
Conversation
a lot of these were really similar GenericPerformanceWidgetProps components part of getsentry/frontend-tsc#79
| const Visualizations: GenericPerformanceWidgetProps<DataType>['Visualizations'] = | ||
| organization.features.includes('performance-new-widget-designs') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lots of the changes in this pr should be just the whitespace changes
| [PerformanceWidgetSetting.SLOW_SCREENS_BY_WARM_START]: | ||
| 'count_starts(measurements.app_start_warm)', | ||
| } as any | ||
| )[props.chartSetting]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can't cast this to keyof itself
| <StackedAreaChart | ||
| {...provided.widgetData.chart} | ||
| {...provided} | ||
| {...(provided as any)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the types here don't totally line up and it was previously any
gggritso
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏻
| const description = listItem[SpanMetricsField.SPAN_DESCRIPTION] as string; | ||
| const group = listItem[SpanMetricsField.SPAN_GROUP] as string; | ||
| const projectID = listItem['project.id'] as number; | ||
| const timeSpentPercentage = listItem[fieldString] as number; | ||
| const totalTime = listItem[`sum(${SpanMetricsField.SPAN_SELF_TIME})`] as number; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of curiosity, why the change to as here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
before the type was
const totalTime: number = any which was fine. But now it's const totalTime = string | number so it has to be casted to number. I could've left the const totalTime: number i guess
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
K, just curious!
* master: (288 commits) feat(metrics): Register MRI for spans/count_per_root_project (#78992) feat(dynamic-sampling): Settings for sample rate (#79341) Revert "feat(sentry-sdk): Enable HTTP2 transport" (#79391) fix(feedback): keep oldest date_added for duplicate user reports (#79387) chore(issue-stream): Remove tooltip for Unhandled (#79385) chore(autofix): Show banner if gen AI consent is given, even if no feature flag (#79362) chore(autofix+copilot) Allow autofix without FF if gen AI consent given (#79361) Fixes VULN-50 by enforcing option (#79384) perf(issues): improve adjacent_events query (#79365) feat(issues): Add anchor links back to issue sections (#79333) fix(issue-views): Make tab bar take up entire row (#79383) chore(issues): Add additional metrics for ownership matching (#79302) feat(insights): create screen rendering module (#79192) fix(issues): Avoid streamline issue layout rerenders (#79327) ref(performance): Add missing types to performance widgets (#79301) chore(issue-views): Add translation wrapper to aria label (#79320) chore(issue-stream): Reduce font size of title and message (#79378) feat(insights): update headers and breadcrumbs on frontend domain view (#78945) feat(insights): add view trends button to ai overview (#78611) ref(rr6): Remove unused param (#79379) ...
a lot of these were really similar GenericPerformanceWidgetProps components
part of https://github.com/getsentry/frontend-tsc/issues/79