Closed ju-ki closed 1 month ago
この変更は、フロントエンドのエディタ機能を強化し、URLの検証、リンク生成、自動リンク機能を追加します。新たにRadix UIのポップオーバーコンポーネントも導入され、ユーザーインターフェースの操作性が向上しています。これにより、ユーザーはリンクを簡単に挿入でき、全体的な体験が向上します。
ファイル | 変更の概要 |
---|---|
frontend/package.json | @radix-ui/react-popover を新しい依存関係として追加。 |
frontend/src/components/Posts/Card/Editor/Util/index.ts | URL検証用のユーティリティモジュールを追加し、validateUrl 関数をエクスポート。 |
frontend/src/components/Posts/Card/Editor/index.tsx | AutoLinkNode を追加し、LinkPlugin に validateUrl プロパティを追加。新たに ClickableLinkPlugin と LexicalAutoLinkPlugin を導入。 |
frontend/src/components/ui/popover.tsx | Radix UI を利用したポップオーバーコンポーネントを新たに作成。 |
frontend/src/plugins/AutoLinkPlugin/index.tsx | LexicalAutoLinkPlugin を追加し、テキストの自動リンク機能を実装。 |
frontend/src/plugins/ClickablePlugin/index.tsx | ClickableLinkPlugin を追加し、リンククリックのインタラクションを管理。 |
frontend/src/plugins/LinkToolbarPlugin/index.tsx | LinkToolbarItem を追加し、選択したテキストをリンクに変換するUIを提供。 |
frontend/src/plugins/ToolbarPlugin/index.tsx | LinkToolbarItem を統合し、ツールバーのリンク管理機能を拡張。 |
sequenceDiagram
participant User
participant Editor
participant LinkToolbarItem
participant Popover
participant UrlValidation
User->>LinkToolbarItem: クリックしてポップオーバーを開く
LinkToolbarItem->>Popover: URL入力を表示
User->>Popover: URLを入力
Popover->>UrlValidation: 入力されたURLを検証
UrlValidation-->>Popover: 検証結果を返す
Popover->>LinkToolbarItem: 結果に基づいて処理
LinkToolbarItem->>Editor: ハイパーリンクを作成
うさぎの跳ねる、リンクの舞
新しい機能、みんなのために
ポップオーバーで、すぐにリンク!
URLを検証、エディタが喜ぶ
フロントエンドに、春が訪れた ✨
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?
@coderabbitai review
This PR is automatically created by GitHub Actions
Summary by CodeRabbit
新機能
バグ修正