aspnet / Tooling

Issue tracker and info on Visual Studio tooling for ASP.NET
Other
256 stars 124 forks source link

Task Runner Explorer: new tab not being opened #926

Open scottaddie opened 7 years ago

scottaddie commented 7 years ago

I'm using VS 2015 Update 3 with the Bundler & Minifier and NPM Task Runner extensions installed. Here are the steps to reproduce:

  1. Create a new ASP.NET Core Web Application (targeting .NET Core).
  2. Add a package.json file to the project root with the following contents:
    {
    "version": "1.0.0",
    "name": "asp.net",
    "private": true,
    "dependencies": {
    "@angular/common": "^2.4.1",
    "@angular/compiler": "~2.4.1",
    "@angular/core": "~2.4.1",
    "@angular/forms": "~2.4.1",
    "rxjs": "5.0.2",
    "zone.js": "0.7.4"
    }
    }
  3. Open Task Runner Explorer, and locate the bundleconfig.json node. Run its JavaScript --> wwwroot/js/site.min.js task. Notice that a new tab titled "wwwroot/js/site.min.js" is created.
  4. In Task Runner Explorer, locate the package.json node. Run its install task. Notice that the tab previously called "wwwroot/js/site.min.js" has been renamed to "install". untitled

This behavior is very confusing to the user. A new tab should've been created in step 4 above, rather than renaming the existing tab.

mlorbetske commented 7 years ago

@madskristensen thoughts?

madskristensen commented 7 years ago

I guess it makes sense that each provider would open its own tabs, but a single provider can open multiple tabs if a task is already being executed. Wouldn't that be equally confusing @scottaddie ?

scottaddie commented 7 years ago

I would expect each distinct provider to open its own tabs. For example, NPM Task Runner should never write to a tab created by Bundler & Minifier. Also, it does make sense that a single provider can open multiple tabs if a task is running. We see that behavior today when there's a Gulp "watch" task running while another distinct Gulp task is launched.

When running tasks in an ad-hoc manner (as was done in repro steps 3 & 4 above), the multiple tabs feature is useful. If, on the other hand, my tasks are only ever triggered from Visual Studio events (e.g., Before Build), I agree that multiple tabs could cause confusion. What are your thoughts on adding a setting in Tools --> Options or elsewhere for controlling the tab spawn behavior?

madskristensen commented 7 years ago

I don't think we should hide it in Tools -> Options but just make it default behavior. We could potentially add the provider icon on each tab to make it more visible what opened the tab. Makes sense?

scottaddie commented 7 years ago

I like it! That makes a lot more sense than how things work today.

madskristensen commented 7 years ago

TFS User Story # 364191

pavel-agarkov commented 6 years ago

Hello. I believe there was an option to always open a new task on a new tab. But then it gone. At least I can't find it any more. Now I fined myself constantly closing task tab before running it again since it is difficult to find the beginning of a task when it produces a lot of output or it can overflow. And if I need to compare results I have to copy output to the file before closing the tab... Please bring this option back. Also buffer size option would be great. Thank you.

barrytang commented 6 years ago

To report new issues, use the Report a Problem tool. The GitHub Issue Tracker for the aspnet/Tooling repo is now deprecated in favor of the Report a Problem tool.

If you encounter a problem with Visual Studio, we want to know about it so that we can diagnose and fix it. By using the Report a Problem tool, you can collect detailed information about the problem, and send it to Microsoft with just a few button clicks. See here for more details.

barrytang commented 6 years ago

Adding @raquelsa and @jodavis.