-
Notifications
You must be signed in to change notification settings - Fork 346
feat: BaseTextFieldにコンテキストメニューを追加 #2716
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
feat: BaseTextFieldにコンテキストメニューを追加 #2716
Conversation
This reverts commit 941ec5f.
|
🚀 プレビュー用ページを作成しました 🚀 更新時点でのコミットハッシュ: |
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.
Pull Request Overview
This PR implements a context menu system for BaseTextField components, allowing users to access cut, copy, paste, and select all operations via right-click. The implementation also switches from using HTML input elements to contenteditable div elements to better support context menu interactions.
Reviewed Changes
Copilot reviewed 7 out of 10 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| BaseTextField.vue | Converted from input element to contenteditable div with custom context menu implementation |
| BaseContextMenu.vue | New reusable context menu wrapper component |
| BaseContextMenuItem.vue | New component for individual context menu items with keyboard shortcuts |
| BaseContextMenuSeparator.vue | New component for visual separators in context menus |
| hotkeyPlugin.ts | Extended hotkey detection to include plaintext-only contenteditable elements |
| PresetManageDialog.vue | Updated to work with new div-based text input and added allowFocusOutside |
| EngineManageDialog.vue | Added allowFocusOutside property for dialog compatibility |
sevenc-nanashi
left a comment
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.
|
@sevenc-nanashi ping |
sevenc-nanashi
left a comment
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.
レビュー遅れました、申し訳ないです
| const input = getInputOrThrow(); | ||
| if (input.firstChild == null) { | ||
| throw new Error("input.firstChild is null"); |
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.
空の状態で右クリックするとinput.firstChild == nullのブランチに行っちゃうようです。
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.
firstChildがない場合にinput自体を用いるように修正しました。
Co-authored-by: Nanashi. <[email protected]>
Co-authored-by: Nanashi. <[email protected]>
Co-authored-by: Nanashi. <[email protected]>
sevenc-nanashi
left a comment
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.
LGTM!テストだけ追加してマージします。
| // @ts-expect-error modelValueがreadonlyだが、動いているかつ周りに影響がないため無視する | ||
| // TODO: ちゃんとした方法があればそちらに変更する |
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.
📝 調べてみたけど手っ取り早い方法はなさそうでした!
https://chatgpt.com/share/68b7337d-58bc-8008-9b3f-cb6bdb3caefa
一番下で提案されてる、Story.loaders使う形が一番まだマシそう。
それでもだいぶ手続き大変だけど・・・。




内容
BaseTextFieldにコンテキストメニューを追加します。以下の内容を行います。
スクリーンショット・動画など