Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions packages/ui/src/lib/richText/RichTextEditor.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import { standardTheme } from "$lib/richText/config/theme";
// import CodeBlockTypeAhead from '$lib/richText/plugins/CodeBlockTypeAhead.svelte';
import EmojiPlugin from "$lib/richText/plugins/Emoji.svelte";
import IndentPlugin from "$lib/richText/plugins/IndentPlugin.svelte";
import InlineCodePlugin from "$lib/richText/plugins/InlineCode.svelte";
import PlainTextPastePlugin from "$lib/richText/plugins/PlainTextPastePlugin.svelte";
import OnChangePlugin, { type OnChangeCallback } from "$lib/richText/plugins/onChange.svelte";
Comment on lines 5 to 10
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IndentPlugin is removed from the editor and the plugin file is deleted, but there are still repo references to $lib/richText/plugins/IndentPlugin.svelte (e.g. packages/ui/tests/IndentPluginTestWrapper.svelte and packages/ui/tests/IndentPlugin.spec.ts). This will break TypeScript/build and likely CI. Please remove or update those tests/wrappers to reflect the new default Enter behavior (or replace them with new assertions for the built-in Lexical behavior).

Copilot uses AI. Check for mistakes.
Expand Down Expand Up @@ -288,7 +287,6 @@
{/if}

<RichTextPlugin />
<IndentPlugin />
<PlainTextPastePlugin />
<InlineCodePlugin />

Expand Down
16 changes: 8 additions & 8 deletions packages/ui/src/lib/richText/plugins/HardWrapPlugin.test.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import { wrapIfNecessary } from "$lib/richText/linewrap";
import { handleEnter } from "$lib/richText/plugins/IndentPlugin.svelte";
import {
createEditor,
TextNode,
type LexicalEditor,
COMMAND_PRIORITY_CRITICAL,
KEY_ENTER_COMMAND,
type NodeKey,
type NodeMutation,
} from "lexical";
Expand Down Expand Up @@ -697,9 +694,6 @@ describe("HardWrapPlugin with multi-paragraph structure", () => {
it("should allow adding multiple newlines at the end by typing", () => {
const maxLength = 72;

// Register the IndentPlugin's Enter handler (simulating real editor behavior)
editor.registerCommand(KEY_ENTER_COMMAND, handleEnter, COMMAND_PRIORITY_CRITICAL);

// Register the HardWrapPlugin's mutation listener (simulating the plugin being active)
editor.registerMutationListener(TextNode, (nodes: Map<NodeKey, NodeMutation>) => {
editor.update(
Expand Down Expand Up @@ -732,12 +726,18 @@ describe("HardWrapPlugin with multi-paragraph structure", () => {

// Simulate pressing Enter (like a user would)
editor.update(() => {
editor.dispatchCommand(KEY_ENTER_COMMAND, null);
const selection = getSelection();
if (isRangeSelection(selection)) {
selection.insertParagraph();
}
});

// Press Enter again
editor.update(() => {
editor.dispatchCommand(KEY_ENTER_COMMAND, null);
const selection = getSelection();
if (isRangeSelection(selection)) {
selection.insertParagraph();
}
});

// Verify the result
Expand Down
274 changes: 0 additions & 274 deletions packages/ui/src/lib/richText/plugins/IndentPlugin.svelte

This file was deleted.

Loading
Loading