110 Commits
Author SHA1 Message Date
Tom Moor 49aee74190 feat: Add filtering to tables in the editor (#14625)
* feat: Add filtering to tables in the editor

* Show the column filter button on header hover in edit mode

* Keep the filter button shown while its menu is open

* Move focusEditor to its own module

* Anchor the filter menu to the filter button

* Address review feedback on table filtering

* Show the filter button background while its menu is open

* Always show the filter button background with its icon

* Remove value counts and hide Clear when there is no filter

* Translations

* placeholder
2026-11-18 22:37:15 -05:00
Tom Moor 880f58b20d fix: Cursor moves before highlighted token in code blocks with line numbers (#14382) 2026-10-31 10:40:39 -04:00
Tom Moor a374ce9b46 fix: Viewers attributed as editors when their editor repairs remote changes (#14424)
* fix: Viewers attributed as editors when their editor repairs remote changes

* fix: Rescan after remote changes and assign block ids when parsing markdown

* chore: Import uuid as generateUuid in ToggleBlock

* refactor: Add RepairPlugin to repair only on local changes, checking remote changes for pending repairs

* fix: Assign block ids on the server so patches keep existing ids, keep unchanged mention ids

* fix: Store API edits in the editor's trailing node form
2026-10-30 22:27:31 -04:00
Tom Moor 77c7521d3b fix: Arrow keys move the cursor into code block line numbers (#14388)
* fix: Arrow keys move the cursor into code block line numbers

* fix: ArrowLeft at the start of a code line hides the caret
2026-10-29 18:49:24 -04:00
Tom Moor 3e5de4b1f5 chore: Upgrade refractor from 3 to 5 (#14195)
* chore: Upgrade refractor from 3 to 5

* Revert unrelated tsconfig formatting
2026-10-21 22:56:53 -04:00
Tom Moor af83062fad perf: Faster typing in large code blocks (#14181)
* perf: Cache code block highlighting by node and defer large blocks

* perf: Reuse decorations of unchanged code blocks, only edits postpone refresh
2026-10-20 21:14:32 -04:00
Tom Moor 0853354daf feat: Show code block line numbers alongside line wrapping (#14170)
* feat: Show code block line numbers alongside line wrapping

Render line numbers as a widget at the start of each line so they align
with wrapped lines and stay fixed during horizontal scroll.

* fix: Keep line number gutter size inside table cells
2026-10-20 19:02:27 -04:00
Tom MoorandClaude Opus 5.5 5647621224 chore: Prune redundant comments and type suppressions (#14124)
* chore: Prune redundant comments and normalize lint directives

Removes comments that restate the following line and stale TODOs, drops
the passive event listener feature check now that all supported browsers
support it, and renames eslint directives to oxlint.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BehTjuZwKbN5csMCp3H4QH

* fix: Evaluate restricted team domains at validation time

The restricted email provider list was captured when the model loaded, so
it could not follow the hosting environment and the tests that covered it
never reached the model.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BehTjuZwKbN5csMCp3H4QH

* chore: Replace type suppressions with accurate types

Adds a Concrete helper type for registries of abstract classes, declares
missing Sequelize and refractor typings, uses public ProseMirror APIs, a
typed mock context helper in middleware tests, and a StaticLink component
for sidebar rows being edited.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BehTjuZwKbN5csMCp3H4QH

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-17 17:07:39 -04:00
Tom Moor 128c240405 Render uploads with the same component as the uploaded node (#14117)
* feat: Render uploading images and videos with their node component

* fix: Insert uploaded block nodes next to the paragraph instead of inside it

* fix: Insert dropped block nodes on the nearest side of the paragraph

* feat: Fade in uploaded images and videos from their placeholder

* feat: Preview the new image while it replaces an existing one

* fix: Keep the placeholder size and preload pasted images after upload

* fix: Move the selection off an image while an upload replaces it

* feat: Play uploaded videos from the local file in the uploading editor

* feat: Display uploaded images from the local file in the uploading editor

* feat: Soften image and video corners, round them fully when selected

* feat: Render uploading attachments with the attachment component

* feat: Show the file size of an attachment while it uploads

* feat: Show upload progress on the placeholder instead of a toast

* fix: Fade the content of an uploading file but not its progress bar

* fix: Keep the local file of an upload when its placeholder is mapped away

* chore: Simplify upload placeholder state and remove unused progress callback

* Remove test

* fix: Address review feedback on upload placeholders

Expose upload progress to assistive technology outside the inert placeholder, free local files when the editor state is replaced, reuse the fadeIn animation and move the video wrapper class to EditorStyleHelper.

* chore: Move image and PDF wrapper class names to EditorStyleHelper

* feat: Scale in an upload placeholder when it appears

* chore: Make the upload placeholder scale-in more subtle
2026-10-17 12:12:25 -04:00
Tom Moor fe3c6db0f0 fix: Emoji menu conflicts with ::: notice shortcut (#14031)
* fix: Close suggestion menus when typed text is no longer a search term

* fix: Use typed position rather than cached query to close menu
2026-10-11 14:23:23 -04:00
Tom Moor d6c0fe71df fix: Repair table cells with invalid spans (#14028)
* fix: Repair table cells with invalid spans

Fixes OUTLINE-CLOUD-AG8
Fixes OUTLINE-CLOUD-D9J

* fix: Check every table on the first edit, lowercase JSDoc params
2026-10-11 10:53:25 -04:00
Tom Moor 15d6592993 fix: Guard against keydown events without a key in suggestions menu (#13975)
Fixes OUTLINE-CLOUD-CCN
2026-10-06 09:23:23 -04:00
Tom Moor 11abb1c752 perf: Filter placeholder candidates before evaluating conditions (#13760) 2026-09-16 20:38:26 -04:00
Tom Moor 5ee3f1a5d9 perf: Refactor y-prosemirror loading (#13521)
* wip

* perf: Refactor y-prosemirror loading
2026-08-21 20:49:29 -04:00
Tom Moor cdc10b4564 fix: Crash when a remote edit arrives during a column resize (#13452)
Every remote change is applied as a full document replacement, which
invalidates the column resize handle while the drag is still active.
Releasing the pointer then resolved position -1 and threw.

Cancel the drag when the handle no longer points at a cell.

Fixes OUTLINE-CLOUD-B3R
2026-08-15 20:25:51 -04:00
Tom MoorandClaude Opus 5 551304697d feat: Highlight trigger text while suggestion menu is open (#13406)
* feat: Highlight trigger text while suggestion menu is open

Adds an inline decoration around the trigger character and search term
while the block, emoji, or mention menu is open.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* fix: Multiplayer edits

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 21:26:31 -04:00
Tom MoorandClaude Opus 5 9181bf61b6 Add [[ trigger for mentioning or creating a document (#13402)
* 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>
2026-08-13 07:57:13 -04:00
Tom Moor e6908c1511 feat: Inline read-only comments (#13209)
* feat: Inline read-only comments

* Improve anchor disambiguation

* fix: Spurious edits from inline comments
2026-08-01 08:08:52 -04:00
Tom Moor b377c2cf96 Allow pasting on images to replace in editor (#13178)
* Allow pasting on images to replace in editor

* feedback
2026-07-28 08:20:33 -04:00
Tom Moor b1d2fb986f chore: Address 11 lint warnings (#13092) 2026-07-21 23:07:10 -04:00
Tom Moor 96a5034714 fix: Long code words can overflow comment bounds (#12961)
* fix: Long code words can overflow comment bounds

* Add to RevisionViewer
2026-07-10 17:30:34 -04:00
Tom Moor 7993723931 feat: Add toggle headings (#12788) 2026-06-22 19:28:13 -04:00
Tom Moor 25da5596a9 fix: Inline code marks longer than the width of editor escape (#12735) 2026-06-18 08:56:19 -04:00
Tom Moor 1eba87020c fix: Prevent block menu trigger when marked (#12515)
* Prevent block menu trigger when marked

* PR feedback
2026-05-28 21:30:53 -04:00
Tom MoorandClaude Opus 4.7 51a1d3bf50 perf: Cache decorations in editor plugins (#12030)
Avoid full document traversal on every keystroke by mapping decorations
through the transaction when no relevant nodes changed. Uses
changedDescendants to detect when a heading, image, or code_inline-marked
text actually changes; otherwise the existing DecorationSet is mapped to
new positions cheaply.

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 11:09:57 -04:00
Tom Moor 0139b91b5d chore: Replace lodash with es-toolkit (#12281)
* chore: Replace lodash with es-toolkit

Migrate all direct lodash imports to es-toolkit/compat for a smaller,
faster, lodash-compatible utility library. Transitive lodash usage from
other packages remains unchanged.

* fix: Restore isPlainObject semantics in CanCan policy

The lodash migration aliased `isObject` to `lodash/isPlainObject` and
the codemod incorrectly mapped the local name to es-toolkit's `isObject`,
which also returns true for arrays and functions. This caused condition
objects in policy definitions to be skipped, breaking authorization
checks across the codebase.

* fix: Restore unicode-aware length counting in validators

es-toolkit/compat's size() returns string.length, while lodash's _.size()
counts unicode code points. Switch to [...value].length to preserve the
previous behavior so multi-byte characters like emoji count as one.
2026-05-06 21:03:47 -04:00
Tom Moor f9a2cbc1b3 chore: resolve remaining unbound-method lint warnings (#12206)
* chore: resolve remaining unbound-method lint warnings

Apply targeted fixes per call pattern: arrow wrappers when passing a
method as a callback, arrow-function class fields when the method
doesn't depend on `this`, and `.bind()` when capturing for later
invocation.

Also replaces the rfc6902 hasOwnProperty re-export with a small wrapper
function so callers don't reference an unbound prototype method.

* chore: memoize history.goBack callbacks

Stable identity prevents Button re-renders and avoids re-subscribing
the global keydown handler in RegisterKeyDown when the parent renders.
2026-04-28 20:49:35 -04:00
Tom Moor a411e08f1f chore: Address code quality findings (#11960)
* chore: Address code quality findings

* Round 2, quality findings

* fix: Add fallback for MediaQueryList.addEventListener in test env

The jsdom test environment doesn't implement addEventListener on
MediaQueryList. Prefer addEventListener but fall back to the
deprecated addListener when unavailable.
2026-04-04 16:11:10 -04:00
Tom MoorandCopilot Autofix powered by AI b9c9dc4127 Potential fixes for 3 code quality findings (#11955)
* Apply suggested fix to shared/editor/plugins/SuggestionsMenuPlugin.ts from Copilot Autofix

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>

* Apply suggested fix to shared/editor/plugins/SuggestionsMenuPlugin.ts from Copilot Autofix

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>

* Apply suggested fix to shared/editor/plugins/SuggestionsMenuPlugin.ts from Copilot Autofix

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
2026-04-04 11:07:40 -04:00
Tom Moor 4ad1baa115 fix: Add support for full width at symbol (#11951) 2026-04-04 09:05:20 -04:00
Seungwoo Ham 81ef635f36 fix: Update mention search query during IME compositionupdate (#11944) 2026-04-03 22:17:30 -04:00
Apoorv Mishra 0e978e1e34 feat: highlight commented images (#11808) 2026-03-22 22:19:48 -04:00
Tom MoorandClaude Opus 4.6 0ba310e027 Remove unused files and dependencies (#11850)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 18:44:51 -04:00
Copilotandtommoor 14fc3b01db Fix suggestion menus blocked by placeholder marks (#11796)
* Initial plan

* fix: suggestion menus not opening when typing trigger inside placeholder mark

Co-authored-by: tommoor <380914+tommoor@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: tommoor <380914+tommoor@users.noreply.github.com>
2026-03-19 17:45:03 -04:00
Tom Moor fd9216541c chore: Add tests covering fixes in #11178 (#11179) 2026-01-14 08:26:26 -05:00
Tom Moor c0ac317329 fix: Various issues with tables (#11178)
* fix: This means the single-column table fix never actually works.

* fix: parseInt in map passed index to radix

* fix: Column sizing

* fix: Incorrect corner radius on single column table
2026-01-13 21:04:02 -05:00
Tom MoorandCopilot 5279a58753 feat: Dragging of table rows and columns (#11138)
* wip: Dragging of table rows and columns

* wip

* grabbing cursor

* refactor

* Update shared/editor/plugins/TableDragDropPlugin.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update shared/editor/plugins/TableDragDropPlugin.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-01-10 12:32:36 -05:00
Tom Moor 15f2959574 fix: Large base64 images pasted as HTML cause doc not to sync (#10982)
* First pass

* Use placeholders

* tsc
2025-12-23 20:03:37 -05:00
Tom Moor bf45e97641 chore: Enforce type import consistency (#10968)
* Update types

* fix circular dep

* type imports

* lint type imports and --fix
2025-12-19 23:07:02 -05:00
Tom Moor 71d15a3f9b chore: Plugin naming consistency (#10751) 2025-11-29 20:29:50 +00:00
Apoorv MishraandTom Moor 06ec6fdfbb Enable commenting on images (#10474)
* feat: enable commenting on image nodes

* chore: make anchorPlugin a top level plugin

* fix: className

* fix: review

* fix: tsc

* fix: checks

* Tweak menu order to match

---------

Co-authored-by: Tom Moor <tom@getoutline.com>
2025-10-28 11:34:40 +05:30
Tom Moor 221169db51 fix: Remove mime-types usage from the browser – fixes dev/vite warnings (#9926) 2025-08-14 08:02:13 -04:00
Tom Moor 34059ce0ef chore: More missing transactions (#9811)
* fix: Missing transaction in notifications.update_all

* lint
2025-08-03 21:52:10 -04:00
Tom Moor ce3bba9f33 fix: Error in TableLayoutPlugin when table does not exist in previous state (#9795) 2025-08-02 12:10:57 +00:00
Tom Moor bbe16f26e4 fix: Toggling table full width should always go fullwidth (#9792) 2025-08-02 07:17:37 -04:00
Tom Moor 0125e2b05d chore: Define classname in EditorStyleHelper (#9735) 2025-07-26 02:08:54 +00:00
Tom Moor e1fe955a76 fix: Wrap words in inline span to ensure correct break wrapping (#9724)
* fix: Wrap words in inline span to ensure correct break wrapping

* docs
2025-07-24 22:03:21 -04:00
codegen-sh[bot]andTom Moor dc3952212f Add table cell merge/unmerge functionality (#9322)
* Add table cell merge/unmerge functionality

- Add new tableCell menu with merge and unmerge options
- Update SelectionToolbar to show tableCell menu for CellSelection
- Add mergeCells and splitCell commands to Table node
- Add dictionary entries for merge/split cell tooltips
- Use placeholder icons (PlusIcon for merge, MoreIcon for split)

Fixes #6977

* fixes

* fix: Header cells end up floating with some effort

* refactor

* collapse

---------

Co-authored-by: codegen-sh[bot] <131295404+codegen-sh[bot]@users.noreply.github.com>
Co-authored-by: Tom Moor <tom@getoutline.com>
2025-06-08 22:05:29 -04:00
Tom MoorandApoorv Mishra f7f1f07716 perf: Utilize plugin state in placeholder plugin (#9283)
* perf: Utilize plugin state in placeholder plugin

* perf: Move textContent calculation out of loop

* Update shared/editor/plugins/PlaceholderPlugin.ts

Co-authored-by: Apoorv Mishra <apoorvmishra101092@gmail.com>

* Update PlaceholderPlugin.ts

---------

Co-authored-by: Apoorv Mishra <apoorvmishra101092@gmail.com>
2025-05-23 14:51:09 -04:00
Apoorv Mishra 2fe887ef57 Refactor Placeholder plugin to make it configurable (#9224)
* fix: refactor to make configurable

* fix: make it a reusable plugin so that it can be colocated with nodes eligible for placeholders

* fix: cond -> condition

* fix: `pos` -> `$start` as param

* fix: cleanup
2025-05-16 20:58:06 -04:00