Skip to content

Commit 57d065f

Browse files
MichaelSun48cmanallen
authored andcommitted
feat(issue-stream): Use stacked primary secondary counts designs (#79070)
Stacking the primary and secondary counts on top of each other now so they don't horizontally overflow: <img width="179" alt="image" src="https://github.com/user-attachments/assets/575ada54-9f8b-4589-8e02-9b138072270a">
1 parent bbe93c1 commit 57d065f

File tree

1 file changed

+57
-31
lines changed

1 file changed

+57
-31
lines changed

Diff for: static/app/components/stream/group.tsx

+57-31
Original file line numberDiff line numberDiff line change
@@ -442,15 +442,20 @@ function BaseGroupRow({
442442
</CountTooltipContent>
443443
}
444444
>
445-
<PrimaryCount
446-
value={primaryCount}
447-
hasNewLayout={organization.features.includes('issue-stream-table-layout')}
448-
/>
449-
{secondaryCount !== undefined && useFilteredStats && (
450-
<SecondaryCount
451-
value={secondaryCount}
452-
hasNewLayout={organization.features.includes('issue-stream-table-layout')}
453-
/>
445+
{hasNewLayout ? (
446+
<CountsWrapper>
447+
<PrimaryCount value={primaryCount} hasNewLayout={hasNewLayout} />
448+
{secondaryCount !== undefined && useFilteredStats && (
449+
<SecondaryCount value={secondaryCount} hasNewLayout={hasNewLayout} />
450+
)}
451+
</CountsWrapper>
452+
) : (
453+
<Fragment>
454+
<PrimaryCount value={primaryCount} />
455+
{secondaryCount !== undefined && useFilteredStats && (
456+
<SecondaryCount value={secondaryCount} />
457+
)}
458+
</Fragment>
454459
)}
455460
</Tooltip>
456461
</GuideAnchor>
@@ -488,16 +493,20 @@ function BaseGroupRow({
488493
</CountTooltipContent>
489494
}
490495
>
491-
<PrimaryCount
492-
value={primaryUserCount}
493-
hasNewLayout={organization.features.includes('issue-stream-table-layout')}
494-
/>
495-
{secondaryUserCount !== undefined && useFilteredStats && (
496-
<SecondaryCount
497-
dark
498-
value={secondaryUserCount}
499-
hasNewLayout={organization.features.includes('issue-stream-table-layout')}
500-
/>
496+
{hasNewLayout ? (
497+
<CountsWrapper>
498+
<PrimaryCount value={primaryUserCount} hasNewLayout={hasNewLayout} />
499+
{secondaryUserCount !== undefined && useFilteredStats && (
500+
<SecondaryCount value={secondaryUserCount} hasNewLayout={hasNewLayout} />
501+
)}
502+
</CountsWrapper>
503+
) : (
504+
<Fragment>
505+
<PrimaryCount value={primaryUserCount} />
506+
{secondaryUserCount !== undefined && useFilteredStats && (
507+
<SecondaryCount value={secondaryUserCount} />
508+
)}
509+
</Fragment>
501510
)}
502511
</Tooltip>
503512
);
@@ -542,17 +551,14 @@ function BaseGroupRow({
542551
query={query}
543552
source={referrer}
544553
/>
545-
<EventOrGroupExtraDetails
546-
data={group}
547-
showLifetime={!organization.features.includes('issue-stream-table-layout')}
548-
/>
554+
<EventOrGroupExtraDetails data={group} showLifetime={!hasNewLayout} />
549555
</GroupSummary>
550556
{hasGuideAnchor && issueStreamAnchor}
551557

552558
{withChart &&
553559
!displayReprocessingLayout &&
554560
issueTypeConfig.stats.enabled &&
555-
organization.features.includes('issue-stream-table-layout') ? (
561+
hasNewLayout ? (
556562
<NarrowChartWrapper breakpoint={COLUMN_BREAKPOINTS.TREND}>
557563
<GroupStatusChart
558564
hideZeros
@@ -596,7 +602,7 @@ function BaseGroupRow({
596602
)}
597603
{withColumns.includes('event') &&
598604
issueTypeConfig.stats.enabled &&
599-
organization.features.includes('issue-stream-table-layout') ? (
605+
hasNewLayout ? (
600606
<NarrowEventsOrUsersCountsWrapper breakpoint={COLUMN_BREAKPOINTS.EVENTS}>
601607
<InnerCountsWrapper>{groupCount}</InnerCountsWrapper>
602608
</NarrowEventsOrUsersCountsWrapper>
@@ -609,15 +615,15 @@ function BaseGroupRow({
609615
)}
610616
{withColumns.includes('users') &&
611617
issueTypeConfig.stats.enabled &&
612-
organization.features.includes('issue-stream-table-layout') ? (
618+
hasNewLayout ? (
613619
<NarrowEventsOrUsersCountsWrapper breakpoint={COLUMN_BREAKPOINTS.USERS}>
614620
<InnerCountsWrapper>{groupUsersCount}</InnerCountsWrapper>
615621
</NarrowEventsOrUsersCountsWrapper>
616622
) : (
617623
<EventCountsWrapper>{groupUsersCount}</EventCountsWrapper>
618624
)}
619625
{withColumns.includes('priority') ? (
620-
organization.features.includes('issue-stream-table-layout') ? (
626+
hasNewLayout ? (
621627
<NarrowPriorityWrapper breakpoint={COLUMN_BREAKPOINTS.PRIORITY}>
622628
{group.priority ? (
623629
<GroupPriority group={group} onChange={onPriorityChange} />
@@ -632,7 +638,7 @@ function BaseGroupRow({
632638
)
633639
) : null}
634640
{withColumns.includes('assignee') &&
635-
(organization.features.includes('issue-stream-table-layout') ? (
641+
(hasNewLayout ? (
636642
<NarrowAssigneeWrapper breakpoint={COLUMN_BREAKPOINTS.ASSIGNEE}>
637643
<AssigneeSelector
638644
group={group}
@@ -750,15 +756,35 @@ const GroupCheckBoxWrapper = styled('div')<{hasNewLayout: boolean}>`
750756
`}
751757
`;
752758

753-
const PrimaryCount = styled(Count)<{hasNewLayout: boolean}>`
759+
const CountsWrapper = styled('div')`
760+
display: flex;
761+
flex-direction: column;
762+
`;
763+
764+
const PrimaryCount = styled(Count)<{hasNewLayout?: boolean}>`
754765
font-size: ${p => (p.hasNewLayout ? p.theme.fontSizeMedium : p.theme.fontSizeLarge)};
766+
${p =>
767+
p.hasNewLayout &&
768+
`
769+
display: flex;
770+
justify-content: right;
771+
margin-bottom: ${space(0.25)};
772+
`}
755773
font-variant-numeric: tabular-nums;
756774
`;
757775

758776
const SecondaryCount = styled(({value, ...p}) => <Count {...p} value={value} />)<{
759-
hasNewLayout: boolean;
777+
hasNewLayout?: boolean;
760778
}>`
761-
font-size: ${p => (p.hasNewLayout ? p.theme.fontSizeMedium : p.theme.fontSizeLarge)};
779+
font-size: ${p => (p.hasNewLayout ? p.theme.fontSizeSmall : p.theme.fontSizeLarge)};
780+
${p =>
781+
p.hasNewLayout &&
782+
css`
783+
display: flex;
784+
justify-content: right;
785+
color: ${p.theme.subText};
786+
`}
787+
762788
font-variant-numeric: tabular-nums;
763789
764790
:before {

0 commit comments

Comments
 (0)