Skip to content

Commit

Permalink
feat(related_issues): Create separate sections for each relation type (
Browse files Browse the repository at this point in the history
…#70789)

In #70504 I added support for
the type parameter which allows getting the data for same-root issues vs
trace-connected issues separately.

This UI change allows each related issues section to fetch and render
the data independently, thus, making the page load faster.

These changes are required to support fetching trace-connected issues
from the Issues Details page without also fetching same-root-connected
data.

---------

Co-authored-by: Scott Cooper <scttcper@gmail.com>
Co-authored-by: getsantry[bot] <66042841+getsantry[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored May 14, 2024
1 parent 9001d83 commit 4014ab3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions static/app/views/issueDetails/groupRelatedIssues/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ function RelatedIssuesSection({
// project=-1 allows ensuring that the query will show issues from any projects for the org
// This is important for traces since issues can be for any project in the org
const baseUrl = `/organizations/${orgSlug}/issues/?project=-1`;
let title;
let linkToTrace;
let openIssuesButton;
let title: React.ReactNode = null;
let linkToTrace: React.ReactNode = null;
let openIssuesButton: React.ReactNode = null;
if (relationType === 'trace_connected' && traceMeta) {
title = t('Issues in the same trace');
linkToTrace = (
Expand Down Expand Up @@ -132,8 +132,8 @@ function RelatedIssuesSection({
) : issues.length > 0 ? (
<Fragment>
<TextButtonWrapper>
{linkToTrace ?? null}
{openIssuesButton ?? null}
{linkToTrace}
{openIssuesButton}
</TextButtonWrapper>
<GroupList
orgSlug={orgSlug}
Expand Down

0 comments on commit 4014ab3

Please sign in to comment.