mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-21 22:30:41 +08:00
Virtualize the patch-review diff renderer
Route the comment-capable diff through the same single virtualizer as the commit diff instead of rendering every file and line at once.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
import type { CodeComments } from "@app/components/Diff.svelte";
|
||||
import type { Revision } from "@bindings/cob/patch/Revision";
|
||||
|
||||
import type { CodeComments } from "@app/lib/diffComments";
|
||||
import { cachedGetDiff, cachedListCommits } from "@app/lib/invoke";
|
||||
import { pluralize } from "@app/lib/utils";
|
||||
|
||||
@@ -209,6 +209,10 @@
|
||||
{#await cachedGetDiff(rid, { base, head, unified: 3, highlight: true })}
|
||||
<span class="txt-body-m-regular">Loading…</span>
|
||||
{:then diff}
|
||||
<Changeset expanded={filesExpanded} {head} {diff} {codeComments} />
|
||||
<!-- The patch layout already pads its content, so the diff cards don't add
|
||||
their own side inset and align with the rest of the patch. -->
|
||||
<div style:--diff-inset="0">
|
||||
<Changeset expanded={filesExpanded} {head} {diff} {codeComments} />
|
||||
</div>
|
||||
{/await}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user