Skip to content

Commit

Permalink
[gui] Display full filename
Browse files Browse the repository at this point in the history
No need for truncating long filenames in GUI.
  • Loading branch information
bruntib committed Jan 8, 2025
1 parent 8421e16 commit 2edef2f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -194,20 +194,8 @@ function formatReportEvents(report, events) {
const isResult = index === events.length - 1;

let fileName = null;
let shortFileName = null;
if (showFileName) {
fileName = step.filePath.replace(/^.*(\\|\/|:)/, "");

shortFileName = fileName;
if (shortFileName.length > 12) {
const extensionParts = shortFileName.split(".");
const fnWithoutExt =
extensionParts.slice(0, extensionParts.length).join(".");
const extension = (extensionParts.length > 1
? "." + extensionParts[extensionParts.length - 1]
: "");
shortFileName = fnWithoutExt.substr(0, 8) + "..." + extension;
}
}

const highlightData = getHighlightData(highlightStack, step);
Expand All @@ -229,8 +217,7 @@ function formatReportEvents(report, events) {
reportStepIcon: reportStepIcon,
bgColor: highlightData.bgColor,
level: indentation,
fileName: fileName,
shortFileName: shortFileName
fileName: fileName
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
L{{ item.data.startLine }} – {{ item.name }}
</span>
<span v-else-if="item.kind === ReportTreeKind.SEVERITY_LEVEL">
{{ item.name }}
{{ item.name }}
<span v-if="newReportCount" style="color: #ec7672;">
{{ newReportCountLabel }}
</span>
Expand Down Expand Up @@ -52,7 +52,7 @@ export default {
},
computed: {
fileName() {
return this.item.shortFileName ? `${this.item.shortFileName}:` : "L";
return this.item.fileName ? `${this.item.fileName}:` : "L";
},
isExtendedReportData() {
Expand Down

0 comments on commit 2edef2f

Please sign in to comment.