Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JENKINS-40877 PR link on run details. #894

Merged
merged 6 commits into from
Mar 20, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -99,17 +99,20 @@ class RunDetailsHeader extends Component {
<div className="u-label-value" title={branchLabel + ': ' + displayName}>
<label className={labelClassName}>{ branchLabel }:</label>
{isMultiBranch ? (
<span>
<span className={labelClassName}>
<Link to={ branchUrl }>{ displayName }</Link>
{ run.pullRequest && run.pullRequest.url &&
<a title="Display the log in new window" target="_blank" href={run.pullRequest.url}>
<Icon size={14} icon="launch" />
</a>
}
</span>
) : (
<span>&mdash;</span>
)}

{ run.pullRequest && run.pullRequest.url &&
<span>
<a title="Opens pull request in a new window" target="_blank" href={run.pullRequest.url}>
<Icon size={14} icon="launch" />
</a>
</span>
}
</div>
);

Expand Down
5 changes: 3 additions & 2 deletions blueocean-dashboard/src/main/less/run-details-header.less
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,16 @@
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;

align-items: center;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't have any effect unless you apply display: flex (or inline-flex)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dno't really know the implications of doing that.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the following markup:

 branchSlug = (<span className="killSpace">
 +                { displayName }
 +                <a href={this.pager.branch.branch.url} target="_blank">
 +                    <Icon { ...{ style, size: 16, icon: 'launch' } } />
 +                </a>
 +            </span>);

The following css should center that icon. As @cliffmeyers said you need some flex in your life ;)

+.RunDetailsHeader-sources span.killSpace {
 +    display: flex;
 +    align-items: center;
 +    a svg {
 +        margin-left: 8px;
 +    }
 +}


svg {
fill: #ffffff;
opacity: 50%;
vertical-align: middle;
margin-left: 3px;
}
}


}
}

Expand Down