microsoft / microsoft/vscode-pull-request-github
Option to *not* close file marked as viewed via keybinding
Personne n'a encore pris cette issue.
- Langage dominant
- TypeScript
- Étoiles
- 2.6k
- Forks
- 796
- Merge moyen
- 1 j 4 h
- PR mergées (30 j)
- 46
Description
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",
}
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez par retracer la commande pr.markFileAsViewed depuis ses points d’entrée de raccourci clavier et de barre de menus de l’éditeur actif, en les comparant au comportement de l’arborescence décrit dans l’issue. Aucun fichier source ni test n’est nommé ; le travail est considéré comme terminé lorsqu’une manière acceptée d’invoquer la commande sans fermer l’éditeur actif est fournie, tout en conservant par défaut le comportement existant.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- typescript, vscode
- Domaine
- developer-experience
- Type d'issue
- Fonctionnalité
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- Calme
- Clarté
- Plutôt claire
- Accessibilité débutants
- 50/100