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

Context menu for file explorer does not respect Print item position setting #208

Closed
nopeless opened this issue May 10, 2023 · 7 comments · Fixed by #210
Closed

Context menu for file explorer does not respect Print item position setting #208

nopeless opened this issue May 10, 2023 · 7 comments · Fixed by #210
Assignees
Labels
enhancement New feature or request

Comments

@nopeless
Copy link

I have checked both user settings and workspace settings, both are set to bottom, but print still shows on top. Is this only affecting me?

@PeterWone
Copy link
Collaborator

PeterWone commented May 10, 2023

Thank you for reporting this. As menu position is entirely done with settings and an expression in package.json it is impossible to catch in with a unit test.

It used to work, but I can reproduce the problem so I suppose the way VS Code handles this must have changed. I'll look into it.

@PeterWone
Copy link
Collaborator

Actually no, it does work... on my system, at least. Read on, and then check your system to see whether this is the problem.

So once upon a time there was only the editor context menu. And that's what the setting controls.
image

Then features were added and there was also a context menu for the file explorer pane. That menu doesn't take any notice of the position setting.

If you think that the setting needs to be renamed slightly and both menus should respect it, then you'll be pleased to hear that I agree with you. Of course, if it's not working in the editor menu that's another matter and we'll look into it.

@nopeless
Copy link
Author

Ah, i am referring to the file system context menu

I keep hitting print when I want to create a new file so it has been bugging me a lot.

What would be a solution?

@PeterWone
Copy link
Collaborator

You could hack your package.json file and make it depend on the same setting. I'm at work right now, I'll sort something out this evening

@PeterWone
Copy link
Collaborator

PeterWone commented May 11, 2023

Probably the quickest thing would be to disable Print in the extensions list, enable/disable is pretty quick. The other thing that might ease your pain is using Ctrl+N to create a file instead of using the mouse.

@PeterWone
Copy link
Collaborator

This change to package.json will turn up in the next release, but you can patch your installation by editing the file as shown. The left-hand side is what you'll have, the right-hand side shows how it should be when you're finished. Assuming you are using Windows you will find the file in %userprofile%\.vscode\extensions\pdconsec.vscode-print-0.11.1

image

Here it is as text so you can copy and paste insteading of typing all that.

				{
					"when": "ecmPrint == Top",
					"command": "vsc-print.print",
					"group": "navigation"
				},
				{
					"when": "ecmPrint == Bottom",
					"command": "vsc-print.print",
					"group": "Z_commands"
				}

Once you've applied the patch you will find that the file explorer context menu also respects the setting.

image

@nopeless
Copy link
Author

Thanks 👍

@PeterWone PeterWone self-assigned this May 11, 2023
@PeterWone PeterWone added the enhancement New feature or request label May 11, 2023
@PeterWone PeterWone changed the title print.editorContextMenuItemPosition does not seem to work Context menu for file explorer does not respect Print item position setting May 11, 2023
@PeterWone PeterWone linked a pull request May 11, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants