Uh oh!
There was an error while loading. Please reload this page.
feat(editor): migrate rich text editor to Tiptap with Astryx inline citations - #18
Merged
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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.
Summary
Migrates Plot's artifact rich text editor from Lexical to Tiptap (ProseMirror) and introduces interactive Astryx-styled inline text citation capsules (
<Citation variant="label" />) with dynamic source provider icons (GitHub, Linear, Notion, Slack, Figma) and a contextual navigation popover aligned with Plot's minimalist design language.Why
Changes
1. Editor Core & Dependencies (
apps/web/package.json)@tiptap/react,@tiptap/core,@tiptap/starter-kit,@tiptap/extension-placeholder, andtiptap-markdown.2. Astryx Inline Citation Extension (
tiptap-citation-extension.tsx)TiptapCitationExtension(inline atom node view) rendering Astryx's<Citation variant="label" />.getSourceProviderIcon,resolveProviderName) to render authentic brand SVGs (GitHub, Linear, Notion, Slack, Figma) inside the leading icon slot of each citation capsule.← → 1/N) for statements backed by multiple evidence items.Open ↗external link action.rounded-2xlcorners,backdrop-blur-xl, and soft diffuse drop shadow matching Plot's design system.3. Tiptap Draft Editor (
tiptap-draft-editor.tsx,artifact-document-surface.tsx)TiptapDraftEditorhandling real-time editing, dynamic word/character metrics counting, and save state lifecycles (Saved↔Unsaved changes).tiptapToLexicalJsonserializer ensuring drafts sent to/api/plot/artifact-variantsmatch the expected schema for database persistence and backend validation.CitedDraftEditoronArtifactDocumentSurface.4. Testing & Verification
tiptap-draft-editor.test.tsxverifying read-only historical rendering and state transitions.pnpm --filter @plot/web test).next build).playwright-cli(inline icon rendering, popover interactions, real-time typing, and backend draft saving).