Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Keybindings not working #3190

Closed
lagerholm opened this issue Dec 14, 2021 · 5 comments · Fixed by #4081
Closed

Bug: Keybindings not working #3190

lagerholm opened this issue Dec 14, 2021 · 5 comments · Fixed by #4081
Assignees
Labels
feature-request Request for new features or functionality verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@lagerholm
Copy link

Issue Type: Bug

I'm trying out the keybindings provided by the extension but it's not working.

I have tried GitHub Pull Requests: Copy Commit Hash which gives the error:
Cannot read property 'sha' of undefined when used.

And also GitHub Pull Requests: Mark File As Viewed which gives the error:
Marked file as viewed failed: TypeError: Cannot read property 'pullRequest' of undefined

Nor sure if I'm doing anything wrong here but shouldn't it just work after being assinge a key combination?

Extension version: 0.34.0
VS Code version: Code 1.63.0 (7db1a2b88f7557e0a43fec75b6ba7e50b3e9f77e, 2021-12-07T06:26:56.179Z)
OS version: Windows_NT x64 10.0.19044
Restricted Mode: No
Remote OS version: Linux x64 5.10.60.1-microsoft-standard-WSL2
Remote OS version: Linux x64 5.10.60.1-microsoft-standard-WSL2

System Info
Item Value
CPUs Intel(R) Core(TM) i7-10700K CPU @ 3.80GHz (16 x 3792)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 31.71GB (15.49GB free)
Process Argv --crash-reporter-id 009e0e6a-4a53-4bdb-9f46-6e92241da487
Screen Reader no
VM 0%
Item Value
Remote WSL: Ubuntu
OS Linux x64 5.10.60.1-microsoft-standard-WSL2
CPUs Intel(R) Core(TM) i7-10700K CPU @ 3.80GHz (16 x 3792)
Memory (System) 15.63GB (12.20GB free)
VM 0%
Item Value
Remote WSL: Ubuntu
OS Linux x64 5.10.60.1-microsoft-standard-WSL2
CPUs Intel(R) Core(TM) i7-10700K CPU @ 3.80GHz (16 x 3792)
Memory (System) 15.63GB (12.20GB free)
VM 0%
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythontb:30283811
pythonvspyt551cf:30345471
pythonptprofiler:30281270
vshan820:30294714
vstes263cf:30335440
vscorecescf:30384386
pythondataviewer:30285071
vscod805:30301674
pythonvspyt200:30340761
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
pythonrunftest32:30373476
pythonf5test824:30373475
javagetstartedt:30391933
pythonvspyt187:30373474
vsaa593cf:30376535
pythonvs932:30410667
vscop804:30404766
vs360cf:30404996
vsrem710:30405998
vscexrecpromp3c:30407761

@lagerholm lagerholm changed the title Keybindings not working Bug: Keybindings not working Dec 14, 2021
@alexr00
Copy link
Member

alexr00 commented Dec 15, 2021

GitHub Pull Requests: Copy Commit Hash only works when you have a commit selected in the "Changes In Pull Request" view (it is hidden from the command palette because of this).

GitHub Pull Requests: Mark File As Viewed is similar. It only works when you have a file selected in the "Changes in Pull Request" view (it is also hidden from the command palette). However, this one I could see being useful if you want to mark the currently open file as viewed so I will call this a feature request.

In general, if a command is hidden from the command palette and the command is not specifically listed in documentation as being available from everywhere, then it may behave poorly when used in a keybinding.

@alexr00 alexr00 added the feature-request Request for new features or functionality label Dec 15, 2021
@lagerholm
Copy link
Author

Thanks for the clarification. The Copy Commit Hash was a bad example. Seem totally logical that it works like that.

Regarding the Mark File As Viewed I can't get it to work even though I have the file selected. It still gives the error. Maybe this is a bug?

Or is it not this you mean with

file selected in the "Changes in Pull Request" view

image

@alexr00
Copy link
Member

alexr00 commented Dec 20, 2021

For Mark File As Viewed, you must still execute the command through the tree view and not with a keybinding. The feature request is to enable marking the file as viewed with a keybinding.

@alexr00 alexr00 self-assigned this Oct 19, 2022
@alexr00 alexr00 added this to the October 2022 milestone Oct 19, 2022
alexr00 added a commit that referenced this issue Oct 19, 2022
alexr00 added a commit that referenced this issue Oct 19, 2022
@alexr00
Copy link
Member

alexr00 commented Oct 24, 2022

To verify:

  • Set a keyboard shortcut for pr.markFileAsViewed
  • Open a pull request in VS Code
  • Open a file that included in the pull request
  • Execute your keyboard shortcut and verify that the file is marked as viewed. The file should also be closed.

@alexr00 alexr00 added the verification-needed Verification of issue is requested label Oct 24, 2022
@rzhao271 rzhao271 added the verified Verification succeeded label Oct 25, 2022
@rzhao271
Copy link
Contributor

For microsoft/vscode#164641, when I go into review mode and use the keybind on the insertResource.ts file, the file is marked as viewed, but the directory is not marked as viewed. If I use my mouse, then both are marked as viewed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants