Skip to content

Commit ef4887b

Browse files
shayna-chpriscilawebdev
authored andcommitted
ref(groupingInfo): add highlight to contributing values when All Values is set (#97812)
1 parent 6110df1 commit ef4887b

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

static/app/components/events/groupingInfo/groupingComponent.tsx

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,24 +61,27 @@ export const GroupingComponentListItem = styled('li')<{isCollapsible?: boolean}>
6161
`}
6262
`;
6363

64-
export const GroupingValue = styled('code')<{valueType: string}>`
64+
export const GroupingValue = styled('code')<{
65+
valueType: string;
66+
contributes?: boolean;
67+
}>`
6568
display: inline-block;
6669
margin: ${space(0.25)} ${space(0.5)} ${space(0.25)} 0;
6770
font-size: ${p => p.theme.fontSize.sm};
6871
padding: 0 ${space(0.25)};
69-
background: rgba(112, 163, 214, 0.1);
70-
color: ${p => p.theme.textColor};
72+
background: ${p => (p.contributes ? 'rgba(112, 163, 214, 0.1)' : 'transparent')};
73+
color: ${p => (p.contributes ? p.theme.textColor : p.theme.subText)};
7174
72-
${({valueType, theme}) =>
75+
${({valueType, theme, contributes}) =>
7376
(valueType === 'function' || valueType === 'symbol') &&
7477
css`
75-
font-weight: ${theme.fontWeight.bold};
76-
color: ${theme.textColor};
78+
font-weight: ${contributes ? theme.fontWeight.bold : 'normal'};
79+
color: ${contributes ? theme.textColor : theme.subText};
7780
`}
7881
`;
7982

8083
const GroupingComponentWrapper = styled('div')<{isContributing: boolean}>`
81-
color: ${p => (p.isContributing ? null : p.theme.textColor)};
84+
color: ${p => (p.isContributing ? p.theme.textColor : p.theme.subText)};
8285
8386
${GroupingValue}, button {
8487
opacity: 1;

static/app/components/events/groupingInfo/groupingComponentChildren.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ function GroupingComponentChildren({component, showNonContributing}: Props) {
2626
showNonContributing={showNonContributing}
2727
/>
2828
) : (
29-
<GroupingValue valueType={component.name || component.id}>
29+
<GroupingValue
30+
valueType={component.name || component.id}
31+
contributes={component.contributes}
32+
>
3033
{typeof value === 'string' || typeof value === 'number'
3134
? value
3235
: JSON.stringify(value, null, 2)}

0 commit comments

Comments
 (0)