Skip to content

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

Closed

Description

  • 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

Activity

  1. vscodebot commented on May 4, 2018

    @vscodebot

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

  2. albinotonnina commented on May 4, 2018

    @albinotonnina
    Author

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

  3. egamma commented on May 7, 2018

    @egamma
    Member

    Albino Tonnina (@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

  4. albinotonnina commented on May 7, 2018

    @albinotonnina
    Author

    Hello Erich Gamma (@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.

  5. egamma commented on May 8, 2018

    @egamma
    Member

    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.

  6. albinotonnina commented on May 8, 2018

    @albinotonnina
    Author

    Hello Erich Gamma (@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.

  7. borgfriend commented on May 8, 2018

    @borgfriend

    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?

  8. egamma commented on May 30, 2018

    @egamma
    Member

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

  9. added this to the May 2018 milestone on May 30, 2018
  10. added
    feature-request
    verification-needed
    verified
    on May 31, 2018
  11. locked and limited conversation to collaborators on Jul 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

feature-requestverification-neededverified

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions