Skip to content

feat(releases): Refactor to support deep-linked Issues Chart #89711

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

Merged
merged 2 commits into from
Apr 24, 2025

Conversation

billyvg
Copy link
Member

@billyvg billyvg commented Apr 16, 2025

This PR creates a "chart widget" similar to what we did for Insights widgets (e.g. #89344). This is so that we can deep-link to the EventGraph using only groupId from URL parameters.

This also makes some changes to EventGraph so that we can use a custom date range (/page filters). This is used when we click a release bubble, we want the chart in the drawer to refetch the same stats (but at a different interval) according to the bubble's time bucket.

Part of #88560

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Apr 16, 2025
@billyvg billyvg changed the base branch from master to billy/replay-2-releases-drawer-needs-to-have-deeplinks April 16, 2025 00:05
@billyvg billyvg changed the title feat(releases): Use routing for Releases Drawer feat(releases): Refactor to support deep-linked Issues Chart Apr 16, 2025
@billyvg billyvg force-pushed the billy/replay-39-refactor-the-chart-from-eventgraph branch from 8014f45 to 54d0c2d Compare April 16, 2025 00:06
@billyvg billyvg force-pushed the billy/replay-39-refactor-the-chart-from-eventgraph branch from 2992d1d to a7026d8 Compare April 23, 2025 15:37
@billyvg billyvg changed the base branch from billy/replay-2-releases-drawer-needs-to-have-deeplinks to master April 23, 2025 15:37
label={t('Users')}
/>
</SummaryContainer>
{showSummary ? (
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes a bug in Release drawer where this is shown during loading state.

@billyvg billyvg marked this pull request as ready for review April 23, 2025 17:01
@billyvg billyvg requested review from a team as code owners April 23, 2025 17:01
@billyvg billyvg requested review from leeandher and a team April 23, 2025 17:01
/>
</SummaryContainer>
) : (
<div />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could this be null or undefined instead?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Container is a grid so it needs an empty el unfortunately :(

@@ -26,7 +27,13 @@ interface Props extends LoadableChartWidgetProps {
export function ChartWidgetLoader(props: Props) {
const query = useQuery<{default: React.FC<LoadableChartWidgetProps>}>({
queryKey: [`widget-${props.id}`],
queryFn: () => import(`sentry/views/insights/common/components/widgets/${props.id}`),
queryFn: () => {
if (props.id === EVENT_GRAPH_WIDGET_ID) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this lead to circular dependencies?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good thinking... it could if we used ChartWidgetLoader to always load EventGraph, but we shouldn't need to. It'll only be the Insights widgets that we replace with WidgetLoader

@billyvg billyvg merged commit 3a410a5 into master Apr 24, 2025
48 checks passed
@billyvg billyvg deleted the billy/replay-39-refactor-the-chart-from-eventgraph branch April 24, 2025 14:20
@github-actions github-actions bot locked and limited conversation to collaborators May 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants