Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 43 additions & 37 deletions static/app/components/events/breadcrumbs/breadcrumbsDataSection.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {useCallback, useMemo, useRef, useState} from 'react';
import styled from '@emotion/styled';

import GuideAnchor from 'sentry/components/assistant/guideAnchor';
import {Button} from 'sentry/components/button';
import ButtonBar from 'sentry/components/buttonBar';
import ErrorBoundary from 'sentry/components/errorBoundary';
Expand Down Expand Up @@ -176,43 +177,48 @@ export default function BreadcrumbsDataSection({
const hasViewAll = summaryCrumbs.length !== enhancedCrumbs.length;

return (
<InterimSection
key="breadcrumbs"
type={SectionKey.BREADCRUMBS}
title={t('Breadcrumbs')}
data-test-id="breadcrumbs-data-section"
actions={actions}
>
<ErrorBoundary mini message={t('There was an error loading the event breadcrumbs')}>
<div ref={setContainer}>
<BreadcrumbsTimeline
breadcrumbs={summaryCrumbs}
startTimeString={startTimeString}
// We want the timeline to appear connected to the 'View All' button
showLastLine={hasViewAll}
fullyExpanded={false}
containerElement={container}
/>
</div>
{hasViewAll && (
<ViewAllContainer>
<VerticalEllipsis />
<div>
<ViewAllButton
size="sm"
// Since we've disabled the button as an 'outside click' for the drawer we can change
// the operation based on the drawer state.
onClick={() => (isDrawerOpen ? closeDrawer() : onViewAllBreadcrumbs())}
aria-label={t('View All Breadcrumbs')}
ref={viewAllButtonRef}
>
{t('View All')}
</ViewAllButton>
</div>
</ViewAllContainer>
)}
</ErrorBoundary>
</InterimSection>
<GuideAnchor target="breadcrumbs" position="top">
<InterimSection
Copy link
Member Author

Choose a reason for hiding this comment

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

whitespace changes

key="breadcrumbs"
type={SectionKey.BREADCRUMBS}
title={t('Breadcrumbs')}
data-test-id="breadcrumbs-data-section"
actions={actions}
>
<ErrorBoundary
mini
message={t('There was an error loading the event breadcrumbs')}
>
<div ref={setContainer}>
<BreadcrumbsTimeline
breadcrumbs={summaryCrumbs}
startTimeString={startTimeString}
// We want the timeline to appear connected to the 'View All' button
showLastLine={hasViewAll}
fullyExpanded={false}
containerElement={container}
/>
</div>
{hasViewAll && (
<ViewAllContainer>
<VerticalEllipsis />
<div>
<ViewAllButton
size="sm"
// Since we've disabled the button as an 'outside click' for the drawer we can change
// the operation based on the drawer state.
onClick={() => (isDrawerOpen ? closeDrawer() : onViewAllBreadcrumbs())}
aria-label={t('View All Breadcrumbs')}
ref={viewAllButtonRef}
>
{t('View All')}
</ViewAllButton>
</div>
</ViewAllContainer>
)}
</ErrorBoundary>
</InterimSection>
</GuideAnchor>
);
}

Expand Down
Loading