Skip to content

Commit c3166f9

Browse files
authored
chore(comp workflows): Update tooltip copy (#102763)
- Forgot to push up a commit in my last copy PR - Change from `Find` to `Compare` on the selection tooltip - Remove the extra explanation text on hover tooltip <img width="270" height="110" alt="image" src="https://github.com/user-attachments/assets/df950ea4-8d06-49b7-b13a-f060365a0321" /> <img width="359" height="233" alt="image" src="https://github.com/user-attachments/assets/75d90e7c-a3ce-4a89-aa2a-406f512d5959" />
1 parent 401978c commit c3166f9

File tree

3 files changed

+4
-13
lines changed

3 files changed

+4
-13
lines changed

static/app/views/explore/components/attributeBreakdowns/chart.tsx

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -177,24 +177,15 @@ export function Chart({
177177
throw new Error('selectedParam or baselineParam is not defined');
178178
}
179179

180-
const selectedPercentage = Number(selectedParam?.data);
181-
const baselinePercentage = Number(baselineParam?.data);
182-
183-
const isDifferent = selectedPercentage.toFixed(1) !== baselinePercentage.toFixed(1);
184-
185-
const status = isDifferent
186-
? {adjective: 'different', message: 'This is suspicious.'}
187-
: {adjective: 'similar', message: 'Nothing unusual here.'};
188-
189180
const name = selectedParam?.name ?? baselineParam?.name ?? '';
190181
const truncatedName =
191182
name.length > TOOLTIP_MAX_VALUE_LENGTH
192183
? `${name.slice(0, TOOLTIP_MAX_VALUE_LENGTH)}...`
193184
: name;
194185

195-
return `<div style="max-width: 200px; white-space: normal; word-wrap: break-word; line-height: 1.2;">${truncatedName} <span style="color: ${theme.textColor};">is <strong>${status.adjective}</strong> ${isDifferent ? 'between' : 'across'} selected and baseline data. ${status.message}</span></div>`;
186+
return `<div style="max-width: 200px; white-space: normal; word-wrap: break-word; line-height: 1.2; color: black;">${truncatedName}</div>`;
196187
},
197-
[theme.textColor]
188+
[]
198189
);
199190

200191
const chartXAxisLabelFormatter = useCallback(

static/app/views/explore/components/attributeBreakdowns/content.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ function EmptyState() {
7070
</Flex>
7171
<Text>
7272
{t(
73-
"Drag to select an area on the chart and click 'Find Attribute Breakdowns' to analyze differences between selected and unselected (baseline) data. Attributes that differ most in frequency appear first, making it easier to identify key differences:"
73+
"Drag to select an area on the chart and click 'Compare Attribute Breakdowns' to analyze differences between selected and unselected (baseline) data. Attributes that differ most in frequency appear first, making it easier to identify key differences:"
7474
)}
7575
</Text>
7676
<IllustrationWrapper>

static/app/views/explore/components/attributeBreakdowns/floatingTrigger.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export function FloatingTrigger({
8181
<List>
8282
<ListItem onClick={handleZoomIn}>{t('Zoom in')}</ListItem>
8383
<ListItem onClick={handleFindAttributeBreakdowns}>
84-
{t('Find Attribute Breakdowns')}
84+
{t('Compare Attribute Breakdowns')}
8585
</ListItem>
8686
</List>
8787
</div>,

0 commit comments

Comments
 (0)