refactor(UI): The rich text editing box uses the tiptap component#1139
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the rich text editing box in the merge request detail page to use the tiptap-based SimpleNoteContent component, replacing the previous rich editor implementation.
- Replaces the old RichEditor component with the new SimpleNoteContent component.
- Updates comment submission logic to retrieve HTML from the tiptap editor and clear the editor via a ref after successful submission.
- Adopts new loading states on action buttons and updates markdown rendering in comment display.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| moon/apps/web/pages/[org]/mr/[id].tsx | Replaced RichEditor and associated state with SimpleNoteContent and a ref‑based approach for comment submission. |
| moon/apps/web/components/SimpleNoteEditor/useSimpleNoteEditor.tsx | Introduced a new hook wrapping tiptap editor configuration with updated extension handling. |
| moon/apps/web/components/SimpleNoteEditor/SimpleNoteContent.tsx | Added a new component for note editing with support for file drops, attachments, and hotkeys. |
| moon/apps/web/components/MrView/MRComment.tsx | Updated comment rendering logic to use RichTextRenderer with markdown extensions. |
Comments suppressed due to low confidence (2)
moon/apps/web/components/MrView/MRComment.tsx:66
- [nitpick] Consider renaming 'extensions' to a more descriptive identifier (e.g., 'markdownExtensions') to better communicate its purpose in the markdown rendering flow.
const extensions = useMemo(() => getMarkdownExtensions({ linkUnfurl: {} }), [])
moon/apps/web/pages/[org]/mr/[id].tsx:90
- [nitpick] Ensure that the indentation and brace structure within the send_comment function is clear, matching the team’s style guidelines to enhance readability and ease future maintenance.
const send_comment = () => {
benjamin-747
approved these changes
Jun 18, 2025
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.
No description provided.