group.tsx 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693
  1. import {Fragment, useCallback, useMemo, useRef} from 'react';
  2. import {css, Theme} from '@emotion/react';
  3. import styled from '@emotion/styled';
  4. import classNames from 'classnames';
  5. import type {LocationDescriptor} from 'history';
  6. import AssigneeSelector from 'sentry/components/assigneeSelector';
  7. import GuideAnchor from 'sentry/components/assistant/guideAnchor';
  8. import Checkbox from 'sentry/components/checkbox';
  9. import Count from 'sentry/components/count';
  10. import DeprecatedDropdownMenu from 'sentry/components/deprecatedDropdownMenu';
  11. import EventOrGroupExtraDetails from 'sentry/components/eventOrGroupExtraDetails';
  12. import EventOrGroupHeader from 'sentry/components/eventOrGroupHeader';
  13. import Link from 'sentry/components/links/link';
  14. import MenuItem from 'sentry/components/menuItem';
  15. import {getRelativeSummary} from 'sentry/components/organizations/timeRangeSelector/utils';
  16. import {PanelItem} from 'sentry/components/panels';
  17. import Placeholder from 'sentry/components/placeholder';
  18. import ProgressBar from 'sentry/components/progressBar';
  19. import {joinQuery, parseSearch, Token} from 'sentry/components/searchSyntax/parser';
  20. import GroupChart from 'sentry/components/stream/groupChart';
  21. import TimeSince from 'sentry/components/timeSince';
  22. import {DEFAULT_STATS_PERIOD} from 'sentry/constants';
  23. import {t} from 'sentry/locale';
  24. import GroupStore from 'sentry/stores/groupStore';
  25. import SelectedGroupStore from 'sentry/stores/selectedGroupStore';
  26. import {useLegacyStore} from 'sentry/stores/useLegacyStore';
  27. import space from 'sentry/styles/space';
  28. import {
  29. Group,
  30. GroupReprocessing,
  31. InboxDetails,
  32. NewQuery,
  33. Organization,
  34. User,
  35. } from 'sentry/types';
  36. import {defined, percent} from 'sentry/utils';
  37. import trackAdvancedAnalyticsEvent from 'sentry/utils/analytics/trackAdvancedAnalyticsEvent';
  38. import EventView from 'sentry/utils/discover/eventView';
  39. import usePageFilters from 'sentry/utils/usePageFilters';
  40. import withOrganization from 'sentry/utils/withOrganization';
  41. import {TimePeriodType} from 'sentry/views/alerts/rules/metric/details/constants';
  42. import {
  43. DISCOVER_EXCLUSION_FIELDS,
  44. getTabs,
  45. isForReviewQuery,
  46. Query,
  47. } from 'sentry/views/issueList/utils';
  48. export const DEFAULT_STREAM_GROUP_STATS_PERIOD = '24h';
  49. type Props = {
  50. id: string;
  51. organization: Organization;
  52. canSelect?: boolean;
  53. customStatsPeriod?: TimePeriodType;
  54. displayReprocessingLayout?: boolean;
  55. hasGuideAnchor?: boolean;
  56. index?: number;
  57. memberList?: User[];
  58. narrowGroups?: boolean;
  59. query?: string;
  60. queryFilterDescription?: string;
  61. showInboxTime?: boolean;
  62. source?: string;
  63. statsPeriod?: string;
  64. useFilteredStats?: boolean;
  65. useTintRow?: boolean;
  66. withChart?: boolean;
  67. };
  68. function BaseGroupRow({
  69. id,
  70. organization,
  71. customStatsPeriod,
  72. displayReprocessingLayout,
  73. hasGuideAnchor,
  74. index,
  75. memberList,
  76. query,
  77. queryFilterDescription,
  78. showInboxTime,
  79. source,
  80. statsPeriod = DEFAULT_STREAM_GROUP_STATS_PERIOD,
  81. canSelect = true,
  82. withChart = true,
  83. useFilteredStats = false,
  84. useTintRow = true,
  85. narrowGroups = false,
  86. }: Props) {
  87. const groups = useLegacyStore(GroupStore);
  88. const group = groups.find(item => item.id === id) as Group;
  89. const selectedGroups = useLegacyStore(SelectedGroupStore);
  90. const isSelected = selectedGroups[id];
  91. const {selection} = usePageFilters();
  92. const originalInboxState = useRef(group.inbox as InboxDetails | null);
  93. const referrer = source ? `${source}-issue-stream` : 'issue-stream';
  94. const reviewed =
  95. // Original state had an inbox reason
  96. originalInboxState.current?.reason !== undefined &&
  97. // Updated state has been removed from inbox
  98. !group.inbox &&
  99. // Only apply reviewed on the "for review" tab
  100. isForReviewQuery(query);
  101. const {period, start, end} = selection.datetime || {};
  102. const summary =
  103. customStatsPeriod?.label.toLowerCase() ??
  104. (!!start && !!end
  105. ? 'time range'
  106. : getRelativeSummary(period || DEFAULT_STATS_PERIOD).toLowerCase());
  107. const sharedAnalytics = useMemo(() => {
  108. const tab = getTabs(organization).find(([tabQuery]) => tabQuery === query)?.[1];
  109. const owners = group.owners ?? [];
  110. return {
  111. organization,
  112. group_id: group.id,
  113. tab: tab?.analyticsName || 'other',
  114. was_shown_suggestion: owners.length > 0,
  115. };
  116. }, [organization, group.id, group.owners, query]);
  117. const trackClick = useCallback(() => {
  118. if (query === Query.FOR_REVIEW) {
  119. trackAdvancedAnalyticsEvent('inbox_tab.issue_clicked', {
  120. organization,
  121. group_id: group.id,
  122. });
  123. }
  124. if (query !== undefined) {
  125. trackAdvancedAnalyticsEvent('issues_stream.issue_clicked', sharedAnalytics);
  126. }
  127. }, [organization, group.id, query, sharedAnalytics]);
  128. const trackAssign: React.ComponentProps<typeof AssigneeSelector>['onAssign'] =
  129. useCallback(
  130. (type, _assignee, suggestedAssignee) => {
  131. if (query !== undefined) {
  132. trackAdvancedAnalyticsEvent('issues_stream.issue_assigned', {
  133. ...sharedAnalytics,
  134. did_assign_suggestion: !!suggestedAssignee,
  135. assigned_suggestion_reason: suggestedAssignee?.suggestedReason,
  136. assigned_type: type,
  137. });
  138. }
  139. },
  140. [query, sharedAnalytics]
  141. );
  142. const wrapperToggle = useCallback(
  143. (evt: React.MouseEvent<HTMLDivElement>) => {
  144. const targetElement = evt.target as Partial<HTMLElement>;
  145. // Ignore clicks on links
  146. if (targetElement?.tagName?.toLowerCase() === 'a') {
  147. return;
  148. }
  149. // Ignore clicks on the selection checkbox
  150. if (targetElement?.tagName?.toLowerCase() === 'input') {
  151. return;
  152. }
  153. let e = targetElement;
  154. while (e.parentElement) {
  155. if (e?.tagName?.toLowerCase() === 'a') {
  156. return;
  157. }
  158. e = e.parentElement!;
  159. }
  160. if (evt.shiftKey) {
  161. SelectedGroupStore.shiftToggleItems(group.id);
  162. window.getSelection()?.removeAllRanges();
  163. } else {
  164. SelectedGroupStore.toggleSelect(group.id);
  165. }
  166. },
  167. [group.id]
  168. );
  169. const checkboxToggle = useCallback(
  170. (evt: React.ChangeEvent<HTMLInputElement>) => {
  171. const mouseEvent = evt.nativeEvent as MouseEvent;
  172. if (mouseEvent.shiftKey) {
  173. SelectedGroupStore.shiftToggleItems(group.id);
  174. } else {
  175. SelectedGroupStore.toggleSelect(group.id);
  176. }
  177. },
  178. [group.id]
  179. );
  180. const getDiscoverUrl = (isFiltered?: boolean): LocationDescriptor => {
  181. // when there is no discover feature open events page
  182. const hasDiscoverQuery = organization.features.includes('discover-basic');
  183. const parsedResult = parseSearch(
  184. isFiltered && typeof query === 'string' ? query : ''
  185. );
  186. const filteredTerms = parsedResult?.filter(
  187. p => !(p.type === Token.Filter && DISCOVER_EXCLUSION_FIELDS.includes(p.key.text))
  188. );
  189. const filteredQuery = joinQuery(filteredTerms, true);
  190. const commonQuery = {projects: [Number(group.project.id)]};
  191. if (hasDiscoverQuery) {
  192. const stats = customStatsPeriod ?? (selection.datetime || {});
  193. const discoverQuery: NewQuery = {
  194. ...commonQuery,
  195. id: undefined,
  196. name: group.title || group.type,
  197. fields: ['title', 'release', 'environment', 'user', 'timestamp'],
  198. orderby: '-timestamp',
  199. query: `issue.id:${group.id}${filteredQuery}`,
  200. version: 2,
  201. };
  202. if (!!stats.start && !!stats.end) {
  203. discoverQuery.start = new Date(stats.start).toISOString();
  204. discoverQuery.end = new Date(stats.end).toISOString();
  205. if (stats.utc) {
  206. discoverQuery.utc = true;
  207. }
  208. } else {
  209. discoverQuery.range = stats.period || DEFAULT_STATS_PERIOD;
  210. }
  211. const discoverView = EventView.fromSavedQuery(discoverQuery);
  212. return discoverView.getResultsViewUrlTarget(organization.slug);
  213. }
  214. return {
  215. pathname: `/organizations/${organization.slug}/issues/${group.id}/events/`,
  216. query: {
  217. referrer,
  218. ...commonQuery,
  219. query: filteredQuery,
  220. },
  221. };
  222. };
  223. const renderReprocessingColumns = () => {
  224. const {statusDetails, count} = group as GroupReprocessing;
  225. const {info, pendingEvents} = statusDetails;
  226. if (!info) {
  227. return null;
  228. }
  229. const {totalEvents, dateCreated} = info;
  230. const remainingEventsToReprocess = totalEvents - pendingEvents;
  231. const remainingEventsToReprocessPercent = percent(
  232. remainingEventsToReprocess,
  233. totalEvents
  234. );
  235. return (
  236. <Fragment>
  237. <StartedColumn>
  238. <TimeSince date={dateCreated} />
  239. </StartedColumn>
  240. <EventsReprocessedColumn>
  241. {!defined(count) ? (
  242. <Placeholder height="17px" />
  243. ) : (
  244. <Fragment>
  245. <Count value={remainingEventsToReprocess} />
  246. {'/'}
  247. <Count value={totalEvents} />
  248. </Fragment>
  249. )}
  250. </EventsReprocessedColumn>
  251. <ProgressColumn>
  252. <ProgressBar value={remainingEventsToReprocessPercent} />
  253. </ProgressColumn>
  254. </Fragment>
  255. );
  256. };
  257. // Use data.filtered to decide on which value to use
  258. // In case of the query has filters but we avoid showing both sets of filtered/unfiltered stats
  259. // we use useFilteredStats param passed to Group for deciding
  260. const primaryCount = group.filtered ? group.filtered.count : group.count;
  261. const secondaryCount = group.filtered ? group.count : undefined;
  262. const primaryUserCount = group.filtered ? group.filtered.userCount : group.userCount;
  263. const secondaryUserCount = group.filtered ? group.userCount : undefined;
  264. const showSecondaryPoints = Boolean(
  265. withChart && group && group.filtered && statsPeriod && useFilteredStats
  266. );
  267. const groupCount = !defined(primaryCount) ? (
  268. <Placeholder height="18px" />
  269. ) : (
  270. <DeprecatedDropdownMenu isNestedDropdown>
  271. {({isOpen, getRootProps, getActorProps, getMenuProps}) => {
  272. const topLevelCx = classNames('dropdown', {'anchor-middle': true, open: isOpen});
  273. return (
  274. <GuideAnchor target="dynamic_counts" disabled={!hasGuideAnchor}>
  275. <span {...getRootProps({className: topLevelCx})}>
  276. <span {...getActorProps({})}>
  277. <div className="dropdown-actor-title">
  278. <PrimaryCount value={primaryCount} />
  279. {secondaryCount !== undefined && useFilteredStats && (
  280. <SecondaryCount value={secondaryCount} />
  281. )}
  282. </div>
  283. </span>
  284. {useFilteredStats && (
  285. <StyledDropdownList
  286. {...getMenuProps({className: 'dropdown-menu inverted'})}
  287. >
  288. {group.filtered && (
  289. <Fragment>
  290. <StyledMenuItem to={getDiscoverUrl(true)}>
  291. <MenuItemText>
  292. {queryFilterDescription ?? t('Matching search filters')}
  293. </MenuItemText>
  294. <MenuItemCount value={group.filtered.count} />
  295. </StyledMenuItem>
  296. <MenuItem divider />
  297. </Fragment>
  298. )}
  299. <StyledMenuItem to={getDiscoverUrl()}>
  300. <MenuItemText>{t('Total in %s', summary)}</MenuItemText>
  301. <MenuItemCount value={group.count} />
  302. </StyledMenuItem>
  303. {group.lifetime && (
  304. <Fragment>
  305. <MenuItem divider />
  306. <StyledMenuItem>
  307. <MenuItemText>{t('Since issue began')}</MenuItemText>
  308. <MenuItemCount value={group.lifetime.count} />
  309. </StyledMenuItem>
  310. </Fragment>
  311. )}
  312. </StyledDropdownList>
  313. )}
  314. </span>
  315. </GuideAnchor>
  316. );
  317. }}
  318. </DeprecatedDropdownMenu>
  319. );
  320. const groupUsersCount = !defined(primaryUserCount) ? (
  321. <Placeholder height="18px" />
  322. ) : (
  323. <DeprecatedDropdownMenu isNestedDropdown>
  324. {({isOpen, getRootProps, getActorProps, getMenuProps}) => {
  325. const topLevelCx = classNames('dropdown', {'anchor-middle': true, open: isOpen});
  326. return (
  327. <span {...getRootProps({className: topLevelCx})}>
  328. <span {...getActorProps({})}>
  329. <div className="dropdown-actor-title">
  330. <PrimaryCount value={primaryUserCount} />
  331. {secondaryUserCount !== undefined && useFilteredStats && (
  332. <SecondaryCount dark value={secondaryUserCount} />
  333. )}
  334. </div>
  335. </span>
  336. {useFilteredStats && (
  337. <StyledDropdownList
  338. {...getMenuProps({className: 'dropdown-menu inverted'})}
  339. >
  340. {group.filtered && (
  341. <Fragment>
  342. <StyledMenuItem to={getDiscoverUrl(true)}>
  343. <MenuItemText>
  344. {queryFilterDescription ?? t('Matching search filters')}
  345. </MenuItemText>
  346. <MenuItemCount value={group.filtered.userCount} />
  347. </StyledMenuItem>
  348. <MenuItem divider />
  349. </Fragment>
  350. )}
  351. <StyledMenuItem to={getDiscoverUrl()}>
  352. <MenuItemText>{t('Total in %s', summary)}</MenuItemText>
  353. <MenuItemCount value={group.userCount} />
  354. </StyledMenuItem>
  355. {group.lifetime && (
  356. <Fragment>
  357. <MenuItem divider />
  358. <StyledMenuItem>
  359. <MenuItemText>{t('Since issue began')}</MenuItemText>
  360. <MenuItemCount value={group.lifetime.userCount} />
  361. </StyledMenuItem>
  362. </Fragment>
  363. )}
  364. </StyledDropdownList>
  365. )}
  366. </span>
  367. );
  368. }}
  369. </DeprecatedDropdownMenu>
  370. );
  371. return (
  372. <Wrapper
  373. data-test-id="group"
  374. data-test-reviewed={reviewed}
  375. onClick={displayReprocessingLayout || !canSelect ? undefined : wrapperToggle}
  376. reviewed={reviewed}
  377. useTintRow={useTintRow ?? true}
  378. >
  379. {canSelect && (
  380. <GroupCheckBoxWrapper>
  381. <Checkbox
  382. id={group.id}
  383. aria-label={t('Select Issue')}
  384. checked={isSelected}
  385. disabled={!!displayReprocessingLayout}
  386. onChange={checkboxToggle}
  387. />
  388. </GroupCheckBoxWrapper>
  389. )}
  390. <GroupSummary canSelect={canSelect}>
  391. <EventOrGroupHeader
  392. index={index}
  393. organization={organization}
  394. includeLink
  395. data={group}
  396. query={query}
  397. size="normal"
  398. onClick={trackClick}
  399. source={referrer}
  400. />
  401. <EventOrGroupExtraDetails data={group} showInboxTime={showInboxTime} />
  402. </GroupSummary>
  403. {hasGuideAnchor && <GuideAnchor target="issue_stream" />}
  404. {withChart && !displayReprocessingLayout && (
  405. <ChartWrapper
  406. className={`hidden-xs hidden-sm ${narrowGroups ? 'hidden-md' : ''}`}
  407. >
  408. {!group.filtered?.stats && !group.stats ? (
  409. <Placeholder height="24px" />
  410. ) : (
  411. <GroupChart
  412. statsPeriod={statsPeriod!}
  413. data={group}
  414. showSecondaryPoints={showSecondaryPoints}
  415. showMarkLine
  416. />
  417. )}
  418. </ChartWrapper>
  419. )}
  420. {displayReprocessingLayout ? (
  421. renderReprocessingColumns()
  422. ) : (
  423. <Fragment>
  424. <EventCountsWrapper>{groupCount}</EventCountsWrapper>
  425. <EventCountsWrapper>{groupUsersCount}</EventCountsWrapper>
  426. <AssigneeWrapper className="hidden-xs hidden-sm">
  427. <AssigneeSelector
  428. id={group.id}
  429. memberList={memberList}
  430. onAssign={trackAssign}
  431. />
  432. </AssigneeWrapper>
  433. </Fragment>
  434. )}
  435. </Wrapper>
  436. );
  437. }
  438. const StreamGroup = withOrganization(BaseGroupRow);
  439. export default StreamGroup;
  440. // Position for wrapper is relative for overlay actions
  441. const Wrapper = styled(PanelItem)<{
  442. reviewed: boolean;
  443. useTintRow: boolean;
  444. }>`
  445. position: relative;
  446. padding: ${space(1.5)} 0;
  447. line-height: 1.1;
  448. ${p =>
  449. p.useTintRow &&
  450. p.reviewed &&
  451. css`
  452. animation: tintRow 0.2s linear forwards;
  453. position: relative;
  454. /*
  455. * A mask that fills the entire row and makes the text opaque. Doing this because
  456. * opacity adds a stacking context in CSS so we need to apply it to another element.
  457. */
  458. &:after {
  459. content: '';
  460. pointer-events: none;
  461. position: absolute;
  462. left: 0;
  463. right: 0;
  464. top: 0;
  465. bottom: 0;
  466. width: 100%;
  467. height: 100%;
  468. background-color: ${p.theme.bodyBackground};
  469. opacity: 0.4;
  470. }
  471. @keyframes tintRow {
  472. 0% {
  473. background-color: ${p.theme.bodyBackground};
  474. }
  475. 100% {
  476. background-color: ${p.theme.backgroundSecondary};
  477. }
  478. }
  479. `};
  480. `;
  481. const GroupSummary = styled('div')<{canSelect: boolean}>`
  482. overflow: hidden;
  483. margin-left: ${p => space(p.canSelect ? 1 : 2)};
  484. margin-right: ${space(1)};
  485. flex: 1;
  486. width: 66.66%;
  487. @media (min-width: ${p => p.theme.breakpoints.medium}) {
  488. width: 50%;
  489. }
  490. `;
  491. const GroupCheckBoxWrapper = styled('div')`
  492. margin-left: ${space(2)};
  493. align-self: flex-start;
  494. height: 15px;
  495. display: flex;
  496. align-items: center;
  497. & input[type='checkbox'] {
  498. margin: 0;
  499. display: block;
  500. }
  501. `;
  502. const primaryStatStyle = (theme: Theme) => css`
  503. font-size: ${theme.fontSizeLarge};
  504. font-variant-numeric: tabular-nums;
  505. `;
  506. const PrimaryCount = styled(Count)`
  507. ${p => primaryStatStyle(p.theme)};
  508. `;
  509. const secondaryStatStyle = (theme: Theme) => css`
  510. font-size: ${theme.fontSizeLarge};
  511. font-variant-numeric: tabular-nums;
  512. :before {
  513. content: '/';
  514. padding-left: ${space(0.25)};
  515. padding-right: 2px;
  516. color: ${theme.gray300};
  517. }
  518. `;
  519. const SecondaryCount = styled(({value, ...p}) => <Count {...p} value={value} />)`
  520. ${p => secondaryStatStyle(p.theme)}
  521. `;
  522. const StyledDropdownList = styled('ul')`
  523. z-index: ${p => p.theme.zIndex.hovercard};
  524. `;
  525. interface MenuItemProps extends React.HTMLAttributes<HTMLDivElement> {
  526. to?: LocationDescriptor;
  527. }
  528. const StyledMenuItem = styled(({to, children, ...p}: MenuItemProps) => (
  529. <MenuItem noAnchor>
  530. {to ? (
  531. // @ts-expect-error allow target _blank for this link to open in new window
  532. <Link to={to} target="_blank">
  533. <div {...p}>{children}</div>
  534. </Link>
  535. ) : (
  536. <div className="dropdown-toggle">
  537. <div {...p}>{children}</div>
  538. </div>
  539. )}
  540. </MenuItem>
  541. ))`
  542. margin: 0;
  543. display: flex;
  544. flex-direction: row;
  545. justify-content: space-between;
  546. `;
  547. const menuItemStatStyles = css`
  548. text-align: right;
  549. font-weight: bold;
  550. font-variant-numeric: tabular-nums;
  551. padding-left: ${space(1)};
  552. `;
  553. const MenuItemCount = styled(({value, ...p}) => (
  554. <div {...p}>
  555. <Count value={value} />
  556. </div>
  557. ))`
  558. ${menuItemStatStyles};
  559. color: ${p => p.theme.subText};
  560. `;
  561. const MenuItemText = styled('div')`
  562. white-space: nowrap;
  563. font-weight: normal;
  564. text-align: left;
  565. padding-right: ${space(1)};
  566. color: ${p => p.theme.textColor};
  567. `;
  568. const ChartWrapper = styled('div')`
  569. width: 200px;
  570. align-self: center;
  571. `;
  572. const EventCountsWrapper = styled('div')`
  573. display: flex;
  574. justify-content: flex-end;
  575. align-self: center;
  576. width: 60px;
  577. margin: 0 ${space(2)};
  578. @media (min-width: ${p => p.theme.breakpoints.xlarge}) {
  579. width: 80px;
  580. }
  581. `;
  582. const AssigneeWrapper = styled('div')`
  583. width: 80px;
  584. margin: 0 ${space(2)};
  585. align-self: center;
  586. `;
  587. // Reprocessing
  588. const StartedColumn = styled('div')`
  589. align-self: center;
  590. margin: 0 ${space(2)};
  591. color: ${p => p.theme.gray500};
  592. ${p => p.theme.overflowEllipsis};
  593. width: 85px;
  594. @media (min-width: ${p => p.theme.breakpoints.small}) {
  595. display: block;
  596. width: 140px;
  597. }
  598. `;
  599. const EventsReprocessedColumn = styled('div')`
  600. align-self: center;
  601. margin: 0 ${space(2)};
  602. color: ${p => p.theme.gray500};
  603. ${p => p.theme.overflowEllipsis};
  604. width: 75px;
  605. @media (min-width: ${p => p.theme.breakpoints.small}) {
  606. width: 140px;
  607. }
  608. `;
  609. const ProgressColumn = styled('div')`
  610. margin: 0 ${space(2)};
  611. align-self: center;
  612. display: none;
  613. @media (min-width: ${p => p.theme.breakpoints.small}) {
  614. display: block;
  615. width: 160px;
  616. }
  617. `;