-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
feat(releases): Refactor to support deep-linked Issues Chart #89711
Conversation
8014f45
to
54d0c2d
Compare
2992d1d
to
a7026d8
Compare
label={t('Users')} | ||
/> | ||
</SummaryContainer> | ||
{showSummary ? ( |
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.
Fixes a bug in Release drawer where this is shown during loading state.
/> | ||
</SummaryContainer> | ||
) : ( | ||
<div /> |
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.
could this be null or undefined instead?
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.
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) { |
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.
does this lead to circular dependencies?
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.
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
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 onlygroupId
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