feat(tiptap): extend theme CSS variables, voice-block copy-clear, and rebuild dist - #446
Open
dengzhongyuan365-dev wants to merge 1 commit into
Conversation
… dist rebuild Extend applyTheme with six new CSS variables consumed by image-interactions and format-toolbar for full theme linkage. Add voiceBlockCopyClear ProseMirror plugin to clear transcription and regenerate voiceId on copy/cut. Add context-menu probe scripts. Add frontend unit tests. Rebuild dist bundle.
There was a problem hiding this comment.
Sorry @dengzhongyuan365-dev, your pull request is larger than the review limit of 150000 diff characters
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: dengzhongyuan365-dev The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Reviewer's GuideExtends the Tiptap debug editor with theme-aware CSS variables, a voice-block copy-clear ProseMirror plugin, context-menu/scroll reporting hooks, and corresponding tests plus rebuilt dist. Sequence diagram for voice-block copy-clear behavior on copysequenceDiagram
actor User
participant ProseMirrorEditor
participant voiceBlockCopyClearPlugin
participant Clipboard
User->>ProseMirrorEditor: copy
ProseMirrorEditor->>voiceBlockCopyClearPlugin: transformCopied(slice)
voiceBlockCopyClearPlugin->>voiceBlockCopyClearPlugin: transformFragment(fragment)
voiceBlockCopyClearPlugin->>voiceBlockCopyClearPlugin: generateVoiceId()
voiceBlockCopyClearPlugin-->>ProseMirrorEditor: Slice(newContent, openStart, openEnd)
ProseMirrorEditor-->>Clipboard: write(modifiedSlice)
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
What changed
Extends the Tiptap editor frontend with full theme CSS variable linkage, a voice-block copy-clear plugin, context-menu probe scripts, and a rebuilt dist bundle.
applyTheme): add six new CSS variables (--dvn-panel-bg,--dvn-panel-border,--dvn-toolbar-border,--dvn-hover-bg,--dvn-clear-btn-bg,--dvn-active-outline) consumed byimage-interactions.jsandformat-toolbar.jsfor full light/dark theme linkage.voiceBlockCopyClear): ProseMirror plugin that clears transcription text, regeneratesvoiceId, and resetstranslateUnfoldon copy/cut, preventing stale state when pasting duplicated voice blocks.web-editor/dist/tiptap-editor.js(qrc points to dist).Why
The Tiptap editor (debug-only) only changed the background color on theme switch and lacked voice-block copy-clear behavior, leaving host interactions inconsistent with the legacy editor. This brings the frontend to parity for theme, voice-block copy, and context-menu detection.
How verified
npm test— 158 pass, 0 fail (including new theme-variable and copy-clear tests).npm run buildsucceeds; dist bundle regenerated and includes all changes.Summary by Sourcery
Align the Tiptap editor frontend with the host theme and interaction model by wiring new CSS variables into toolbar and image menus, improving voice block copy behavior and metadata exposure for context menus, adding scroll reporting and editor exposure for host integrations, and extending tests to cover these new behaviors.
New Features:
Bug Fixes:
Enhancements:
Tests: