Issue Reporter: display message if url length exceeds limits, #42603

This commit is contained in:
Rachel Macfarlane
2018-02-01 20:06:56 -08:00
parent 9e010775f2
commit db9dc63a85
4 changed files with 17 additions and 17 deletions

View File

@@ -58,10 +58,7 @@ ${this._data.issueDescription}
VS Code version: ${this._data.versionInfo && this._data.versionInfo.vscodeVersion}
OS version: ${this._data.versionInfo && this._data.versionInfo.os}
${this.getInfos()}
<!-- Generated by VS Code Issue Helper -->
`;
${this.getInfos()}`;
}
private getIssueTypeTitle(): string {
@@ -168,20 +165,12 @@ ${this._data.workspaceInfo};
return `${e.manifest.name}|${e.manifest.publisher.substr(0, 3)}|${e.manifest.version}`;
}).join('\n');
const extensionTable = `<details><summary>Extensions (${this._data.enabledNonThemeExtesions.length})</summary>
return `<details><summary>Extensions (${this._data.enabledNonThemeExtesions.length})</summary>
${tableHeader}
${table}
${themeExclusionStr}
</details>`;
// 2000 chars is browsers de-facto limit for URLs, 400 chars are allowed for other string parts of the issue URL
// http://stackoverflow.com/questions/417142/what-is-the-maximum-length-of-a-url-in-different-browsers
if (encodeURIComponent(extensionTable).length > 1600) {
return 'the listing length exceeds browsers\' URL characters limit';
}
return extensionTable;
}
}