Skip to content

Commit fb4bdfa

Browse files
authored
[MD]Address comments from UX signoff meeting-Datasource list and create page (#2625)
Signed-off-by: Yibo Wang <yibow@amazon.com>
1 parent e056e83 commit fb4bdfa

File tree

10 files changed

+104
-45
lines changed

10 files changed

+104
-45
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
2424
* [Multi DataSource] Make text content dynamically translated & update unit tests ([#2570](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2570))
2525
* [Vis Builder] Change classname prefix wiz to vb ([#2581](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2581/files))
2626
* [Vis Builder] Change wizard to vis_builder in file names and paths ([#2587](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2587))
27+
* [Multi DataSource] Address UX comments on Data source list and create page ([#2625](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2625))
2728

2829
### 🐛 Bug Fixes
2930
* [Vis Builder] Fixes auto bounds for timeseries bar chart visualization ([2401](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/2401))

src/plugins/data_source_management/public/components/create_button/create_button.test.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@ const createButtonIdentifier = `[data-test-subj="createDataSourceButton"]`;
1313

1414
describe('CreateButton', () => {
1515
const history = (scopedHistoryMock.create() as unknown) as ScopedHistory;
16+
const dataTestSubj = 'createDataSourceButton';
1617
let component: ShallowWrapper<any, Readonly<{}>, React.Component<{}, {}, any>>;
1718

1819
beforeEach(() => {
19-
component = shallow(<CreateButton history={history} />);
20+
component = shallow(<CreateButton history={history} dataTestSubj={dataTestSubj} />);
2021
});
2122

2223
it('should render normally', () => {

src/plugins/data_source_management/public/components/create_button/create_button.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,15 @@ import { FormattedMessage } from '@osd/i18n/react';
1111

1212
interface Props {
1313
history: History;
14+
isEmptyState?: boolean;
15+
dataTestSubj: string;
1416
}
1517

16-
export const CreateButton = ({ history }: Props) => {
18+
export const CreateButton = ({ history, isEmptyState, dataTestSubj }: Props) => {
1719
return (
1820
<EuiButton
19-
data-test-subj="createDataSourceButton"
20-
fill={true}
21+
data-test-subj={dataTestSubj}
22+
fill={isEmptyState ? false : true}
2123
onClick={() => history.push('/create')}
2224
>
2325
<FormattedMessage

src/plugins/data_source_management/public/components/create_data_source_wizard/__snapshots__/create_data_source_wizard.test.tsx.snap

Lines changed: 18 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/plugins/data_source_management/public/components/create_data_source_wizard/components/create_form/__snapshots__/create_data_source_form.test.tsx.snap

Lines changed: 36 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/plugins/data_source_management/public/components/create_data_source_wizard/components/create_form/create_data_source_form.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,7 @@ export class CreateDataSourceForm extends React.Component<
287287
return (
288288
<EuiPageContent>
289289
{this.renderHeader()}
290+
<EuiSpacer size="m" />
290291
<EuiForm data-test-subj="data-source-creation">
291292
{/* Endpoint section */}
292293
{this.renderSectionHeader(
@@ -354,7 +355,7 @@ export class CreateDataSourceForm extends React.Component<
354355
placeholder={i18n.translate(
355356
'dataSourcesManagement.createDataSource.endpointPlaceholder',
356357
{
357-
defaultMessage: 'Sample URL: https://connectionurl.com',
358+
defaultMessage: 'https://connectionurl.com',
358359
}
359360
)}
360361
isInvalid={!!this.state.formErrorsByField.endpoint.length}

src/plugins/data_source_management/public/components/create_data_source_wizard/create_data_source_wizard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export const CreateDataSourceWizard: React.FunctionComponent<CreateDataSourceWiz
7575
};
7676

7777
const handleDisplayToastMessage = ({ id, defaultMessage }: ToastMessageItem) => {
78-
toasts.addWarning(i18n.translate(id, { defaultMessage }));
78+
toasts.addDanger(i18n.translate(id, { defaultMessage }));
7979
};
8080

8181
/* Render the creation wizard */

0 commit comments

Comments
 (0)