Links in the text open in a new tab; table text at 80%; table cells serialise from the editor - #108
Merged
Merged
Conversation
A browser does not follow a link inside editable content, so clicking one did nothing. The AppLinks plugin now handles every link: vapor: links act as before, anything else opens in a new tab with noopener,noreferrer, and the document stays where it is. Links imported from markdown carried target: null on the mark, which beat TipTap's _blank default at render time; the Link mark in app-links.ts keeps those attributes for schema parity but renders target and rel from its options, so every link element carries them. @tiptap/extension-link becomes a direct dependency. Tables set font-size 0.8em: they carry more per line than prose, and the smaller type keeps columns readable. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
serializeCellInline wrapped a cell's content in a richSchema paragraph. The editor serialises TipTap documents through the same path, and a richSchema paragraph refuses content from another schema, so every Yjs update on a document with a table threw inside the update handler. The client's markdown state then stayed empty: the tab title fell back to "vapor", the URL lost its slug, and anything else derived from that markdown went stale. The wrapper nodes now come from the cell's schema. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> (cherry picked from commit b2acc13)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Links open in a new tab
A browser never follows a link inside editable content, so clicking a link in a document did nothing. The
AppLinksplugin now handles every link in the text:vapor:links act as before (Agents panel, New document, Sign in), anything else opens in a new tab withnoopener,noreferrer, and the document stays where it is. Taps on touch do the same.Links imported from markdown also rendered without
target: therichSchemalink mark storestarget: null, and that null won over TipTap's_blankdefault at render time. TheLinkmark inapp/lib/app-links.tskeepstargetandrelon the mark for schema parity with the server but never renders them from it, so every link element carriestarget="_blank" rel="noopener noreferrer nofollow".@tiptap/extension-linkbecomes a direct dependency at the version StarterKit already installs.Table text at 80%
.tiptap table { font-size: 0.8em }. Tables carry more per line than prose; the smaller type keeps columns readable. Cells measure 12.88px against 16.1px prose in the dev server.Table cells serialise from the editor (found while verifying)
serializeCellInlinewrapped a cell's content in arichSchemaparagraph. The editor serialises TipTap documents through the same path, and a paragraph from one schema refuses content from another, so on any document with a table every Yjs update threw inside the client's update handler (Caught error while handling a Yjs update: Invalid content for node paragraph). The client's markdown state then stayed empty: the tab title fell back to "vapor", the URL lost its slug, and anything else derived from that markdown went stale. The wrapper nodes now come from the cell's own schema. Dates from #27; separate commit.Verified
Typecheck clean; 880 tests pass. Lint reports only the unused
READimport on main that #107 removes. New tests: a click or tap on an ordinary link callswindow.openwith_blankand is prevented; plain text is left alone; a link stored withtarget: nullrenders_blankand its rel; a table from a second schema instance serialises unchanged. In the browser: the seeded document's link carriestarget="_blank", a click attempts to open example.com in a new tab while the document tab stays put, cells render at 80%, and the tab title and slug now survive load on a document with a table.🤖 Generated with Claude Code