Skip to content

Commit

Permalink
Upgrade to antd/v3.9.0 to avoid loading fonts from alicdn (#1053)
Browse files Browse the repository at this point in the history
Resolves #187

Despite the concerns in the original ticket, it does not seem to affect
the bundle size, because SVG icons are inlined, so the full font file is
not added to the bundle.
```
$ du -h cmd/query/app/ui/actual/
3.8M	cmd/query/app/ui/actual/
```

Signed-off-by: Yuri Shkuro <github@ysh.us>
  • Loading branch information
yurishkuro committed Nov 14, 2022
1 parent c863508 commit f3f324d
Show file tree
Hide file tree
Showing 8 changed files with 2,520 additions and 242 deletions.
2 changes: 1 addition & 1 deletion packages/jaeger-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"@types/react-virtualized-select": "^3.0.7",
"@types/recompose": "^0.30.5",
"@types/redux-actions": "2.2.1",
"antd": "3.8.0",
"antd": "3.9.0",
"chance": "^1.0.10",
"classnames": "^2.2.5",
"combokeys": "^3.0.0",
Expand Down
7 changes: 1 addition & 6 deletions packages/jaeger-ui/src/components/App/TraceIDSearchInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,7 @@ class TraceIDSearchInput extends React.PureComponent<Props> {
render() {
return (
<Form layout="horizontal" onSubmit={this.goToTrace} className="TraceIDSearchInput--form">
<Input
autosize={null}
name="idInput"
placeholder="Lookup by Trace ID..."
prefix={<Icon type="search" />}
/>
<Input name="idInput" placeholder="Lookup by Trace ID..." prefix={<Icon type="search" />} />
</Form>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,26 @@ exports[`<TraceIDSearchInput /> renders as expected 1`] = `
>
<i
className="anticon anticon-search"
/>
>
<svg
aria-hidden="true"
className=""
data-icon="search"
fill="currentColor"
height="1em"
key="svg-search"
viewBox="0 0 1024 1024"
width="1em"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M608 112c-167.9 0-304 136.1-304 304 0 70.3 23.9 135 63.9 186.5L114.3 856.1c-3.1 3.1-3.1 8.2 0 11.3l42.3 42.3c3.1 3.1 8.2 3.1 11.3 0l253.6-253.6C473 696.1 537.7 720 608 720c167.9 0 304-136.1 304-304S775.9 112 608 112zm161.2 465.2C726.2 620.3 668.9 644 608 644s-118.2-23.7-161.2-66.8C403.7 534.2 380 476.9 380 416s23.7-118.2 66.8-161.2c43-43.1 100.3-66.8 161.2-66.8s118.2 23.7 161.2 66.8c43.1 43 66.8 100.3 66.8 161.2s-23.7 118.2-66.8 161.2z"
key="svg-search-svg-0"
/>
</svg>
</i>
</span>
<input
autosize={null}
className="ant-input"
disabled={false}
name="idInput"
Expand Down

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/jaeger-ui/src/components/common/NameSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export default class NameSelector extends React.PureComponent<TProps, TState> {
this.setState({ popoverVisible });
}

private clearValue = (evt: React.MouseEvent<React.ReactSVGElement>) => {
private clearValue = (evt: React.MouseEvent<HTMLElement>) => {
if (this.props.required) throw new Error('Cannot clear value of required NameSelector');

evt.stopPropagation();
Expand Down
1 change: 0 additions & 1 deletion packages/jaeger-ui/src/components/common/UiFindInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ export class UnconnectedUiFindInput extends React.PureComponent<TProps, StateTyp

return (
<Input
autosize={null}
placeholder="Find..."
{...inputProps}
onBlur={this.handleInputBlur}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

exports[`UiFind rendering renders as expected 1`] = `
<Input
autosize={null}
disabled={false}
onBlur={[Function]}
onChange={[Function]}
Expand Down
Loading

0 comments on commit f3f324d

Please sign in to comment.