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

未關閉 適合新手
#40,367 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
2/5
預估耗時
1-3 小時
新手友好度
76/100
Issue 類型
缺陷
描述清晰度
描述清楚
活躍度
活躍
技術堆疊
react, typescript
領域
frontend

研究方向

兩個 handler 都位於 apps/web/src/components/Sidebar.tsx:先讀第 1580-1590 行的 thread-list 切換邏輯,因為它在非 macOS 上已經根據 metaKey 和 ctrlKey 分支,再讀第 3031-3040 行只檢查 shiftKey 的 project filter 點擊 handler。把同樣的修飾鍵檢查複製到 project filter 中,使 ⌘/Ctrl-click 在現有選取範圍中切換某個 project 並保持選單開啟,而一般 click 仍作為替換選取。完成意味著重現 issue 中的三步場景(兩次 shift-click,然後 ⌘-click 第三個)會顯示選取三個 project 且選單仍開啟,第二次 ⌘-click 只移除那一個;在 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 分鐘
30 天內合併 PR
466

環境準備

在 Codespaces 中開啟

在瀏覽器裡用你自己的 GitHub 帳號啟動這個專案的開發容器。

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

pingdotgg/t3code 的其他 Issue

查看 pingdotgg/t3code 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。