;
}
- let { file, contents, diffStyle = "unified", open = true, observe }: Props = $props();
+ let {
+ file,
+ contents,
+ diffStyle = "unified",
+ open = true,
+ stickyTop = "page",
+ observe
+ }: Props = $props();
// the diff endpoint hands us metadata only, so unlike the commit page we give
// pierre both file contents and let it diff them — which is also what makes
@@ -73,8 +81,12 @@
-
-
+
diff --git a/web/src/lib/components/repo/pulls/PullDiffFileList.svelte b/web/src/lib/components/repo/pulls/PullDiffFileList.svelte
index 6324a58a6..b237245b1 100644
--- a/web/src/lib/components/repo/pulls/PullDiffFileList.svelte
+++ b/web/src/lib/components/repo/pulls/PullDiffFileList.svelte
@@ -16,9 +16,10 @@
diff: PullDiff;
diffStyle?: DiffStyle;
allOpen?: boolean;
+ stickyTop?: "page" | "viewport";
}
- let { deps, diff, diffStyle = "unified", allOpen = true }: Props = $props();
+ let { deps, diff, diffStyle = "unified", allOpen = true, stickyTop = "page" }: Props = $props();
// the payload carries no line text, so each card's two sides are fetched on
// demand as it nears the viewport, a few at a time. the caller wraps this
@@ -98,6 +99,7 @@
contents={entries[file.key]}
{diffStyle}
open={allOpen}
+ {stickyTop}
{observe}
/>
{/each}