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

Npm Scripts explorer, setting to run by default instead of open? #49204

Closed
albinotonnina opened this issue May 4, 2018 · 8 comments
Closed
Assignees
Labels
feature-request Request for new features or functionality verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@albinotonnina
Copy link

  • VSCode Version: 1.23.0
  • OS Version: -

Steps to Reproduce:

  1. enable with { "npm.enableScriptExplorer": true}
  2. click on a npm script

Feature request:

Similarly to this extension, would it be useful for some people to have a setting that by default, on click, run a task instead of opening it in the package.json?

Thanks!

Does this issue occur when all extensions are disabled?: Yes

@vscodebot vscodebot bot added the new release label May 4, 2018
@vscodebot
Copy link

vscodebot bot commented May 4, 2018

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@albinotonnina
Copy link
Author

Nope bot, doesn't look a dup to me but you know more 👍

@egamma
Copy link
Member

egamma commented May 7, 2018

@albinotonnina I´ve added an inline action that allows you to run a script on click (see below). I hope this covers your request, please try it in the latest insiders build.

image

@albinotonnina
Copy link
Author

albinotonnina commented May 7, 2018

Hello @egamma! Thank you!
This solves the issue but I like #49282 even more :)
To be honest with you I don't know why the default click action should be 'open' in that panel.

@egamma
Copy link
Member

egamma commented May 8, 2018

To be honest with you I don't know why the default click action should be 'open' in that panel.

Initial user feedback was that it is too confusing to run a task on single click and the explorer should more behave like an outline and the single click is also consistent with the file explorer. We will also add support for a double click action and triggering a task on double click make sense to me.

The PR looks good to me.

@albinotonnina
Copy link
Author

Hello @egamma, thanks for your reply.
You would open on single click and run on dblclick? That would work I guess!
Wasn’t expecting that result from user feedback. I guess I’m used to the behaviour that the aforementioned plugin has, or webstorm.

@borgfriend
Copy link

borgfriend commented May 8, 2018

Personally I would like to run tasks via double click on a task. However I do understand that some people prefer to open the config instead, thus my PR adding it as a configuration option.

I like the idea with the "run" button at the end of the line. It is only visible when you hover over the task. This type of interaction reminds me more of the "Edit Button" from the User Settings / settings.json.

Mockup Screenshot:
2018-05-08 12_34_43-npm scripts explorer setting to run by default instead of open_ issue 49204

My suggestion would be to switch the two Buttons.
Depending on the task I would either display a "run" icon or the "debug" icon.
(if the task includes --inspect then debug as default)

With the current solution there would be no easy way to enter debug mode.
Maybe shift-lmb / ctrl-lmb on the run button to open in debug mode?

@egamma
Copy link
Member

egamma commented May 30, 2018

Added a setting npm.scriptExplorerAction that can be set to either open and run. This should address this feature request.

@egamma egamma closed this as completed May 30, 2018
@egamma egamma added this to the May 2018 milestone May 30, 2018
@sandy081 sandy081 added feature-request Request for new features or functionality verification-needed Verification of issue is requested verified Verification succeeded labels May 31, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Jul 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants