Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.
Go
fix(editor): let the content editor shrink so long links wrap instead of widening dialogs (#10551)
小妍儿 ✨d832495aa440
diff --git a/packages/views/editor/content-editor.test.tsx b/packages/views/editor/content-editor.test.tsxindex f936909f8f..e008273616 100644--- a/packages/views/editor/content-editor.test.tsx+++ b/packages/views/editor/content-editor.test.tsx@@ -186,6 +186,16 @@ describe("ContentEditor", () => {expect(mockFocus).toHaveBeenCalledWith("end");});+ it("lets the editor shell shrink below its content's min-content width", () => {+ // The shell is a flex item; without min-w-0 its automatic minimum width is+ // the longest unbreakable token (a long URL), so a bare link widens the+ // create-issue description pane past the dialog and images stretch with it.+ render(<ContentEditor placeholder="Add description..." />);++ const shell = screen.getByTestId("editor-content").parentElement;+ expect(shell).toHaveClass("min-w-0");+ });+it("does not hijack clicks that land inside the ProseMirror node", () => {render(<ContentEditor placeholder="Add description..." />);diff --git a/packages/views/editor/content-editor.tsx b/packages/views/editor/content-editor.tsxindex 43e98e9caf..6866e44dc0 100644--- a/packages/views/editor/content-editor.tsx+++ b/packages/views/editor/content-editor.tsx@@ -1047,7 +1047,7 @@ const ContentEditor = forwardRef<ContentEditorRef, ContentEditorProps>(<AttachmentDownloadProvider attachments={providerAttachments}><divref={wrapperRef}- className="relative flex flex-1 min-h-full flex-col"+ className="relative flex min-w-0 flex-1 min-h-full flex-col"onMouseDown={handleContainerMouseDown}><EditorContent className="flex flex-1 flex-col" editor={editor} />