Open ju-ki opened 1 month ago
@coderabbitai review
この変更は、フロントエンドのパッケージに新しい依存関係を追加し、テキストエディタの機能を強化する複数のコンポーネントを導入します。特に、コードブロックの操作やユーザーインターフェースの改善に焦点を当て、ユーザーがコードを簡単にコピーしたり、リストの書式を設定したりできるようにします。
ファイルパス | 変更の概要 |
---|---|
frontend/package.json | 新しい依存関係(@emotion/react、@mui/material、lodashなど)を追加し、型定義も含める。 |
frontend/src/components/Posts/Card/Editor/CopyButton/index.tsx | ユーザーがコードをクリップボードにコピーできる新しいCopyButtonコンポーネントを追加。 |
frontend/src/components/Posts/Card/Editor/Theme/index.tsx | エディタテーマのコードプロパティの背景色を変更(ライトモードとダークモード)。 |
frontend/src/components/Posts/Card/Editor/index.tsx | LexicalComposerに新しいノードを追加し、エディタの機能を向上させる。 |
frontend/src/plugins/CodeBlockPlugin/index.tsx | コードブロックに対するコンテキストメニューを表示するCodeBlockPluginを実装。 |
frontend/src/plugins/CodeBlockPlugin/util.ts | 関数のデバウンス機能を提供するuseDebounceカスタムフックを追加。 |
frontend/src/plugins/ToolbarPlugin/index.tsx | リストとコードブロックの書式設定機能を追加。新しいコマンドを実装し、インターフェースを向上させる。 |
sequenceDiagram
participant User
participant Editor
participant Clipboard
User->>Editor: コードを選択
User->>Editor: CopyButtonをクリック
Editor->>Clipboard: コードをコピー
Clipboard-->>User: コードがクリップボードに保存されました
🐰 新しい機能が追加されて、うれしいな!
コードをコピーして、リストも作れるよ!
背景が変わって、見た目も鮮やか、
うさぎもワクワク、楽しい毎日さ!
さあ、一緒にエディタを楽しもう! 🐇✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
フロントのテストが少し壊れたので手動作成
Summary by CodeRabbit
新機能
CopyButton
コンポーネントを追加しました。ToolbarPlugin
を強化しました。CodeBlockPlugin
を実装しました。スタイル
依存関係の更新