Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 14 additions & 23 deletions static/app/views/issueList/dynamicGrouping/topIssuesDrawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -495,15 +495,19 @@ function DenseTagFacets({groupIds}: DenseTagFacetsProps) {
{t('Top Value')}
</Text>
</TagsTableHeader>
<DenseTagsGrid>
<DenseTagGrid>
{tags.map((tag: GroupTag) => (
<DenseTagItem key={tag.key} tag={tag} colors={theme.chart.getColorPalette(4)} />
))}
</DenseTagsGrid>
</DenseTagGrid>
</Grid>
);
}

const DenseTagGrid = styled('div')`
display: contents;
`;

interface DenseTagItemProps {
colors: readonly string[];
tag: GroupTag;
Expand Down Expand Up @@ -539,7 +543,9 @@ function TagDistributionPreview({tag, colors}: TagDistributionPreviewProps) {
{topValues.map((value, index) => {
const pct = totalCount > 0 ? (value.count / totalCount) * 100 : 0;
return (
<DenseTagSegment
<Container
minWidth="2px"
height="100%"
key={value.value}
style={{
width: `${pct}%`,
Expand Down Expand Up @@ -601,12 +607,14 @@ function DenseTagItem({tag, colors}: DenseTagItemProps) {
skipWrapper
maxWidth={360}
>
<TagBarHoverArea>
<Flex align="center" padding="xs 0" width="100%" height="100%">
<TagMiniBar aria-hidden="true">
{barValues.map((value, index) => {
const pct = totalCount > 0 ? (value.count / totalCount) * 100 : 0;
return (
<DenseTagSegment
<Container
minWidth="2px"
height="100%"
key={value.value}
style={{
width: `${pct}%`,
Expand All @@ -616,7 +624,7 @@ function DenseTagItem({tag, colors}: DenseTagItemProps) {
);
})}
</TagMiniBar>
</TagBarHoverArea>
</Flex>
</Tooltip>
) : (
<Text size="xs" variant="muted">
Expand Down Expand Up @@ -1016,10 +1024,6 @@ const TagsTableHeader = styled('div')`
border-bottom: 1px solid ${p => p.theme.tokens.border.primary};
`;

const DenseTagsGrid = styled('div')`
display: contents;
`;

const DenseTagBar = styled('div')`
display: flex;
width: 100%;
Expand All @@ -1030,11 +1034,6 @@ const DenseTagBar = styled('div')`
margin-bottom: ${p => p.theme.space.sm};
`;

const DenseTagSegment = styled('div')`
height: 100%;
min-width: 2px;
`;

const TagMiniBar = styled('div')`
display: flex;
width: 100%;
Expand All @@ -1045,14 +1044,6 @@ const TagMiniBar = styled('div')`
box-shadow: inset 0 0 0 1px ${p => p.theme.tokens.border.secondary};
`;

const TagBarHoverArea = styled('div')`
display: flex;
align-items: center;
height: 100%;
width: 100%;
padding: ${p => p.theme.space.xs} 0;
`;

const DenseTagChip = styled('div')`
display: flex;
align-items: center;
Expand Down
Loading