issues.tsx 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759
  1. import {Fragment, useMemo} from 'react';
  2. import {css, type Theme} from '@emotion/react';
  3. import styled from '@emotion/styled';
  4. import {AssigneeBadge} from 'sentry/components/assigneeBadge';
  5. import GroupStatusChart from 'sentry/components/charts/groupStatusChart';
  6. import EventOrGroupExtraDetails from 'sentry/components/eventOrGroupExtraDetails';
  7. import EventOrGroupHeader from 'sentry/components/eventOrGroupHeader';
  8. import {getBadgeProperties} from 'sentry/components/group/inboxBadges/statusBadge';
  9. import IssueStreamHeaderLabel from 'sentry/components/IssueStreamHeaderLabel';
  10. import LoadingError from 'sentry/components/loadingError';
  11. import LoadingIndicator from 'sentry/components/loadingIndicator';
  12. import Panel from 'sentry/components/panels/panel';
  13. import PanelHeader from 'sentry/components/panels/panelHeader';
  14. import PanelItem from 'sentry/components/panels/panelItem';
  15. import {PrimaryCount} from 'sentry/components/stream/group';
  16. import {IconOpen} from 'sentry/icons';
  17. import {t, tct, tn} from 'sentry/locale';
  18. import {space} from 'sentry/styles/space';
  19. import type {Group} from 'sentry/types/group';
  20. import type {Organization} from 'sentry/types/organization';
  21. import type {
  22. TraceError,
  23. TraceErrorOrIssue,
  24. TracePerformanceIssue,
  25. } from 'sentry/utils/performance/quickTrace/types';
  26. import {useApiQuery} from 'sentry/utils/queryClient';
  27. import type RequestError from 'sentry/utils/requestError/requestError';
  28. import useOrganization from 'sentry/utils/useOrganization';
  29. import {HeaderDivider} from 'sentry/views/issueList/actions';
  30. import {NarrowAssigneeLabel} from 'sentry/views/issueList/actions/headers';
  31. import {isTracePerformanceIssue} from '../../../traceGuards';
  32. import {TraceIcons} from '../../../traceIcons';
  33. import type {TraceTree} from '../../../traceModels/traceTree';
  34. import type {TraceTreeNode} from '../../../traceModels/traceTreeNode';
  35. import {useHasTraceNewUi} from '../../../useHasTraceNewUi';
  36. import {TraceDrawerComponents} from '../styles';
  37. import {IssueSummary} from './issueSummary';
  38. type IssueProps = {
  39. issue: TraceErrorOrIssue;
  40. organization: Organization;
  41. };
  42. const MAX_DISPLAYED_ISSUES_COUNT = 3;
  43. const TABLE_WIDTH_BREAKPOINTS = {
  44. FIRST: 800,
  45. SECOND: 600,
  46. THIRD: 500,
  47. FOURTH: 400,
  48. };
  49. const issueOrderPriority: Record<keyof Theme['level'], number> = {
  50. fatal: 0,
  51. error: 1,
  52. warning: 2,
  53. sample: 3,
  54. info: 4,
  55. default: 5,
  56. unknown: 6,
  57. };
  58. function sortIssuesByLevel(a: TraceError, b: TraceError): number {
  59. // If the level is not defined in the priority map, default to unknown
  60. const aPriority = issueOrderPriority[a.level] ?? issueOrderPriority.unknown;
  61. const bPriority = issueOrderPriority[b.level] ?? issueOrderPriority.unknown;
  62. return aPriority - bPriority;
  63. }
  64. function Issue(props: IssueProps) {
  65. const {organization} = props;
  66. const hasTraceNewUi = useHasTraceNewUi();
  67. const {
  68. isPending,
  69. data: fetchedIssue,
  70. isError,
  71. error,
  72. } = useApiQuery<Group>(
  73. [
  74. `/issues/${props.issue.issue_id}/`,
  75. {
  76. query: {
  77. collapse: 'release',
  78. expand: 'inbox',
  79. },
  80. },
  81. ],
  82. {
  83. enabled: !!props.issue.issue_id,
  84. staleTime: 2 * 60 * 1000,
  85. }
  86. );
  87. const hasNewLayout = organization.features.includes('issue-stream-table-layout');
  88. if (!hasTraceNewUi) {
  89. return (
  90. <LegacyIssue
  91. {...props}
  92. isError={isError}
  93. fetchedIssue={fetchedIssue}
  94. error={error}
  95. isPending={isPending}
  96. />
  97. );
  98. }
  99. const isPerformanceIssue: boolean = isTracePerformanceIssue(props.issue);
  100. const iconClassName: string = isPerformanceIssue
  101. ? 'performance_issue'
  102. : props.issue.level;
  103. return isPending ? (
  104. <StyledLoadingIndicatorWrapper>
  105. <LoadingIndicator size={24} mini />
  106. </StyledLoadingIndicatorWrapper>
  107. ) : fetchedIssue ? (
  108. <StyledPanelItem hasNewLayout={hasNewLayout}>
  109. <IconWrapper className={iconClassName}>
  110. <IconBackground className={iconClassName}>
  111. <TraceIcons.Icon event={props.issue} />
  112. </IconBackground>
  113. </IconWrapper>
  114. {hasNewLayout ? (
  115. <NarrowSummaryWrapper>
  116. <EventOrGroupHeader
  117. data={fetchedIssue}
  118. organization={organization}
  119. eventId={props.issue.event_id}
  120. />
  121. <EventOrGroupExtraDetails data={fetchedIssue} />
  122. </NarrowSummaryWrapper>
  123. ) : (
  124. <SummaryWrapper>
  125. <IssueSummary
  126. data={fetchedIssue}
  127. organization={props.organization}
  128. event_id={props.issue.event_id}
  129. />
  130. <EventOrGroupExtraDetails data={fetchedIssue} />
  131. </SummaryWrapper>
  132. )}
  133. </StyledPanelItem>
  134. ) : isError ? (
  135. <LoadingError
  136. message={
  137. error.status === 404 ? t('This issue was deleted') : t('Failed to fetch issue')
  138. }
  139. />
  140. ) : null;
  141. }
  142. const IconBackground = styled('div')`
  143. width: 24px;
  144. height: 24px;
  145. border-radius: 50%;
  146. padding: 3px;
  147. display: flex;
  148. align-items: center;
  149. justify-content: center;
  150. svg {
  151. width: 16px;
  152. height: 16px;
  153. fill: ${p => p.theme.white};
  154. }
  155. `;
  156. const IconWrapper = styled('div')`
  157. border-radius: 50%;
  158. padding: ${space(0.25)};
  159. &.info {
  160. border: 1px solid var(--info);
  161. ${IconBackground} {
  162. background-color: var(--info);
  163. }
  164. }
  165. &.warning {
  166. border: 1px solid var(--warning);
  167. ${IconBackground} {
  168. background-color: var(--warning);
  169. }
  170. }
  171. &.debug {
  172. border: 1px solid var(--debug);
  173. ${IconBackground} {
  174. background-color: var(--debug);
  175. }
  176. }
  177. &.error,
  178. &.fatal {
  179. border: 1px solid var(--error);
  180. ${IconBackground} {
  181. background-color: var(--error);
  182. }
  183. }
  184. &.performance_issue {
  185. border: 1px solid var(--performance-issue);
  186. ${IconBackground} {
  187. background-color: var(--performance-issue);
  188. }
  189. }
  190. &.default {
  191. border: 1px solid var(--default);
  192. ${IconBackground} {
  193. background-color: var(--default);
  194. }
  195. }
  196. &.unknown {
  197. border: 1px solid var(--unknown);
  198. ${IconBackground} {
  199. background-color: var(--unknown);
  200. }
  201. }
  202. &.info,
  203. &.warning,
  204. &.performance_issue,
  205. &.default,
  206. &.unknown {
  207. svg {
  208. transform: translateY(-1px);
  209. }
  210. }
  211. `;
  212. const NarrowSummaryWrapper = styled('div')`
  213. display: flex;
  214. flex-direction: column;
  215. overflow: hidden;
  216. width: 100%;
  217. justify-content: left;
  218. `;
  219. const SummaryWrapper = styled('div')`
  220. overflow: hidden;
  221. flex: 1;
  222. `;
  223. function LegacyIssue(
  224. props: IssueProps & {
  225. error: RequestError | null;
  226. fetchedIssue: Group | undefined;
  227. isError: boolean;
  228. isPending: boolean;
  229. }
  230. ) {
  231. const {organization} = props;
  232. const hasNewLayout = organization.features.includes('issue-stream-table-layout');
  233. return props.isPending ? (
  234. <StyledLoadingIndicatorWrapper>
  235. <LoadingIndicator size={24} mini />
  236. </StyledLoadingIndicatorWrapper>
  237. ) : props.fetchedIssue ? (
  238. <StyledLegacyPanelItem hasNewLayout={hasNewLayout}>
  239. {hasNewLayout ? (
  240. <NarrowIssueSummaryWrapper>
  241. <EventOrGroupHeader data={props.fetchedIssue} organization={organization} />
  242. <EventOrGroupExtraDetails data={props.fetchedIssue} />
  243. </NarrowIssueSummaryWrapper>
  244. ) : (
  245. <IssueSummaryWrapper>
  246. <IssueSummary
  247. data={props.fetchedIssue}
  248. organization={props.organization}
  249. event_id={props.issue.event_id}
  250. />
  251. <EventOrGroupExtraDetails data={props.fetchedIssue} />
  252. </IssueSummaryWrapper>
  253. )}
  254. <ChartWrapper>
  255. <GroupStatusChart
  256. stats={
  257. props.fetchedIssue.filtered
  258. ? props.fetchedIssue.filtered.stats?.['24h']!
  259. : props.fetchedIssue.stats?.['24h']!
  260. }
  261. secondaryStats={
  262. props.fetchedIssue.filtered ? props.fetchedIssue.stats?.['24h'] : []
  263. }
  264. groupStatus={
  265. getBadgeProperties(props.fetchedIssue.status, props.fetchedIssue.substatus)
  266. ?.status
  267. }
  268. hideZeros
  269. showSecondaryPoints
  270. showMarkLine
  271. />
  272. </ChartWrapper>
  273. <EventsWrapper>
  274. {hasNewLayout ? (
  275. <NarrowEventsOrUsersWrapper>
  276. <PrimaryCount
  277. value={
  278. props.fetchedIssue.filtered
  279. ? props.fetchedIssue.filtered.count
  280. : props.fetchedIssue.count
  281. }
  282. />
  283. </NarrowEventsOrUsersWrapper>
  284. ) : (
  285. <PrimaryCount
  286. value={
  287. props.fetchedIssue.filtered
  288. ? props.fetchedIssue.filtered.count
  289. : props.fetchedIssue.count
  290. }
  291. />
  292. )}
  293. </EventsWrapper>
  294. {hasNewLayout ? (
  295. <NarrowEventsOrUsersWrapper>
  296. <PrimaryCount
  297. value={
  298. props.fetchedIssue.filtered
  299. ? props.fetchedIssue.filtered.userCount
  300. : props.fetchedIssue.userCount
  301. }
  302. />
  303. </NarrowEventsOrUsersWrapper>
  304. ) : (
  305. <UserCountWrapper>
  306. <PrimaryCount
  307. value={
  308. props.fetchedIssue.filtered
  309. ? props.fetchedIssue.filtered.userCount
  310. : props.fetchedIssue.userCount
  311. }
  312. />
  313. </UserCountWrapper>
  314. )}
  315. {hasNewLayout ? (
  316. <NarrowAssigneeWrapper>
  317. <AssigneeBadge assignedTo={props.fetchedIssue.assignedTo ?? undefined} />
  318. </NarrowAssigneeWrapper>
  319. ) : (
  320. <AssigneeWrapper>
  321. <AssigneeBadge assignedTo={props.fetchedIssue.assignedTo ?? undefined} />
  322. </AssigneeWrapper>
  323. )}
  324. </StyledLegacyPanelItem>
  325. ) : props.isError ? (
  326. <LoadingError
  327. message={
  328. props.error?.status === 404
  329. ? t('This issue was deleted')
  330. : t('Failed to fetch issue')
  331. }
  332. />
  333. ) : null;
  334. }
  335. type IssueListProps = {
  336. issues: TraceErrorOrIssue[];
  337. node: TraceTreeNode<TraceTree.NodeValue>;
  338. organization: Organization;
  339. };
  340. export function IssueList({issues, node, organization}: IssueListProps) {
  341. const hasTraceNewUi = useHasTraceNewUi();
  342. const uniqueErrorIssues = useMemo(() => {
  343. const unique: TraceError[] = [];
  344. const seenIssues: Set<number> = new Set();
  345. for (const issue of node.errors) {
  346. if (seenIssues.has(issue.issue_id)) {
  347. continue;
  348. }
  349. seenIssues.add(issue.issue_id);
  350. unique.push(issue);
  351. }
  352. return unique;
  353. // eslint-disable-next-line react-hooks/exhaustive-deps
  354. }, [node, node.errors.size]);
  355. const uniquePerformanceIssues = useMemo(() => {
  356. const unique: TracePerformanceIssue[] = [];
  357. const seenIssues: Set<number> = new Set();
  358. for (const issue of node.performance_issues) {
  359. if (seenIssues.has(issue.issue_id)) {
  360. continue;
  361. }
  362. seenIssues.add(issue.issue_id);
  363. unique.push(issue);
  364. }
  365. return unique;
  366. // eslint-disable-next-line react-hooks/exhaustive-deps
  367. }, [node, node.performance_issues.size]);
  368. const uniqueIssues = useMemo(() => {
  369. return [...uniquePerformanceIssues, ...uniqueErrorIssues.sort(sortIssuesByLevel)];
  370. }, [uniqueErrorIssues, uniquePerformanceIssues]);
  371. if (!issues.length) {
  372. return null;
  373. }
  374. if (!hasTraceNewUi) {
  375. return (
  376. <StyledPanel>
  377. <IssueListHeader
  378. node={node}
  379. errorIssues={uniqueErrorIssues}
  380. performanceIssues={uniquePerformanceIssues}
  381. />
  382. {uniqueIssues.slice(0, MAX_DISPLAYED_ISSUES_COUNT).map((issue, index) => (
  383. <Issue key={index} issue={issue} organization={organization} />
  384. ))}
  385. </StyledPanel>
  386. );
  387. }
  388. return (
  389. <IssuesWrapper>
  390. <StyledPanel>
  391. {uniqueIssues.slice(0, MAX_DISPLAYED_ISSUES_COUNT).map((issue, index) => (
  392. <Issue key={index} issue={issue} organization={organization} />
  393. ))}
  394. </StyledPanel>
  395. {uniqueIssues.length > MAX_DISPLAYED_ISSUES_COUNT ? (
  396. <TraceDrawerComponents.IssuesLink node={node}>
  397. <IssueLinkWrapper>
  398. <IconOpen />
  399. {t(
  400. `Open %s more in Issues`,
  401. uniqueIssues.length - MAX_DISPLAYED_ISSUES_COUNT
  402. )}
  403. </IssueLinkWrapper>
  404. </TraceDrawerComponents.IssuesLink>
  405. ) : null}
  406. </IssuesWrapper>
  407. );
  408. }
  409. const IssueLinkWrapper = styled('div')`
  410. display: flex;
  411. align-items: center;
  412. gap: ${space(0.5)};
  413. margin-left: ${space(0.25)};
  414. `;
  415. function IssueListHeader({
  416. node,
  417. errorIssues,
  418. performanceIssues,
  419. }: {
  420. errorIssues: TraceError[];
  421. node: TraceTreeNode<TraceTree.NodeValue>;
  422. performanceIssues: TracePerformanceIssue[];
  423. }) {
  424. const organization = useOrganization();
  425. const [singular, plural] = useMemo((): [string, string] => {
  426. const label = [t('Issue'), t('Issues')] as [string, string];
  427. for (const event of errorIssues) {
  428. if (event.level === 'error' || event.level === 'fatal') {
  429. return [t('Error'), t('Errors')];
  430. }
  431. }
  432. return label;
  433. }, [errorIssues]);
  434. const hasNewLayout = organization.features.includes('issue-stream-table-layout');
  435. const issueHeadingContent =
  436. errorIssues.length + performanceIssues.length > MAX_DISPLAYED_ISSUES_COUNT
  437. ? tct(`[count]+ issues, [link]`, {
  438. count: MAX_DISPLAYED_ISSUES_COUNT,
  439. link: <StyledIssuesLink node={node}>{t('View All')}</StyledIssuesLink>,
  440. })
  441. : errorIssues.length > 0 && performanceIssues.length === 0
  442. ? tct('[count] [text]', {
  443. count: errorIssues.length,
  444. text: errorIssues.length > 1 ? plural : singular,
  445. })
  446. : performanceIssues.length > 0 && errorIssues.length === 0
  447. ? tct('[count] [text]', {
  448. count: performanceIssues.length,
  449. text: tn(
  450. 'Performance issue',
  451. 'Performance Issues',
  452. performanceIssues.length
  453. ),
  454. })
  455. : tct(
  456. '[errors] [errorsText] and [performance_issues] [performanceIssuesText]',
  457. {
  458. errors: errorIssues.length,
  459. performance_issues: performanceIssues.length,
  460. errorsText: errorIssues.length > 1 ? plural : singular,
  461. performanceIssuesText: tn(
  462. 'performance issue',
  463. 'performance issues',
  464. performanceIssues.length
  465. ),
  466. }
  467. );
  468. return (
  469. <StyledPanelHeader disablePadding hasNewLayout={hasNewLayout}>
  470. {hasNewLayout ? (
  471. <StyledIssueStreamHeaderLabel>
  472. {issueHeadingContent}
  473. <HeaderDivider />
  474. </StyledIssueStreamHeaderLabel>
  475. ) : (
  476. <IssueHeading>{issueHeadingContent}</IssueHeading>
  477. )}
  478. {hasNewLayout ? (
  479. <Fragment>
  480. <NarrowGraphLabel>
  481. {t('Trend')}
  482. <HeaderDivider />
  483. </NarrowGraphLabel>
  484. <NarrowEventsLabel>
  485. {t('Events')}
  486. <HeaderDivider />
  487. </NarrowEventsLabel>
  488. <NarrowUsersLabel>
  489. {t('Users')}
  490. <HeaderDivider />
  491. </NarrowUsersLabel>
  492. <NarrowAssigneeLabel>{t('Assignee')}</NarrowAssigneeLabel>
  493. </Fragment>
  494. ) : (
  495. <Fragment>
  496. <GraphHeading>{t('Graph')}</GraphHeading>
  497. <EventsHeading>{t('Events')}</EventsHeading>
  498. <UsersHeading>{t('Users')}</UsersHeading>
  499. <AssigneeHeading>{t('Assignee')}</AssigneeHeading>
  500. </Fragment>
  501. )}
  502. </StyledPanelHeader>
  503. );
  504. }
  505. const StyledIssuesLink = styled(TraceDrawerComponents.IssuesLink)`
  506. margin-left: ${space(0.5)};
  507. `;
  508. const Heading = styled('div')`
  509. display: flex;
  510. align-self: center;
  511. margin: 0 ${space(2)};
  512. width: 60px;
  513. color: ${p => p.theme.subText};
  514. `;
  515. const IssueHeading = styled(Heading)`
  516. flex: 1;
  517. width: 66.66%;
  518. @media (min-width: ${p => p.theme.breakpoints.medium}) {
  519. width: 50%;
  520. }
  521. `;
  522. const GraphHeading = styled(Heading)`
  523. width: 160px;
  524. display: flex;
  525. justify-content: center;
  526. @container (width < ${TABLE_WIDTH_BREAKPOINTS.FIRST}px) {
  527. display: none;
  528. }
  529. `;
  530. const NarrowGraphLabel = styled(IssueStreamHeaderLabel)`
  531. width: 200px;
  532. display: flex;
  533. justify-content: space-between;
  534. @container (width < ${TABLE_WIDTH_BREAKPOINTS.FIRST}px) {
  535. display: none;
  536. }
  537. `;
  538. const EventsHeading = styled(Heading)`
  539. @container (width < ${TABLE_WIDTH_BREAKPOINTS.SECOND}px) {
  540. display: none;
  541. }
  542. `;
  543. const NarrowEventsLabel = styled(EventsHeading)`
  544. display: flex;
  545. justify-content: space-between;
  546. width: 60px;
  547. margin-left: 0;
  548. `;
  549. const UsersHeading = styled(Heading)`
  550. display: flex;
  551. justify-content: center;
  552. @container (width < ${TABLE_WIDTH_BREAKPOINTS.THIRD}px) {
  553. display: none;
  554. }
  555. `;
  556. const NarrowUsersLabel = styled(UsersHeading)`
  557. display: flex;
  558. justify-content: space-between;
  559. width: 60px;
  560. margin-left: 0;
  561. `;
  562. const AssigneeHeading = styled(Heading)`
  563. @container (width < ${TABLE_WIDTH_BREAKPOINTS.FOURTH}px) {
  564. display: none;
  565. }
  566. `;
  567. const StyledPanel = styled(Panel)`
  568. container-type: inline-size;
  569. `;
  570. const IssuesWrapper = styled('div')`
  571. display: flex;
  572. flex-direction: column;
  573. gap: ${space(0.75)};
  574. justify-content: left;
  575. margin-bottom: ${space(1.5)};
  576. margin-top: ${space(1)};
  577. ${StyledPanel} {
  578. margin-bottom: 0;
  579. }
  580. `;
  581. const StyledPanelHeader = styled(PanelHeader)<{hasNewLayout: boolean}>`
  582. padding-top: ${space(1)};
  583. padding-bottom: ${space(1)};
  584. ${p =>
  585. p.hasNewLayout &&
  586. css`
  587. text-transform: none;
  588. `}
  589. `;
  590. const StyledLoadingIndicatorWrapper = styled('div')`
  591. display: flex;
  592. align-items: center;
  593. justify-content: center;
  594. width: 100%;
  595. padding: ${space(2)} 0;
  596. height: 84px;
  597. /* Add a border between two rows of loading issue states */
  598. & + & {
  599. border-top: 1px solid ${p => p.theme.border};
  600. }
  601. `;
  602. const IssueSummaryWrapper = styled('div')`
  603. overflow: hidden;
  604. flex: 1;
  605. width: 66.66%;
  606. @media (min-width: ${p => p.theme.breakpoints.medium}) {
  607. width: 50%;
  608. }
  609. `;
  610. const ColumnWrapper = styled('div')`
  611. display: flex;
  612. justify-content: flex-end;
  613. align-self: center;
  614. width: 60px;
  615. margin: 0 ${space(2)};
  616. `;
  617. const EventsWrapper = styled(ColumnWrapper)`
  618. @container (width < ${TABLE_WIDTH_BREAKPOINTS.SECOND}px) {
  619. display: none;
  620. }
  621. `;
  622. const UserCountWrapper = styled(ColumnWrapper)`
  623. @container (width < ${TABLE_WIDTH_BREAKPOINTS.THIRD}px) {
  624. display: none;
  625. }
  626. `;
  627. const NarrowEventsOrUsersWrapper = styled(UserCountWrapper)`
  628. margin-left: 0;
  629. justify-content: center;
  630. `;
  631. const AssigneeWrapper = styled(ColumnWrapper)`
  632. @container (width < ${TABLE_WIDTH_BREAKPOINTS.FOURTH}px) {
  633. display: none;
  634. }
  635. `;
  636. const NarrowAssigneeWrapper = styled(ColumnWrapper)`
  637. margin-right: ${space(2)};
  638. `;
  639. const ChartWrapper = styled('div')`
  640. margin-left: ${space(4)};
  641. width: 200px;
  642. align-self: center;
  643. @container (width < ${TABLE_WIDTH_BREAKPOINTS.FIRST}px) {
  644. display: none;
  645. }
  646. `;
  647. const StyledLegacyPanelItem = styled(PanelItem)<{hasNewLayout: boolean}>`
  648. justify-content: space-between;
  649. align-items: center;
  650. padding-top: ${p => (p.hasNewLayout ? '0px' : space(1))};
  651. padding-bottom: ${p => (p.hasNewLayout ? '0px' : space(1))};
  652. ${p =>
  653. p.hasNewLayout
  654. ? css`
  655. padding: ${space(1)} 0;
  656. min-height: 66px;
  657. line-height: 1.1;
  658. `
  659. : css`
  660. height: 84px;
  661. `}
  662. `;
  663. const StyledPanelItem = styled(StyledLegacyPanelItem)`
  664. justify-content: left;
  665. align-items: center;
  666. gap: ${space(1.5)};
  667. height: fit-content;
  668. padding: ${space(1)} ${space(2)};
  669. `;
  670. const StyledIssueStreamHeaderLabel = styled(IssueStreamHeaderLabel)`
  671. display: flex;
  672. margin-left: ${space(2)};
  673. width: 66.66%;
  674. `;
  675. const NarrowIssueSummaryWrapper = styled('div')`
  676. display: flex;
  677. flex-direction: column;
  678. overflow: hidden;
  679. margin-left: ${space(2)};
  680. margin-right: ${space(2)};
  681. width: 66.66%;
  682. justify-content: center;
  683. `;