зеркало из https://github.com/mozilla/treeherder.git
Bug 1438492 - Fix tooltip for commit messages and authors (#3249)
This commit is contained in:
Родитель
0badc9ec5f
Коммит
a11e49281b
|
@ -207,7 +207,7 @@ describe('initials filter', function () {
|
|||
const initials = mount(<Initials title={`${name}: ${email}`}
|
||||
author={name}
|
||||
/>);
|
||||
expect(initials.html()).toEqual('<span><span class="user-push-icon" title="Starscream: foo@bar.baz"><i class="fa fa-user-o" aria-hidden="true"></i></span><div class="icon-superscript user-push-initials">S</div></span>');
|
||||
expect(initials.html()).toEqual('<span title="Starscream: foo@bar.baz"><span class="user-push-icon"><i class="fa fa-user-o" aria-hidden="true"></i></span><div class="icon-superscript user-push-initials">S</div></span>');
|
||||
});
|
||||
|
||||
it('initializes a two-word name', function () {
|
||||
|
|
|
@ -16,8 +16,8 @@ export const Initials = (props) => {
|
|||
}
|
||||
|
||||
return (
|
||||
<span>
|
||||
<span className="user-push-icon" title={props.title}>
|
||||
<span title={props.title}>
|
||||
<span className="user-push-icon">
|
||||
<i className="fa fa-user-o" aria-hidden="true" />
|
||||
</span>
|
||||
<div className="icon-superscript user-push-initials">{initials}</div>
|
||||
|
@ -30,9 +30,9 @@ export class Revision extends React.PureComponent {
|
|||
super(props);
|
||||
const { revision, linkifyBugsFilter } = this.props;
|
||||
|
||||
const escapedComment = _.escape(revision.comments.split('\n')[0]);
|
||||
this.escapedCommentHTML = { __html: linkifyBugsFilter(escapedComment) };
|
||||
this.tags = escapedComment.search('Backed out') >= 0 || escapedComment.search('Back out') >= 0 ?
|
||||
this.escapedComment = _.escape(revision.comments.split('\n')[0]);
|
||||
this.escapedCommentHTML = { __html: linkifyBugsFilter(this.escapedComment) };
|
||||
this.tags = this.escapedComment.search('Backed out') >= 0 || this.escapedComment.search('Back out') >= 0 ?
|
||||
'backout' : '';
|
||||
}
|
||||
|
||||
|
@ -54,7 +54,7 @@ export class Revision extends React.PureComponent {
|
|||
<Initials title={`${name}: ${email}`}
|
||||
author={name}
|
||||
/>
|
||||
<span title={this.comment}>
|
||||
<span title={this.escapedComment}>
|
||||
<span className="revision-comment">
|
||||
<em dangerouslySetInnerHTML={this.escapedCommentHTML} />
|
||||
</span>
|
||||
|
|
Загрузка…
Ссылка в новой задаче