From 5c65cbade11850af8ee5e42c0df1f166e6612ea4 Mon Sep 17 00:00:00 2001 From: Michelle Zhang <56095982+michellewzhang@users.noreply.github.com> Date: Wed, 17 Apr 2024 10:20:08 -0700 Subject: [PATCH] ref(replays): add error boundaries around breadcrumb rows --- .../replays/breadcrumbs/breadcrumbItem.tsx | 130 +++++++++--------- 1 file changed, 67 insertions(+), 63 deletions(-) diff --git a/static/app/components/replays/breadcrumbs/breadcrumbItem.tsx b/static/app/components/replays/breadcrumbs/breadcrumbItem.tsx index a5c227e074fa60..3906d4a33ac359 100644 --- a/static/app/components/replays/breadcrumbs/breadcrumbItem.tsx +++ b/static/app/components/replays/breadcrumbs/breadcrumbItem.tsx @@ -5,6 +5,7 @@ import beautify from 'js-beautify'; import ProjectAvatar from 'sentry/components/avatar/projectAvatar'; import {CodeSnippet} from 'sentry/components/codeSnippet'; +import ErrorBoundary from 'sentry/components/errorBoundary'; import Link from 'sentry/components/links/link'; import ObjectInspector from 'sentry/components/objectInspector'; import PanelItem from 'sentry/components/panels/panelItem'; @@ -80,71 +81,74 @@ function BreadcrumbItem({ {icon} - - - - {{title}} - {onClick ? ( - - ) : null} - - - {typeof description === 'string' || - (description !== undefined && isValidElement(description)) ? ( - - {description} - - ) : ( - - + + + + {{title}} + {onClick ? ( + + ) : null} + + + {typeof description === 'string' || + (description !== undefined && isValidElement(description)) ? ( + + {description} + + ) : ( + + + + )} + + + {'data' in frame && frame.data && 'mutations' in frame.data ? ( +
+ - - )} - - - {'data' in frame && frame.data && 'mutations' in frame.data ? ( -
- + ) : null} + + {extraction?.html ? ( + + + {beautify.html(extraction?.html, {indent_size: 2})} + + + ) : null} + + {traces?.flattenedTraces.map((flatTrace, i) => ( + -
- ) : null} - - {extraction?.html ? ( - - - {beautify.html(extraction?.html, {indent_size: 2})} - - - ) : null} - - {traces?.flattenedTraces.map((flatTrace, i) => ( - - ))} - - {isErrorFrame(frame) || isFeedbackFrame(frame) ? ( - - ) : null} - + ))} + + {isErrorFrame(frame) || isFeedbackFrame(frame) ? ( + + ) : null} + + ); }