|
1 | 1 | import {useCallback, useMemo, useRef, useState} from 'react';
|
2 | 2 | import styled from '@emotion/styled';
|
3 | 3 |
|
| 4 | +import GuideAnchor from 'sentry/components/assistant/guideAnchor'; |
4 | 5 | import {Button} from 'sentry/components/button';
|
5 | 6 | import ButtonBar from 'sentry/components/buttonBar';
|
6 | 7 | import ErrorBoundary from 'sentry/components/errorBoundary';
|
@@ -176,43 +177,48 @@ export default function BreadcrumbsDataSection({
|
176 | 177 | const hasViewAll = summaryCrumbs.length !== enhancedCrumbs.length;
|
177 | 178 |
|
178 | 179 | return (
|
179 |
| - <InterimSection |
180 |
| - key="breadcrumbs" |
181 |
| - type={SectionKey.BREADCRUMBS} |
182 |
| - title={t('Breadcrumbs')} |
183 |
| - data-test-id="breadcrumbs-data-section" |
184 |
| - actions={actions} |
185 |
| - > |
186 |
| - <ErrorBoundary mini message={t('There was an error loading the event breadcrumbs')}> |
187 |
| - <div ref={setContainer}> |
188 |
| - <BreadcrumbsTimeline |
189 |
| - breadcrumbs={summaryCrumbs} |
190 |
| - startTimeString={startTimeString} |
191 |
| - // We want the timeline to appear connected to the 'View All' button |
192 |
| - showLastLine={hasViewAll} |
193 |
| - fullyExpanded={false} |
194 |
| - containerElement={container} |
195 |
| - /> |
196 |
| - </div> |
197 |
| - {hasViewAll && ( |
198 |
| - <ViewAllContainer> |
199 |
| - <VerticalEllipsis /> |
200 |
| - <div> |
201 |
| - <ViewAllButton |
202 |
| - size="sm" |
203 |
| - // Since we've disabled the button as an 'outside click' for the drawer we can change |
204 |
| - // the operation based on the drawer state. |
205 |
| - onClick={() => (isDrawerOpen ? closeDrawer() : onViewAllBreadcrumbs())} |
206 |
| - aria-label={t('View All Breadcrumbs')} |
207 |
| - ref={viewAllButtonRef} |
208 |
| - > |
209 |
| - {t('View All')} |
210 |
| - </ViewAllButton> |
211 |
| - </div> |
212 |
| - </ViewAllContainer> |
213 |
| - )} |
214 |
| - </ErrorBoundary> |
215 |
| - </InterimSection> |
| 180 | + <GuideAnchor target="breadcrumbs" position="top"> |
| 181 | + <InterimSection |
| 182 | + key="breadcrumbs" |
| 183 | + type={SectionKey.BREADCRUMBS} |
| 184 | + title={t('Breadcrumbs')} |
| 185 | + data-test-id="breadcrumbs-data-section" |
| 186 | + actions={actions} |
| 187 | + > |
| 188 | + <ErrorBoundary |
| 189 | + mini |
| 190 | + message={t('There was an error loading the event breadcrumbs')} |
| 191 | + > |
| 192 | + <div ref={setContainer}> |
| 193 | + <BreadcrumbsTimeline |
| 194 | + breadcrumbs={summaryCrumbs} |
| 195 | + startTimeString={startTimeString} |
| 196 | + // We want the timeline to appear connected to the 'View All' button |
| 197 | + showLastLine={hasViewAll} |
| 198 | + fullyExpanded={false} |
| 199 | + containerElement={container} |
| 200 | + /> |
| 201 | + </div> |
| 202 | + {hasViewAll && ( |
| 203 | + <ViewAllContainer> |
| 204 | + <VerticalEllipsis /> |
| 205 | + <div> |
| 206 | + <ViewAllButton |
| 207 | + size="sm" |
| 208 | + // Since we've disabled the button as an 'outside click' for the drawer we can change |
| 209 | + // the operation based on the drawer state. |
| 210 | + onClick={() => (isDrawerOpen ? closeDrawer() : onViewAllBreadcrumbs())} |
| 211 | + aria-label={t('View All Breadcrumbs')} |
| 212 | + ref={viewAllButtonRef} |
| 213 | + > |
| 214 | + {t('View All')} |
| 215 | + </ViewAllButton> |
| 216 | + </div> |
| 217 | + </ViewAllContainer> |
| 218 | + )} |
| 219 | + </ErrorBoundary> |
| 220 | + </InterimSection> |
| 221 | + </GuideAnchor> |
216 | 222 | );
|
217 | 223 | }
|
218 | 224 |
|
|
0 commit comments