Skip to content

Commit

Permalink
feat: replace dash with em dash (#255)
Browse files Browse the repository at this point in the history
Signed-off-by: Lin Wang <[email protected]>
  • Loading branch information
wanglam authored Sep 1, 2023
1 parent 3cd2fab commit b817d98
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions public/components/monitoring/model_deployment_table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export const ModelDeploymentTable = ({
truncateText: true,
textOnly: true,
render: (_id: string, modelDeploymentItem: ModelDeploymentItem) => {
return modelDeploymentItem.connector?.name || '-';
return modelDeploymentItem.connector?.name || '\u2014';
},
},
{
Expand All @@ -115,7 +115,7 @@ export const ModelDeploymentTable = ({
respondingNodesCount === undefined ||
notRespondingNodesCount === undefined
) {
return '-';
return '\u2014';
}
if (respondingNodesCount === 0) {
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ describe('<DeployedModelTable />', () => {
expect(within(header).getByText('Connector name')).toBeInTheDocument();
expect(columnContent?.length).toBe(3);
const cells = columnContent!;
expect(within(cells[0] as HTMLElement).getByText('-')).toBeInTheDocument();
expect(within(cells[1] as HTMLElement).getByText('-')).toBeInTheDocument();
expect(within(cells[0] as HTMLElement).getByText('\u2014')).toBeInTheDocument();
expect(within(cells[1] as HTMLElement).getByText('\u2014')).toBeInTheDocument();
expect(within(cells[2] as HTMLElement).getByText('Sagemaker')).toBeInTheDocument();
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ describe('<ConnectorDetails />', () => {
expect(screen.getByText('Connector description')).toBeInTheDocument();
});

it('should render - when id is empty', () => {
it('should render em dash when id is empty', () => {
setup({ id: '' });
expect(screen.getByText('-')).toBeInTheDocument();
expect(screen.getByText('\u2014')).toBeInTheDocument();
expect(screen.queryByTestId('copyable-text-div')).not.toBeInTheDocument();
});

Expand Down
6 changes: 3 additions & 3 deletions public/components/preview_panel/connector_details.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,23 @@ export const ConnectorDetails = (props: { name?: string; id?: string; descriptio
<EuiFlexGroup>
<EuiFlexItem>
<EuiDescriptionListTitle>Connector name</EuiDescriptionListTitle>
<EuiDescriptionListDescription>{name ? name : '-'}</EuiDescriptionListDescription>
<EuiDescriptionListDescription>{name ? name : '\u2014'}</EuiDescriptionListDescription>
</EuiFlexItem>
<EuiFlexItem>
<EuiDescriptionListTitle>Connector ID</EuiDescriptionListTitle>
<EuiDescriptionListDescription>
{id ? (
<CopyableText text={id} iconLeft={false} tooltipText="Copy connector ID" />
) : (
'-'
'\u2014'
)}
</EuiDescriptionListDescription>
</EuiFlexItem>
</EuiFlexGroup>
<EuiSpacer size="m" />
<EuiDescriptionListTitle>Connector description</EuiDescriptionListTitle>
<EuiDescriptionListDescription>
{description ? description : '-'}
{description ? description : '\u2014'}
</EuiDescriptionListDescription>
</EuiDescriptionList>
</>
Expand Down

0 comments on commit b817d98

Please sign in to comment.