-
-
Notifications
You must be signed in to change notification settings - Fork 340
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix paste issue #2748
fix paste issue #2748
Conversation
upgrade codemirror packages
Reviewer's Guide by SourceryThis PR upgrades the CodeMirror package to fix a paste issue where newlines were not being replaced with spaces. It also updates the transaction changes to replace the entire document content instead of just inserting. Sequence diagram for paste event handling in XInputComponentsequenceDiagram
actor User
participant XInput as XInputComponent
participant Editor as CodeMirror Editor
participant State as Editor State
User->>XInput: Paste text
XInput->>Editor: Handle paste event
Editor->>XInput: Trigger input.paste event
Note over XInput: Check if event is paste
XInput->>State: Create change transaction
Note over XInput: Replace newlines with spaces
State->>Editor: Apply changes
Editor->>XInput: Update view
XInput->>User: Show updated text
State diagram for paste handling in XInputComponentstateDiagram-v2
[*] --> Idle
Idle --> ProcessingPaste: Paste Event
ProcessingPaste --> ReplacingNewlines: Check Event Type
ReplacingNewlines --> ApplyingChanges: Create Transaction
ApplyingChanges --> Idle: Update View
note right of ProcessingPaste: Detect input.paste
note right of ReplacingNewlines: Replace \n with spaces
note right of ApplyingChanges: Apply to entire document
File-Level Changes
Assessment against linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @imolorhe - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Visit the preview URL for this PR (updated for commit 591c0fc): https://altair-gql--pr2748-imolorhe-fix-paste-i-i3kmynpd.web.app (expires Sun, 12 Jan 2025 21:18:44 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 02d6323d75a99e532a38922862e269d63351a6cf |
upgrade codemirror packages
Fixes
Fixes #2747
Checks
yarn test-build
Changes proposed in this pull request:
Summary by Sourcery
Upgrade CodeMirror packages to fix a paste issue where newlines were not replaced with spaces.
Bug Fixes:
Enhancements: