Skip to content

Commit

Permalink
feat: replace dash with em dash
Browse files Browse the repository at this point in the history
Signed-off-by: Lin Wang <[email protected]>
  • Loading branch information
wanglam committed Aug 31, 2023
1 parent 9bbd25f commit b423c44
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 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
2 changes: 1 addition & 1 deletion public/components/preview_panel/connector_details.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const ConnectorDetails = (props: { name?: string; id?: string; descriptio
{id ? (
<CopyableText text={id} iconLeft={false} tooltipText="Copy connector ID" />
) : (
'-'
'\u2014'
)}
</EuiDescriptionListDescription>
</EuiFlexItem>
Expand Down

0 comments on commit b423c44

Please sign in to comment.