Prettier.
diff --git a/loop/webui/src/web-components/sketch-diff-view.ts b/loop/webui/src/web-components/sketch-diff-view.ts
index ba20816..47c14f3 100644
--- a/loop/webui/src/web-components/sketch-diff-view.ts
+++ b/loop/webui/src/web-components/sketch-diff-view.ts
@@ -190,7 +190,7 @@
if (!response.ok) {
console.error(
- `Failed to load diff2html CSS: ${response.status} ${response.statusText}`
+ `Failed to load diff2html CSS: ${response.status} ${response.statusText}`,
);
return;
}
@@ -240,7 +240,7 @@
if (!response.ok) {
throw new Error(
- `Server returned ${response.status}: ${response.statusText}`
+ `Server returned ${response.status}: ${response.statusText}`,
);
}
@@ -367,7 +367,7 @@
// Target code lines first, then find their parent rows
const codeLines = diff2htmlContent.querySelectorAll(
- ".d2h-code-side-line, .d2h-code-line"
+ ".d2h-code-side-line, .d2h-code-line",
);
// Create a Set to store unique rows to avoid duplicates
@@ -392,7 +392,7 @@
// Find the code line number element (first TD in the row)
const lineNumberCell = rowElem.querySelector(
- ".d2h-code-side-linenumber, .d2h-code-linenumber"
+ ".d2h-code-side-linenumber, .d2h-code-linenumber",
);
if (!lineNumberCell) return;
@@ -460,7 +460,7 @@
// Reset the comment input
const commentInput = this.shadowRoot?.getElementById(
- "diffCommentInput"
+ "diffCommentInput",
) as HTMLTextAreaElement;
if (commentInput) {
commentInput.value = "";
@@ -473,13 +473,18 @@
if (row) {
// Get the position of the row
const rowRect = row.getBoundingClientRect();
- const diffContainerRect = this.shadowRoot?.querySelector(".diff-container")?.getBoundingClientRect();
-
+ const diffContainerRect = this.shadowRoot
+ ?.querySelector(".diff-container")
+ ?.getBoundingClientRect();
+
if (diffContainerRect) {
// Position the comment box below the row
- const topPosition = rowRect.bottom - diffContainerRect.top + this.shadowRoot!.querySelector(".diff-container")!.scrollTop;
+ const topPosition =
+ rowRect.bottom -
+ diffContainerRect.top +
+ this.shadowRoot!.querySelector(".diff-container")!.scrollTop;
const leftPosition = rowRect.left - diffContainerRect.left;
-
+
commentBox.style.top = `${topPosition}px`;
commentBox.style.left = `${leftPosition}px`;
commentBox.style.display = "block";
@@ -527,7 +532,7 @@
*/
private submitDiffComment(): void {
const commentInput = this.shadowRoot?.getElementById(
- "diffCommentInput"
+ "diffCommentInput",
) as HTMLTextAreaElement;
if (!commentInput) return;