microsoft / microsoft/vscode-pull-request-github
Option to *not* close file marked as viewed via keybinding
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- TypeScript
- Estrellas
- 2.6k
- Forks
- 796
- Merge medio
- 1 d 4 h
- PR fusionados (30 d)
- 46
Descripción
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",
}
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Empieza siguiendo el comando pr.markFileAsViewed desde sus puntos de entrada de asignación de teclas y de la barra de menús del editor activo, comparándolos con el comportamiento de la vista de árbol descrito en el issue. No se nombran archivos fuente ni pruebas; se considera completado cuando se proporcione una forma aceptada de invocar el comando sin cerrar el editor activo, preservando el comportamiento existente de forma predeterminada.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- typescript, vscode
- Área
- developer-experience
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Tranquilo
- Claridad
- Bastante claro
- Aptitud para principiantes
- 50/100