microsoft / microsoft/vscode-pull-request-github
Option to *not* close file marked as viewed via keybinding
まだ誰も着手していません。
- 主要言語
- TypeScript
- スター
- 2.6k
- フォーク
- 796
- 平均マージ
- 1日 4時間
- マージ済み PR(30日)
- 46
説明
When you mark a file as viewed through the active editor menu bar or through a keybinding, the file will close. When you mark it as viewed through the tree view then it will not close. If a setting is needed I'll add one, but my hope is that this behavior is better for almost everyone.
Originally posted by @alexr00 in https://github.com/microsoft/vscode-pull-request-github/issues/3513#issuecomment-1284469843
Per this comment, it seems the default behavior for keybindings (or editor menu bar) calling pr.markFileAsViewed is to close the file, but for my workflow I'd prefer it didn't. Is it possible to add either a config setting, new command, or allow "args" in the keybinding to disable closing the active editor when this command is executed?
If it would be accepted, I could also attempt a PR for whichever of those options seems preferable. Thanks!
Edit: as a workaround (at least for keybindings) I found this seems to work okay - although the visual effect of closing and immediately reopening the editor is a bit jarring:
{
"key": "alt+j",
"command": "runCommands",
"args": {
"commands": [
"pr.markFileAsViewed",
"workbench.action.reopenClosedEditor",
]
},
"when": "editorTextFocus && github:inReviewMode && isInDiffEditor",
}
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、アクティブなエディターのキーバインドとメニューバーのエントリーポイントから pr.markFileAsViewed コマンドをたどり、issue で説明されているツリービューの動作と比較します。ソースファイルやテストは指定されていません。アクティブなエディターを閉じずにコマンドを呼び出す、受け入れ可能な方法を提供し、デフォルトでは既存の動作を維持できれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- typescript, vscode
- 領域
- developer-experience
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 50/100