mirror of
https://github.com/outline/outline.git
synced 2026-12-03 01:59:03 +03:00
* feat: Add [[ trigger for mentioning or creating a document Opens a suggestions menu filtered to documents, backed by a title search, with options to create a new or nested document from the search term. Generalizes the suggestion machinery to support multi-character triggers, and extracts the mention menu item builders into app/editor/menus/mention. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * fix: Trim the mention search term Spaces are allowed in the search term, so a whitespace-only query rendered create-document items with an empty title and issued a title search that the server rejects. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * fix: Close suggestion menus on a space directly after the trigger Spaces remain allowed within a search term, they are only rejected as its first character. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * fix: Return models from fetchNamedPage The raw API payload was returned rather than the models added to the store, so callers that render the result are missing computed properties. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * refactor: Render the document menu from the store Matches the mention menu and paginated lists, where the request populates the store and the list is rendered from observables. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * feat: Order people above documents in the mention menu Uses a mention specific section so the command bar, where the section holds user management actions, is unaffected. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * fix: Hide create document options without a create handler Editors that do not pass onCreateLink, such as comments, inserted a mention pointing at a document that was never created. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
37 lines
1.4 KiB
TypeScript
37 lines
1.4 KiB
TypeScript
import type { AnyExtensionClass } from "@shared/editor/lib/types";
|
|
import BlockMenuExtension from "~/editor/extensions/BlockMenu";
|
|
import ClipboardTextSerializer from "~/editor/extensions/ClipboardTextSerializer";
|
|
import CommentGutterExtension from "~/editor/extensions/CommentGutter";
|
|
import DiagramsExtension from "@shared/editor/extensions/Diagrams";
|
|
import DocumentMenuExtension from "~/editor/extensions/DocumentMenu";
|
|
import EmojiMenuExtension from "~/editor/extensions/EmojiMenu";
|
|
import FindAndReplaceExtension from "~/editor/extensions/FindAndReplace";
|
|
import HoverPreviewsExtension from "~/editor/extensions/HoverPreviews";
|
|
import Keys from "~/editor/extensions/Keys";
|
|
import MentionMenuExtension from "~/editor/extensions/MentionMenu";
|
|
import PasteHandler from "~/editor/extensions/PasteHandler";
|
|
import PreventTab from "~/editor/extensions/PreventTab";
|
|
import SelectionToolbarExtension from "~/editor/extensions/SelectionToolbar";
|
|
import SmartText from "~/editor/extensions/SmartText";
|
|
|
|
type Nodes = AnyExtensionClass[];
|
|
|
|
export const withUIExtensions = (nodes: Nodes) => [
|
|
...nodes,
|
|
SmartText,
|
|
PasteHandler,
|
|
ClipboardTextSerializer,
|
|
BlockMenuExtension,
|
|
EmojiMenuExtension,
|
|
MentionMenuExtension,
|
|
DocumentMenuExtension,
|
|
FindAndReplaceExtension,
|
|
HoverPreviewsExtension,
|
|
SelectionToolbarExtension,
|
|
CommentGutterExtension,
|
|
DiagramsExtension,
|
|
// Order these default key handlers last
|
|
PreventTab,
|
|
Keys,
|
|
];
|