[Bug]: Sidebar project filter uses Shift-click instead of ⌘-click to add or remove a project

オープン 初心者向け
#40,367 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
76/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
react, typescript
領域
frontend

調査の方向性

両方のハンドラーは apps/web/src/components/Sidebar.tsx にあります。まず 1580-1590 行目のスレッド一覧のトグルを読んでください。これは macOS 以外ではすでに metaKey と ctrlKey で分岐しているためです。次に、3031-3040 行目のプロジェクトフィルターのクリックハンドラーを読んでください。こちらは shiftKey だけをチェックしています。同じ修飾キーのチェックをプロジェクトフィルターにコピーして、⌘/Ctrl クリックで既存の選択内のプロジェクトをトグルし、メニューを開いたままにする一方、通常のクリックは選択の置き換えのままにしてください。完了とは、issue の 3 段階のシナリオ(2 回の shift クリックの後、3 つ目を ⌘ クリック)を再現すると、メニューが開いたまま 3 つのプロジェクトが選択されて表示され、2 回目の ⌘ クリックでその 1 つだけが解除されることです。macOS で、可能であれば Windows/Linux でも ctrlKey の分岐を確認してください。

索引モデルが issue の本文から書いたものです。

説明

The sidebar project filter uses Shift-click to add or remove a project. The convention is ⌘-click on macOS and Ctrl-click on Windows and Linux; no desktop OS uses Shift-click for this. In T3, ⌘-click instead acts like a plain click: the filter switches to that one project and the menu closes, so the selection you had is gone.

It's one of the oldest selection conventions on the desktop:

  • ⌘-click (Ctrl-click on Windows and Linux) adds or removes a single item (Apple: Select items on Mac).
  • Shift-click selects a range.

T3's own thread list already follows it.

Steps to reproduce

  1. Open the sidebar project filter.
  2. Shift-click two projects.
  3. ⌘-click a third.

Expected: the third project is added and the menu stays open. ⌘-clicking it again removes just that project.

Actual: the filter shows only the third project and the menu closes.

Where it happens

Multi-select came in with #25284, which chose Shift-click and Shift+Enter.

Suggestion: use ⌘-click (Ctrl-click off macOS) instead of Shift-click to add or remove a project, the same check the thread list uses. Shift-click normally selects a range, which doesn't fit a menu where each project is picked on its own.

Seen in T3 Code 0.1.11 on macOS.

主要言語
TypeScript
スター
24.8k
フォーク
6.4k
平均マージ
3時間 11分
マージ済み PR(30日)
466

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

pingdotgg/t3code のほかの issue

pingdotgg/t3code の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。