// otherwise show code around the open issue
const aroundLine = locationLine || (openIssue.textRange && openIssue.textRange.endLine);
+ const allMessagesEmpty = locations != null && locations.every(location => !location.msg);
+
return (
<div ref={node => (this.node = node)}>
<SourceViewer
displayAllIssues={true}
displayIssueLocationsCount={false}
displayIssueLocationsLink={false}
+ displayLocationMarkers={!allMessagesEmpty}
highlightedLocations={locations}
highlightedLocationMessage={locationMessage}
loadIssues={this.props.loadIssues}
? flows[selectedFlowIndex]
: flows.length > 0 ? flows[0] : secondaryLocations;
- if (locations == null || locations.length === 0) {
+ if (locations == null || locations.length === 0 || locations.every(location => !location.msg)) {
return null;
}
displayAllIssues: boolean,
displayIssueLocationsCount?: boolean;
displayIssueLocationsLink?: boolean;
+ displayLocationMarkers?: boolean;
highlightedLine?: number,
highlightedLocations?: Array<FlowLocation>,
highlightedLocationMessage?: { index: number, text: string },
displayAllIssues: false,
displayIssueLocationsCount: true,
displayIssueLocationsLink: true,
+ displayLocationMarkers: true,
loadComponent,
loadIssues,
loadSources
displayAllIssues={this.props.displayAllIssues}
displayIssueLocationsCount={this.props.displayIssueLocationsCount}
displayIssueLocationsLink={this.props.displayIssueLocationsLink}
+ displayLocationMarkers={this.props.displayLocationMarkers}
duplications={this.state.duplications}
duplicationsByLine={this.state.duplicationsByLine}
duplicatedFiles={this.state.duplicatedFiles}
displayAllIssues: boolean,
displayIssueLocationsCount?: boolean;
displayIssueLocationsLink?: boolean;
+ displayLocationMarkers?: boolean;
duplications?: Array<Duplication>,
duplicationsByLine: { [number]: Array<number> },
duplicatedFiles?: Array<{ key: string }>,
displayIssues={displayIssues}
displayIssueLocationsCount={this.props.displayIssueLocationsCount}
displayIssueLocationsLink={this.props.displayIssueLocationsLink}
+ displayLocationMarkers={this.props.displayLocationMarkers}
duplications={this.getDuplicationsForLine(line)}
duplicationsCount={duplicationsCount}
filtered={filtered}
displayIssues: boolean,
displayIssueLocationsCount?: boolean;
displayIssueLocationsLink?: boolean;
+ displayLocationMarkers?: boolean;
duplications: Array<number>,
duplicationsCount: number,
filtered: boolean | null,
branch={this.props.branch}
displayIssueLocationsCount={this.props.displayIssueLocationsCount}
displayIssueLocationsLink={this.props.displayIssueLocationsLink}
+ displayLocationMarkers={this.props.displayLocationMarkers}
highlightedLocationMessage={this.props.highlightedLocationMessage}
highlightedSymbols={this.props.highlightedSymbols}
issues={this.props.issues}
branch?: string,
displayIssueLocationsCount?: boolean,
displayIssueLocationsLink?: boolean,
+ displayLocationMarkers?: boolean,
highlightedLocationMessage?: { index: number, text: string },
highlightedSymbols?: Array<string>,
issues: Array<Issue>,
let leadingMarker = false;
tokens.forEach((token, index) => {
- if (token.markers.length > 0) {
+ if (this.props.displayLocationMarkers && token.markers.length > 0) {
token.markers.forEach(marker => {
const message =
highlightedLocationMessage != null && highlightedLocationMessage.index === marker