Skip to content

Commit

Permalink
replace add data with add series
Browse files Browse the repository at this point in the history
  • Loading branch information
doralchan committed Nov 14, 2024
1 parent 00ea404 commit 7798b65
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ export function YAxisSelector({
<Actions gap={1}>
<AddButton
title={
displayType === DisplayType.BIG_NUMBER ? t('Add Field') : t('Add Data')
displayType === DisplayType.BIG_NUMBER ? t('Add Field') : t('Add Series')
}
onAdd={handleAddFields}
/>
Expand Down
10 changes: 5 additions & 5 deletions static/app/views/dashboards/widgetBuilder/widgetBuilder.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -581,8 +581,8 @@ describe('WidgetBuilder', function () {
// Select line chart display
await userEvent.click(screen.getByText('Line Chart'));

// Click the Add Data button
await userEvent.click(screen.getByLabelText('Add Data'));
// Click the Add Series button
await userEvent.click(screen.getByLabelText('Add Series'));
await selectEvent.select(screen.getByText('(Required)'), ['count_unique(…)']);

await userEvent.click(screen.getByLabelText('Add Widget'));
Expand Down Expand Up @@ -1259,7 +1259,7 @@ describe('WidgetBuilder', function () {
expect(await screen.findByText('Area Chart')).toBeInTheDocument();

// Add a group by
await userEvent.click(screen.getByText('Add Data'));
await userEvent.click(screen.getByText('Add Series'));
await selectEvent.select(screen.getByText('Select group'), /project/);

// Change the y-axis
Expand Down Expand Up @@ -1308,7 +1308,7 @@ describe('WidgetBuilder', function () {

await selectEvent.select(await screen.findByText('Select group'), 'project');

await userEvent.click(screen.getByText('Add Data'));
await userEvent.click(screen.getByText('Add Series'));
await selectEvent.select(screen.getByText('(Required)'), /count_unique/);

await waitFor(() => {
Expand Down Expand Up @@ -1375,7 +1375,7 @@ describe('WidgetBuilder', function () {
screen.getByText('Limit to 5 results');

await userEvent.click(screen.getByText('Add Query'));
await userEvent.click(screen.getByText('Add Data'));
await userEvent.click(screen.getByText('Add Series'));

expect(screen.getByText('Limit to 2 results')).toBeInTheDocument();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ describe('WidgetBuilder', function () {
await userEvent.keyboard('{Enter}');

// Add a y-axis
await userEvent.click(screen.getByText('Add Data'));
await userEvent.click(screen.getByText('Add Series'));

// The equation should still be visible
expect(screen.getByPlaceholderText('Enter Equation')).toHaveValue(
Expand Down Expand Up @@ -662,7 +662,7 @@ describe('WidgetBuilder', function () {
},
});

await userEvent.click(await screen.findByText('Add Data'));
await userEvent.click(await screen.findByText('Add Series'));
await selectEvent.select(screen.getByText('Select group'), 'project');

// Change the sort by to count_unique
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ class ReleaseWidgetQueries extends Component<Props, State> {
widget.queries.map(q => omit(q, ignoredQueryProps)),
prevProps.widget.queries.map(q => omit(q, ignoredQueryProps))
) ||
// If the fields changed (ignore falsy/empty fields -> they can happen after clicking on Add Data)
// If the fields changed (ignore falsy/empty fields -> they can happen after clicking on Add Series)
!isEqual(
widget.queries.flatMap(q => q.fields?.filter(field => !!field)),
prevProps.widget.queries.flatMap(q => q.fields?.filter(field => !!field))
Expand Down
2 changes: 1 addition & 1 deletion static/app/views/explore/toolbar/index.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ describe('ExploreToolbar', function () {
]);

// try adding an overlay
await userEvent.click(within(section).getByRole('button', {name: 'Add Data'}));
await userEvent.click(within(section).getByRole('button', {name: 'Add Series'}));
await userEvent.click(within(section).getByRole('button', {name: 'span.duration'}));
await userEvent.click(within(section).getByRole('option', {name: 'span.self_time'}));
expect(visualizes).toEqual([
Expand Down
4 changes: 2 additions & 2 deletions static/app/views/explore/toolbar/toolbarVisualize.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,9 @@ export function ToolbarVisualize({}: ToolbarVisualizeProps) {
icon={<IconAdd />}
onClick={() => addOverlay(group)}
priority="link"
aria-label={t('Add Data')}
aria-label={t('Add Series')}
>
{t('Add Data')}
{t('Add Series')}
</ToolbarFooterButton>
</ToolbarFooter>
</Fragment>
Expand Down

0 comments on commit 7798b65

Please sign in to comment.