Skip to content

Commit 3f66348

Browse files
committed
Bump ui-components to v0.12.2
1 parent 39530aa commit 3f66348

4 files changed

Lines changed: 18 additions & 13 deletions

File tree

client/app/scripts/charts/node-container.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class NodeContainer extends React.Component {
4444
const matchedParents = this.props.matches.get('parents', makeList());
4545
const matchedDetails = matchedMetadata.concat(matchedParents);
4646
return (
47-
<MatchedResults matches={matchedDetails} />
47+
<MatchedResults matches={matchedDetails} searchTerms={this.props.searchTerms} />
4848
);
4949
};
5050

client/app/scripts/components/matched-results.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,24 @@ import React from 'react';
22
import { MatchedText } from 'weaveworks-ui-components';
33

44
const SHOW_ROW_COUNT = 2;
5-
const MAX_MATCH_LENGTH = 24;
65

7-
8-
const Match = match => (
6+
const Match = (searchTerms, match) => (
97
<div className="matched-results-match" key={match.label}>
108
<div className="matched-results-match-wrapper">
119
<span className="matched-results-match-label">
1210
{match.label}:
1311
</span>
1412
<MatchedText
1513
text={match.text}
16-
match={match}
17-
maxLength={MAX_MATCH_LENGTH}
18-
truncate={match.truncate}
14+
matches={searchTerms}
1915
/>
2016
</div>
2117
</div>
2218
);
2319

2420
export default class MatchedResults extends React.PureComponent {
2521
render() {
26-
const { matches, style } = this.props;
22+
const { matches, searchTerms, style } = this.props;
2723

2824
if (!matches) {
2925
return null;
@@ -41,7 +37,11 @@ export default class MatchedResults extends React.PureComponent {
4137

4238
return (
4339
<div className="matched-results" style={style}>
44-
{matches.keySeq().take(SHOW_ROW_COUNT).map(fieldId => Match(matches.get(fieldId)))}
40+
{matches
41+
.keySeq()
42+
.take(SHOW_ROW_COUNT)
43+
.map(fieldId => Match(searchTerms, matches.get(fieldId)))
44+
}
4545
{moreFieldMatches &&
4646
<div className="matched-results-more" title={moreFieldMatchesTitle}>
4747
{`${moreFieldMatches.size} more matches`}

client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"reselect": "3.0.1",
4545
"reselect-map": "1.0.3",
4646
"styled-components": "2.2.4",
47-
"weaveworks-ui-components": "0.11.31",
47+
"weaveworks-ui-components": "0.12.2",
4848
"whatwg-fetch": "2.0.3",
4949
"xterm": "3.3.0"
5050
},

client/yarn.lock

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4069,6 +4069,10 @@ interpret@^1.0.0:
40694069
version "1.0.4"
40704070
resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.4.tgz#820cdd588b868ffb191a809506d6c9c8f212b1b0"
40714071

4072+
intersperse@1.0.0:
4073+
version "1.0.0"
4074+
resolved "https://registry.yarnpkg.com/intersperse/-/intersperse-1.0.0.tgz#f2561fb1cfef9f5277cc3347a22886b4351a5181"
4075+
40724076
invariant@^2.0.0, invariant@^2.2.0, invariant@^2.2.2:
40734077
version "2.2.2"
40744078
resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.2.tgz#9e1f56ac0acdb6bf303306f338be3b204ae60360"
@@ -8401,16 +8405,17 @@ wd@^0.4.0:
84018405
underscore.string "~3.0.3"
84028406
vargs "~0.1.0"
84038407

8404-
weaveworks-ui-components@0.11.31:
8405-
version "0.11.31"
8406-
resolved "https://registry.yarnpkg.com/weaveworks-ui-components/-/weaveworks-ui-components-0.11.31.tgz#90392fe5aafd6a911d985ef9ef554cb7178474d5"
8408+
weaveworks-ui-components@0.12.2:
8409+
version "0.12.2"
8410+
resolved "https://registry.yarnpkg.com/weaveworks-ui-components/-/weaveworks-ui-components-0.12.2.tgz#6eea81c4b1e48ff05743680c343c6c1116156494"
84078411
dependencies:
84088412
classnames "2.2.5"
84098413
d3-drag "1.2.1"
84108414
d3-format "1.2.2"
84118415
d3-scale "1.0.7"
84128416
d3-selection "1.2.0"
84138417
d3-shape "1.2.0"
8418+
intersperse "1.0.0"
84148419
polished "1.9.0"
84158420
prop-types "15.6.0"
84168421
react-input-autosize "2.2.1"

0 commit comments

Comments
 (0)