Repository navigation
feat(extension): start link preview with a long press by default - #581
Conversation
New installs now start Link Preview with a left-click long press instead of Shift+click, so it works without the keyboard. Existing users keep their saved startup method. The onboarding Link Preview step now explains the gesture that matches the user's startup method (long press, click + key, or drag). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Pd1sH2SVL35AWHUxzVCAqk
The long press and drag callouts showed a keycap whose label repeated the gesture already named in the text. Show only an icon above the text instead, and shorten the Japanese text so it fits on one line. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Pd1sH2SVL35AWHUxzVCAqk
Address review findings on making long press the default: - Keep Shift+click for existing installs without saved settings, instead of saving the new long press default on update - Cancel a pending link preview hold when the pointer moves or a native drag starts, so dragging a link no longer opens a preview - Start a link preview hold only on links, so a long press on a button never re-clicks it in a preview window - Open the onboarding callout once the settings are loaded, so it never shows the default gesture to users who set another one - Expose GestureHint to tests through __test Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Pd1sH2SVL35AWHUxzVCAqk
…bels Address the second round of review findings: - Listen for mousemove and dragstart in the capture phase, so a page that stops their propagation cannot keep a hold from being cancelled - Ignore a long press on a button laid over a link (e.g. a card whose whole area is a link); only a press on the link itself counts - Show the modifier key in the onboarding callout with the same labels as the options page (e.g. "Command(⌘)" on Mac) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Pd1sH2SVL35AWHUxzVCAqk
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
レビュー結果全体として、デフォルト変更・既存ユーザー保護・誤発火対策・オンボーディング切り替えがよく整理されており、テストも追加されています。以下は確認したい点です。 要確認
軽微な指摘
セキュリティ・パフォーマンス
テスト
🤖 Generated with Claude Code |
- Drop props from the useLeftClickHold effect dependencies so the listeners are not re-registered on every render - Note that a detected hold is kept when the pointer moves afterwards - Show the Shift icon when the keyboard param falls back to Shift - Revert the formatting-only change in inputUtils.test.ts Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
レビューありがとうございます。8aab9cdf で対応しました。 対応済み
対応不要と判断
見送り
|
レビュー結果全体として、デフォルト変更に伴う誤発火対策(移動キャンセル・ 指摘事項
良い点
テスト
|
Related: #542
概要
リンクプレビューの起動方法のデフォルトを、Shift+クリックから左クリック長押しに変更する。キーボードを使わずに操作できるようにするため。
新規インストール時のデフォルト:
linkCommand.startupMethod.methodをLEFT_CLICK_HOLDに変更(長押し時間を 200-> 300ms へ変更)既存ユーザー: 影響なし。設定を保存済みのユーザーはそのまま。設定が未保存の古いユーザーも、アップデート時に
saveForExistingInstall()で Shift+クリックを固定して保存するオンボーディング(Step3 リンクプレビュー): 吹き出しの案内を、ユーザーが設定している起動方法に合わせて切り替える
Command(⌘)、Option(⌥))14 言語に文言を追加。
onboarding_step3Calloutはキー名を$key$で受け取る形に変更長押しの誤発火対策(長押しがデフォルトになるため)
a[href])だけを対象にする。ボタンを長押ししても、プレビューウィンドウでボタンがもう一度押されることはない(クリック + キーとドラッグでは、従来どおりボタンも対象)オンボーディングの吹き出しは、設定を読み込み終えてから開く
確認したこと
GestureHint、useLeftClickHoldの新しいオプション、saveForExistingInstallのテストを追加)link-preview.spec.tsが全件パス🤖 Generated with Claude Code
https://claude.ai/code/session_01Pd1sH2SVL35AWHUxzVCAqk