microsoft / microsoft/vscode-pull-request-github
Option to *not* close file marked as viewed via keybinding
Nessuno ha ancora preso questa issue.
- Lingua principale
- TypeScript
- Stelle
- 2.6k
- Fork
- 796
- Merge medio
- 1g 4h
- PR unite (30g)
- 46
Descrizione
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",
}
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia tracciando il comando pr.markFileAsViewed dai suoi punti di ingresso nell’associazione dei tasti e nella barra dei menu dell’editor attivo, confrontandoli con il comportamento della vista ad albero descritto nell’issue. Non vengono indicati file sorgente o test; il lavoro è completato quando viene fornito un modo accettato per invocare il comando senza chiudere l’editor attivo, mantenendo per impostazione predefinita il comportamento esistente.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- typescript, vscode
- Ambito
- developer-experience
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Tranquilla
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 50/100