Commit Graph
1089 Commits
Author SHA1 Message Date
Tom Moor 4eca029b05 feat: Keep code block collapse button visible at the bottom of the viewport (#14328) 2026-10-24 20:28:32 -04:00
Tom Moor f4620c26d1 fix: Blue outlines and faded images in document update emails (#14325)
* fix: Editor selection outline and upload fade leak into email diffs

* fix: Round the outline on code blocks
2026-10-24 19:27:13 -04:00
Tom Moor 316a873d49 fix: Backspace and Delete do not remove line breaks in code blocks (#14319) 2026-10-24 18:17:33 -04:00
Tom Moor 0d13c183fd chore: Add lint rules for test conventions (#14318) 2026-10-24 14:09:36 -04:00
Tom Moor 33296fb974 chore: Add lint rule to require sanitizeUrl for href/src in toDOM (#14309)
* chore: Add lint rule to require sanitizeUrl for href/src in toDOM

* fix: Resolve sanitizer by binding and only match literal setAttribute names
2026-10-24 11:16:12 -04:00
Tom Moor 0fc91c3da8 fix: Skip pasted images without a src (#14287) 2026-10-24 10:02:48 -04:00
Tom Moor 4e807ca6fc perf: Copy only the patched path when recreating transforms (#14250)
* perf: Copy only the patched path when recreating transforms

recreateTransform deep copied the whole document for each patch
operation, and diffArrays compared elements with a generic isEqual. Copy
only the containers on the operation path and compare with a JSON-only
equality check. Revision changesets are about 6x faster.

* Use fast-deep-equal in place of a custom JSON equality check

* Restore isJSONEqual, fast-deep-equal throws on null-prototype attrs
2026-10-22 20:33:22 -04:00
Tom Moor 0995a8e36b perf: Reduce traversals and skip unneeded work in ProsemirrorHelper (#14243)
* perf: Reduce traversals and skip unneeded work in ProsemirrorHelper

* fix: Coerce leaf text to a string when checking for text
2026-10-22 18:33:16 -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 4f4fd88278 chore: Upgrade pako to 3 and remove @types/pako stub (#14199) 2026-10-21 08:36:51 -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 695e973e6b feat: Allow tables inside notices (#14175)
* feat: Allow tables inside notices

Blend table, rule and code colors onto the notice background, keep table
scroll shadows inside the notice, hide full width for tables in notices,
and fit new table columns to the available width.

* fix: Leave room for table row controls in notices

* fix: Blend table grips onto the notice background

* fix: Derive notice content colors from the softer notice styles
2026-10-20 19:05:10 -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 Moor 190c5e5148 feat: Softer notice colors with matching menu icons (#14177) 2026-10-20 18:55:51 -04:00
Tom Moor 94276a743c fix: Prevent duplicate heading anchor IDs (#14162)
A heading whose text ends in a number could get the same slug as a
numbered duplicate. Heading slugs now come from one HeadingSlugger that
skips taken IDs, and the server section lookup counts nested headings
like the editor does.
2026-10-20 08:28:54 -04:00
Tom Moor 2f68f32b40 fix: Polish UI copy, casing, and punctuation (#14144)
* fix: Polish UI copy, casing, and punctuation across the app

* fix: Remove duplicate period in API key scope hint
2026-10-19 09:05:24 -04:00
Tom Moor 9d4304a332 chore: Remove unused code (#14133)
* chore: Remove unused code

* Restore DiscordClient
2026-10-18 18:27:05 -04:00
Tom Moor e14dfcfcb4 perf: Stop restyling the document on every frame of the sidebar animation (#14132)
The document container and editor exposed their measured widths as inherited
CSS variables, so each frame of a width animation restyled every element in
the document. Full width blocks now use a container unit, and media resizing
measures the editor content width when it is needed.
2026-10-18 17:52:20 -04:00
Tom Moor 97cc147726 feat: Render Mermaid diagrams with Pele (#14126)
* feat: Render Mermaid diagrams with Pele

* fix: Translate empty diagram label

* fix: Prevent diagram flash when editors swap on load
2026-10-18 08:11:41 -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 bd49f85819 fix: Arrow up/down selects images like block nodes (#14119)
* fix: Arrow up/down selects images as block nodes, animate empty caption

* fix: Address review feedback on image arrow navigation and caption

- Check rendered display and visibility instead of attributes
- Keep navigation inside table cells
- Hide collapsed captions and remove min-height jump

* fix: Empty caption clipped in table cells

* Remove empty caption animation
2026-10-17 16:51:16 -04:00
Tom Moor 178e923cb7 feat: Add selection toolbar for video nodes (#14118)
* feat: Add selection toolbar for video nodes

* fix: Keep video caption on replace, download video as a file

* fix: Drop removed upload progress prop from video replace
2026-10-17 12:21:46 -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 d7711ee96f perf: Render editor UI from observable state instead of forceUpdate (#14073)
* perf: Coalesce editor React renders into an animation frame

dispatchTransaction ran calculateDir and forceUpdate synchronously on every
transaction, adding a style read and a React render to each keystroke. These
now run in an animation frame, at most once every 50ms.

Refs #14069

* fix: Reset the pending render frame on unmount

StrictMode remounts the same instance, and a stale handle would stop all later renders.

* perf: Render editor UI from observable state instead of forceUpdate

Replace the coalesced animation frame render with an observable editorState.
The editor no longer re-renders its widget tree on every transaction; the
selection toolbar observes the state only while it is active, so updates stay
synchronous and typing with a collapsed caret renders nothing. The floating
toolbar no longer measures the selection while hidden.

Refs #14069
2026-10-17 11:11:46 -04:00
Tom Moor f4c4018872 fix: Unfold toggle blocks when jumping to a comment (#14100)
* fix: Unfold toggle blocks when jumping to a comment

* fix: Reveal pending draft comment anchors in folded toggles
2026-10-15 21:40:53 -04:00
Tom MoorandClaude Opus 5.5 9e2565184e chore: Prune stale comments, TODOs, and type suppressions (#14092)
* chore: Remove unused lint disable directives

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

* chore: Replace TODO type suppressions with typed code

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

* chore: Remove obsolete workaround comments in tests and MediaDimension

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

* chore: Remove Tippy compatibility props from Tooltip

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

* chore: Decouple DropdownMenu props from Tooltip and clarify sharing styles

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

* chore: Remove stale retention TODOs from cleanup tasks

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

* chore: Register relations synchronously and clarify workaround comments

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

* chore: Replace Notion import TODOs with descriptive comments

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-15 08:54:37 -04:00
Tom Moor 22ab9ff592 fix: Do not escape periods inside numbers at the start of a line (#14085) 2026-10-13 18:20:28 -04:00
Tom Moor ee0f099439 fix: Dropped videos without a content type insert as attachments (#14086) 2026-10-13 18:20:24 -04:00
Tom Moor d3e991f977 fix: Restore selection outline on non-text block nodes (#14058) 2026-10-13 08:07:00 -04:00
Tom Moor 19d0b337b9 fix: Backspace does not delete RTL text in table cells (#14054)
Table grip and insert widgets at the start of a cell made ProseMirror treat the
grip as the first block of the cell, so RTL deletion was always blocked. The
add row and column controls now also show above the grips while hovered.
2026-10-12 09:40:34 -04:00
Tom Moor 27f7bda660 chore: Upgrade styled-components from v5 to v6 (#14047)
* chore: Upgrade styled-components to v6

* fix: Keep pseudo-selectors attached to their parent under stylis 4
2026-10-11 21:46:38 -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 046e7b1159 perf: Reduce editor mount cost (#14032)
* perf: Reduce editor mount cost

Avoid forced style recalculation when detecting direction, skip building
closed suggestion menus, remove duplicate Mermaid renders, lazily create
markdown parsers, batch node view registration and memoize the editor
container.

* perf: Skip rendering closed suggestion items on mobile
2026-10-11 16:14:38 +00:00
Tom Moor 5a5221305d fix: Divider uses text color when selected, matches table borders, and aligns drag handle (#14030) 2026-10-11 11:00:13 -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 be4d80faee fix: Add period to single-level heading numbers and use text color when not editing (#14026) 2026-10-11 09:46:55 -04:00
Tom Moor e571208871 fix: Spelling, grammar, punctuation, and translation string errors (#14017)
* fix: Spelling, grammar, punctuation, and translation string errors

* fix: Remove duplicate period and comma splice from review feedback
2026-10-11 09:07:07 -04:00
Tom MoorandClaude Opus 4.7 c10a214075 Expanding drag handle to all root level block nodes (#12167)
* Expanding drag handle to all root level block nodes

* wip

* looking good

* wip

* fix, drag video nodes

* fix mermaid

* Hide drag handle when printing, adjust heading actions for handle gutter

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* rtl

* Passive scroll listener, avoid dispatch on teardown

* Guard drag handle from re-showing mid-drag, use semantic button

* Align drag handle to first line, hide on layout images, tidy heading controls

* Fix stale drag handle target and drag data, rebuild Mermaid in moved containers, remove unused styles

* Extract drag handle target resolution into DragTarget class

* Move drag handle styles from inline to global CSS

* Use EditorStyleHelper class names and named constants in drag handle, translate its label

* Hide drag handle on a table that holds the selection

* Remove opacity transition from drag handle

* Move heading anchor into drag handle slot when read-only

* Move drop cursor class name to EditorStyleHelper

* Add empty line above comments, document the rule in AGENTS.md

* drag handle

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-10-10 08:19:31 -04:00
Tom Moor f00ff8e4a1 fix: Keep table grips above add row and column controls (#13997) 2026-10-09 22:17:52 -04:00
Tom Moor 3503a1087f fix: Do not store viewer-specific document unfurls on URL mentions (#14004) 2026-10-09 17:48:52 -04:00
Tom Moor 6e6eaf6b69 fix: Guard node view positions after the view is destroyed (#13983)
* fix: Guard node view positions after the view is destroyed

ProseMirror returns undefined from getPos once a node view is destroyed,
but ComponentProps typed it as always returning a number. Async handlers,
such as the mention unfurl, could then call setNodeMarkup with an undefined
position and throw a RangeError.

Fixes OUTLINE-CLOUD-D9N

* Remove excessive test
2026-10-07 09:09:16 -04:00
Tom Moor 3014a86b99 fix: Preserve lists in table cells on Markdown round-trip (#13978)
* fix: Preserve lists in table cells on Markdown round-trip

* fix: Rebuild alpha lists and lists after a paragraph in table cells
2026-10-06 23:24:34 -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 49817d0676 fix: Document and collection mentions on public shares navigate outside the share (#13920)
On a public share, MentionDocument and MentionCollection rendered a Link to
the bare /doc/... or /collection/... path. That route is not part of the
share, so the router fell through to the authenticated app and showed the
login screen. Regular text links to the same documents were unaffected
because they go through the editor's onClickLink handler, which already
prefixes the share route.

Scope mention paths with sharedModelPath when a shareId is in context.
Moves the helper into shared/utils so the editor can use it; the app
wrapper keeps the same signature and reads ROOT_SHARE_ID from env.
2026-10-05 22:23:11 -04:00
Tom Moor 9c7fee9f5c fix: Align consecutive floated images horizontally (#13900)
* fix: Align consecutive floated images horizontally

* fix: Align floated images in static HTML
2026-10-05 21:03:38 -04:00
Tom Moor 179d7dd7be fix: Improve table controls around merged cells (#13897)
* wip

* fix: Position grips in merged cells from the rendered layout

* fix: Only merge row and column selections that cover whole rows or columns

* perf: Find merged cell spans without scanning the table map

* refactor: Extract helpers for cells starting in a row or column
2026-09-27 13:10:43 -04:00
Tom Moor 9e405b50a4 refactor: Attach observers in ref callbacks instead of effects (#13881)
* refactor: Attach observers in ref callbacks instead of effects

Use React 19 ref callback cleanup for the ResizeObserver in Scrollable and
PDF and the IntersectionObserver in useOnScreen, which now returns a ref
callback rather than taking a ref object.

* fix: Remove unused ts-expect-error directives
2026-09-25 07:30:34 -04:00
Tom Moor 9313fd22da Revert "fix(editor): reserve layout space for images (#13850)" (#13885)
This reverts commit 361f4b126d.
2026-09-25 07:12:31 -04:00
Tom Moor 6763206927 fix: Preserve line breaks in Markdown table cells (#13866) 2026-09-24 21:27:32 -04:00
Tom Moor b72fd33e9c fix(editor): Use lazyWithRetry for shared editor lazy components (#13868)
Moves lazyWithRetry to shared/utils so the editor's ColorSwatch and
Mentions components can use it instead of React.lazy, avoiding the
Suspense reveal throttle once the chunk is loaded.
2026-09-23 20:50:37 -04:00