Skip to content

Commit

Permalink
Merge branch 'main' into replace-table
Browse files Browse the repository at this point in the history
  • Loading branch information
ananzh authored Nov 14, 2022
2 parents 481f2ab + b19c171 commit 66f7f86
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import { i18n } from '@osd/i18n';
import {
EuiButtonIcon,
EuiDragDropContext,
Expand Down Expand Up @@ -127,7 +128,11 @@ const DropboxComponent = ({
} ${canDrop ? 'canDrop' : ''}`}
{...(isValidDropTarget && dropProps)}
>
<EuiText size="s">Click or drop to add</EuiText>
<EuiText size="s">
{i18n.translate('visBuilder.dropbox.addField.title', {
defaultMessage: 'Click or drop to add',
})}
</EuiText>
<EuiButtonIcon
iconType="plusInCircle"
aria-label="clear-field"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ $keyframe-multiplier: 1 / $animation-multiplier;
animation: vbDragAnimation #{$total-duartion}s ease-in-out infinite forwards;
position: absolute;
top: 34.5%;
width: 50% !important;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import { i18n } from '@osd/i18n';
import { EuiEmptyPrompt, EuiFlexGroup, EuiFlexItem, EuiIcon, EuiPanel } from '@elastic/eui';
import React, { FC, useState, useMemo, useEffect, useLayoutEffect } from 'react';
import { useOpenSearchDashboards } from '../../../../opensearch_dashboards_react/public';
Expand Down Expand Up @@ -89,18 +90,29 @@ export const Workspace: FC = ({ children }) => {
) : (
<EuiFlexItem className="vbWorkspace__empty" data-test-subj="emptyWorkspace">
<EuiEmptyPrompt
title={<h2>Add a field to start</h2>}
title={
<h2>
{i18n.translate('visBuilder.workSpace.empty.title', {
defaultMessage: 'Add a field to start',
})}
</h2>
}
body={
<>
<p>Drag a field to the configuration panel to generate a visualization.</p>
<span className="vbWorkspace__container">
<p>
{i18n.translate('visBuilder.workSpace.empty.description', {
defaultMessage:
'Drag a field to the configuration panel to generate a visualization.',
})}
</p>
<div className="vbWorkspace__container">
<EuiIcon className="vbWorkspace__fieldSvg" type={fields_bg} size="original" />
<EuiIcon
className="vbWorkspace__handFieldSvg"
type={hand_field}
size="original"
/>
</span>
</div>
</>
}
/>
Expand Down

0 comments on commit 66f7f86

Please sign in to comment.