Skip to content

Commit

Permalink
Revert log changes
Browse files Browse the repository at this point in the history
  • Loading branch information
praveenkuttappan committed Aug 18, 2024
1 parent 0d5db1d commit 015624e
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 34 deletions.
27 changes: 0 additions & 27 deletions src/dotnet/APIView/APIView/Model/CodeFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
using System.Text;
using System.Text.Json;
using System.Text.Json.Serialization;
using System.Text.RegularExpressions;
using System.Threading.Tasks;

namespace ApiView
Expand All @@ -24,8 +23,6 @@ public class CodeFile
DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull
};

private static Regex _packageNameParser = new Regex("([A-Za-z.]*[a-z]).([\\S]*)", RegexOptions.Compiled);

private string _versionString;
private static HashSet<string> _collapsibleLanguages = new HashSet<string>(new string[] { "Swagger" });
[Obsolete("This is only for back compat, VersionString should be used")]
Expand Down Expand Up @@ -152,29 +149,5 @@ public string GetApiText()
}
return sb.ToString();
}

public static CodeFile CreateDummyCodeFile(string originalName, string text)
{
var packageName = Path.GetFileNameWithoutExtension(originalName);
var packageNameMatch = _packageNameParser.Match(packageName);
var packageVersion = "";
if (packageNameMatch.Success)
{
packageName = packageNameMatch.Groups[1].Value;
packageVersion = $"{packageNameMatch.Groups[2].Value}";
}

var codeFile = new CodeFile();
codeFile.PackageName = packageName;
codeFile.PackageVersion = packageVersion;
codeFile.ReviewLines.Add(new ReviewLine
{
Tokens = new List<ReviewToken>
{
ReviewToken.CreateTextToken(text)
}
});
return codeFile;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -383,12 +383,10 @@ export class CodePanelComponent implements OnChanges{
}

scrollToNode(nodeIdHashed: string | undefined = undefined, nodeId: string | undefined = undefined) {
console.log("SCrolling to selected node: " + nodeIdHashed);
let index = 0;
let scrollIndex : number | undefined = undefined;
let indexesHighlighted : number[] = [];
while (index < this.codePanelRowData.length) {
console.log(index, this.codePanelRowData[index].nodeIdHashed, nodeIdHashed);
if (scrollIndex && this.codePanelRowData[index].nodeIdHashed !== nodeIdHashed) {
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,6 @@ export class ReviewPageComponent implements OnInit {
}

handleNavTreeNodeEmmitter(nodeIdHashed: string) {
console.log("Selected node: " + nodeIdHashed);
this.scrollToNodeIdHashed = nodeIdHashed;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,6 @@ export class CommentThreadComponent {
const commentId = target.getAttribute("data-item-id");
const commentData = this.codePanelRowData?.comments?.find(comment => comment.id === commentId)?.commentText.replace(/<[^>]*>/g, '').trim();

console.log(this.associatedCodeLine);

const codeLineContent = this.associatedCodeLine
? this.associatedCodeLine.rowOfTokens
.map(token => token.value)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ function buildCodePanelRows(nodeIdHashed: string, navigationTree: NavigationTree
buildChildren = false;
}

console.log(nodeIdHashed, buildNode, buildChildren, node.isNodeWithDiffInDescendants, node.isNodeWithNoneDocDiffInDescendants);
if (!buildNode && (!node.childrenNodeIdsInOrder || Object.keys(node.childrenNodeIdsInOrder).length === 0) &&
(apiTreeBuilderData?.diffStyle !== NODE_DIFF_STYLE || node.isNodeWithDiff)) {
buildNode = true;
Expand Down Expand Up @@ -155,7 +154,6 @@ function buildCodePanelRows(nodeIdHashed: string, navigationTree: NavigationTree


if (buildChildren) {
console.log("Building children for ", nodeIdHashed);
let orderIndex = 0;
while (node.childrenNodeIdsInOrder && orderIndex in node.childrenNodeIdsInOrder) {
let childNodeIdHashed = node.childrenNodeIdsInOrder[orderIndex];
Expand Down

0 comments on commit 015624e

Please sign in to comment.