+
{doc.key}
@@ -442,83 +498,85 @@ export function IssueDocumentsSection({
)}
-
{
- if (!activeDraft) {
- beginEdit(doc.key);
- }
- }}
- onBlurCapture={async (event) => {
- if (activeDraft) {
- await handleDraftBlur(event);
- }
- }}
- onKeyDown={async (event) => {
- if (activeDraft) {
- await handleDraftKeyDown(event);
- }
- }}
- >
- {activeDraft && !isPlanKey(doc.key) && (
-
{
- markDocumentDirty(doc.key);
- setDraft((current) => current ? { ...current, title: event.target.value } : current);
- }}
- placeholder="Optional title"
- />
- )}
+ {!isFolded ? (
{
+ if (!activeDraft) {
+ beginEdit(doc.key);
+ }
+ }}
+ onBlurCapture={async (event) => {
+ if (activeDraft) {
+ await handleDraftBlur(event);
+ }
+ }}
+ onKeyDown={async (event) => {
+ if (activeDraft) {
+ await handleDraftKeyDown(event);
+ }
+ }}
>
- {
- markDocumentDirty(doc.key);
- setDraft((current) => {
- if (current && current.key === doc.key && !current.isNew) {
- return { ...current, body };
- }
- return {
- key: doc.key,
- title: doc.title ?? "",
- body,
- baseRevisionId: doc.latestRevisionId,
- isNew: false,
- };
- });
- }}
- placeholder="Markdown body"
- bordered={false}
- className="bg-transparent"
- contentClassName={documentBodyContentClassName}
- mentions={mentions}
- imageUploadHandler={imageUploadHandler}
- onSubmit={() => void commitDraft(activeDraft ?? draft, { clearAfterSave: false, trackAutosave: true })}
- />
-
-
-
{
+ markDocumentDirty(doc.key);
+ setDraft((current) => current ? { ...current, title: event.target.value } : current);
+ }}
+ placeholder="Optional title"
+ />
+ )}
+
- {activeDraft && autosaveDocumentKey === doc.key
- ? autosaveState === "saving"
- ? "Autosaving..."
- : autosaveState === "saved"
- ? "Saved"
- : autosaveState === "error"
- ? "Could not save"
- : ""
- : ""}
-
+ {
+ markDocumentDirty(doc.key);
+ setDraft((current) => {
+ if (current && current.key === doc.key && !current.isNew) {
+ return { ...current, body };
+ }
+ return {
+ key: doc.key,
+ title: doc.title ?? "",
+ body,
+ baseRevisionId: doc.latestRevisionId,
+ isNew: false,
+ };
+ });
+ }}
+ placeholder="Markdown body"
+ bordered={false}
+ className="bg-transparent"
+ contentClassName={documentBodyContentClassName}
+ mentions={mentions}
+ imageUploadHandler={imageUploadHandler}
+ onSubmit={() => void commitDraft(activeDraft ?? draft, { clearAfterSave: false, trackAutosave: true })}
+ />
+
+
+
+ {activeDraft && autosaveDocumentKey === doc.key
+ ? autosaveState === "saving"
+ ? "Autosaving..."
+ : autosaveState === "saved"
+ ? "Saved"
+ : autosaveState === "error"
+ ? "Could not save"
+ : ""
+ : ""}
+
+
-
+ ) : null}
{confirmDeleteKey === doc.key && (
diff --git a/ui/src/pages/IssueDetail.tsx b/ui/src/pages/IssueDetail.tsx
index 5087bb73..b96ca7db 100644
--- a/ui/src/pages/IssueDetail.tsx
+++ b/ui/src/pages/IssueDetail.tsx
@@ -609,12 +609,7 @@ export function IssueDetail() {
const attachmentList = attachments ?? [];
const hasAttachments = attachmentList.length > 0;
const attachmentUploadButton = (
-
+ <>
fileInputRef.current?.click()}
disabled={uploadAttachment.isPending || importMarkdownDocument.isPending}
className={cn(
- "border-transparent bg-transparent shadow-none",
- attachmentDragActive && "bg-transparent",
+ "shadow-none",
+ attachmentDragActive && "border-primary bg-primary/5",
)}
>
{uploadAttachment.isPending || importMarkdownDocument.isPending ? "Uploading..." : "Upload attachment"}
-
+ >
);
return (