issues.tsx 19 KB

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