mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-21 06:10:44 +08:00
Keep the patch description open while editing
The description collapses past 300px behind a show more toggle, which also applied to the editor that replaces it. Half of what was being written could be cut off, with a control offering to hide more of it. Editing state moves from the revision component to a bindable prop, so the patch view that owns the collapse can see it.
This commit is contained in:
@@ -103,6 +103,9 @@
|
||||
// revision list can be marked, not just the selected one.
|
||||
draftRevisionIds?: string[];
|
||||
showingRevisionDiff?: boolean;
|
||||
// Whether the description is being edited, so the view around it can keep
|
||||
// it open rather than collapsing what is being typed.
|
||||
editingDescription?: boolean;
|
||||
// Review ids (and `STANDALONE_COMMENTS`) whose code comments are
|
||||
// hidden from the diff.
|
||||
hiddenCommentSources?: string[];
|
||||
@@ -132,6 +135,7 @@
|
||||
draftReviewId,
|
||||
draftRevisionIds = [],
|
||||
showingRevisionDiff = $bindable(true),
|
||||
editingDescription = $bindable(false),
|
||||
hiddenCommentSources = [],
|
||||
filesExpanded = $bindable(true),
|
||||
onViewChanges,
|
||||
@@ -1017,8 +1021,6 @@
|
||||
}) as Thread[],
|
||||
);
|
||||
|
||||
let editingDescription = $state(false);
|
||||
|
||||
async function editRevision(
|
||||
description: string,
|
||||
embeds: Embed[],
|
||||
|
||||
Reference in New Issue
Block a user