</div>
)}
<Issue
+ branch={branch}
checked={this.props.checked}
displayLocationsLink={false}
issue={issue}
const hasSourcesBefore = sources.length > 0 && sources[0].line > 1;
return (
<SourceViewerCode
+ branch={this.props.branch}
displayAllIssues={this.props.displayAllIssues}
displayIssueLocationsCount={this.props.displayIssueLocationsCount}
displayIssueLocationsLink={this.props.displayIssueLocationsLink}
export default class SourceViewerCode extends React.PureComponent {
/*:: props: {|
+ branch?: string,
displayAllIssues: boolean,
displayIssueLocationsCount?: boolean;
displayIssueLocationsLink?: boolean;
return (
<Line
+ branch={this.props.branch}
displayAllIssues={this.props.displayAllIssues}
displayCoverage={displayCoverage}
displayDuplications={displayDuplications}
/*::
type Props = {|
+ branch?: string,
displayAllIssues: boolean,
displayCoverage: boolean,
displayDuplications: boolean,
)}
<LineCode
+ branch={this.props.branch}
displayIssueLocationsCount={this.props.displayIssueLocationsCount}
displayIssueLocationsLink={this.props.displayIssueLocationsLink}
highlightedLocationMessage={this.props.highlightedLocationMessage}
/*::
type Props = {|
+ branch?: string,
displayIssueLocationsCount?: boolean,
displayIssueLocationsLink?: boolean,
highlightedLocationMessage?: { index: number, text: string },
{showIssues &&
issues.length > 0 && (
<LineIssuesList
+ branch={this.props.branch}
displayIssueLocationsCount={this.props.displayIssueLocationsCount}
displayIssueLocationsLink={this.props.displayIssueLocationsLink}
issues={issues}
/*::
type Props = {
+ branch?: string,
displayIssueLocationsCount?: boolean;
displayIssueLocationsLink?: boolean;
issues: Array<IssueType>,
/*:: props: Props; */
render() {
- const { issues, onIssueClick, openPopup, selectedIssue } = this.props;
+ const { branch, issues, onIssueClick, openPopup, selectedIssue } = this.props;
return (
<div className="issue-list">
{issues.map(issue => (
<Issue
+ branch={branch}
displayLocationsCount={this.props.displayIssueLocationsCount}
displayLocationsLink={this.props.displayIssueLocationsLink}
issue={issue}
/*::
type Props = {|
+ branch?: string,
checked?: boolean,
displayLocationsCount?: boolean;
displayLocationsLink?: boolean;
render() {
return (
<IssueView
+ branch={this.props.branch}
checked={this.props.checked}
currentPopup={this.props.openPopup}
displayLocationsCount={this.props.displayLocationsCount}
/*::
type Props = {|
+ branch?: string,
checked?: boolean,
currentPopup: ?string,
displayLocationsCount?: boolean;
role="listitem"
tabIndex={0}>
<IssueTitleBar
+ branch={this.props.branch}
currentPopup={this.props.currentPopup}
displayLocationsCount={this.props.displayLocationsCount}
displayLocationsLink={this.props.displayLocationsLink}
/*::
type Props = {|
+ branch?: string,
currentPopup: ?string,
displayLocationsCount?: boolean;
displayLocationsLink?: boolean;
const displayLocations = props.displayLocationsCount && locationsCount > 0;
- const issueUrl = getComponentIssuesUrl(issue.project, { issues: issue.key, open: issue.key });
+ const issueUrl = getComponentIssuesUrl(issue.project, {
+ branch: props.branch,
+ issues: issue.key,
+ open: issue.key
+ });
return (
<table className="issue-table">
it('should render the titlebar correctly', () => {
const element = shallow(
- <IssueTitleBar issue={issue} currentPopup={null} onFail={jest.fn()} togglePopup={jest.fn()} />
+ <IssueTitleBar
+ branch="feature-1.0"
+ issue={issue}
+ currentPopup={null}
+ onFail={jest.fn()}
+ togglePopup={jest.fn()}
+ />
);
expect(element).toMatchSnapshot();
});
Object {
"pathname": "/project/issues",
"query": Object {
+ "branch": "feature-1.0",
"id": "myproject",
"issues": "AVsae-CQS-9G3txfbFN2",
"open": "AVsae-CQS-9G3txfbFN2",
Object {
"pathname": "/project/issues",
"query": Object {
+ "branch": undefined,
"id": "myproject",
"issues": "AVsae-CQS-9G3txfbFN2",
"open": "AVsae-CQS-9G3txfbFN2",