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

Fix missing options related to 'Tasks' #12507

Merged
merged 1 commit into from
May 12, 2023
Merged

Conversation

alvsan09
Copy link
Contributor

@alvsan09 alvsan09 commented May 9, 2023

What it does

Fixes: #12455

The following user options were added:

When selecting Terminal-> Run Task...

  • Display a + Configure Task entry when no tasks are configured (above contributed items)
  • Add Show All Tasks... entry at the bottom of the list of contributed tasks.
  • Improve ordering of entries (in a multiroot, sort by root then label)
  • Add Go back ↩ option from second level picks.

When selecting Terminal-> Configure Tasks...

  • Add missing plugin provided entries with the scope workspace
  • Order by scope, then by task label.

How to test

Prerequisites:

  1. Install Gulp CLI (Used by the Gulp builtin extension)

npm install gulp-cli -g

  1. Install Jake CLI (Optionally, Used by the Jake builtin extension)

npm install -g jake

  1. Activate Auto Detect preference for Gulp to on
    From the:
    Command palette -> type 'open user settings' -> click and then -> Navigate to (Extensions -> Gulp) and change 'Auto Detect' to 'on'

  2. Activate Auto Detect preference for Jake to on
    From the:
    Command palette -> type 'open user settings' -> click and then -> Navigate to (Extensions -> Jake) and change 'Auto Detect' to 'on'

  3. Use a clone of 'vscode' as the project to test theia with

gh repo clone microsoft/vscode

  • edit .vscode/settings.json to delete the line:
    "gulp.autoDetect": "off"
  • edit .vscode/tasks.json to remove the only "gulp" task
    this to prevent early activation of gulp.
  • Copy a valid Jakefile.js under the root folder.
    Example test content:
desc('Default Task');
task('default', function () {
 console.log('Hello, Jake!');
});

desc('Test Task');
task('test', function () {
  console.log('This is a test task.');
});

Steps to test:

  1. Testing options for Terminal-> Run Task... , + Configure task
  • Using theia, open a project folder which does not have a tasks.json file
    and has a Jakefile.js.

  • Open the Terminal-> Run Task... option, verity the option + Configure Task is present

  • When selecting the option above, provided jake tasks shall be available

  • Select a provided jake task and verify it populates the tasks.json file with it.

  1. Testing options for Terminal -> Run Task..., Show All Tasks...
    Using the same project as in the previous test
  • Select the option Terminal -> Run Task..., Show All Tasks...
  • Validate that the plugin provided jake tasks are available (alphabetically ordered)
  • Selecting an entry shall populate the configuration in the tasks.json file.
  1. Testing the Terminal-> Run Task..., select type gulp, Go back ↩
  • Validate that the gulp tasks are listed and alphabetically ordered
  • Validate that the last entry of the list is for the option Go back ↩ and that it works to go
    back to display the previous level.
  1. Repeat the steps 2 and 3 above using a multi-root workspace e.g. having theia and vscode

  2. Test Terminal-> Configure Tasks...

  • Using a single root workspace e.g. vscode, select the option Terminal-> Configure Tasks...
  • Validate that the plugin provided configurations are available e.g. jake, gulp, npm
  • Validate that the entries are sorted by scope and then by label
  1. Repeat the previous step but with a multi-root project e.g. theia and vscode

See test example video (Run Task):
https://github.com/eclipse-theia/theia/assets/76971376/bab18c32-4557-4d8f-ae0b-36fe987bbb6f

See test example video (Configure Tasks...)
https://github.com/eclipse-theia/theia/assets/76971376/d1340c58-b7c2-4618-a7f7-1bf8ca1fbec7

Review checklist

Reminder for reviewers

@alvsan09 alvsan09 added the tasks issues related to the task system label May 10, 2023
@vince-fugnitto vince-fugnitto self-requested a review May 11, 2023 12:30
Fixes: #12455

The following user options were added:

When selecting `Terminal-> Run Task...`
* Display a `+ Configure Task` entry when no tasks are configured
  (above contributed items)
* Add Show `All Tasks...` entry at the bottom of the list of
  contributed tasks.
* Improve ordering of entries (in a `multiroot`, sort by root then label)
* Add `Go back ↩` option from second level picks.

When selecting `Terminal-> Configure Tasks...`
* Add missing plugin provided entries with the scope `workspace`
* Order by scope, then by task label.

Signed-off-by: Alvaro Sanchez-Leon <alvaro.sanchez-leon@ericsson.com>
@alvsan09
Copy link
Contributor Author

Last change was a re-base to latest master and addressing an offline comment from @vince-fugnitto i.e.

label: `$(plus) ${CONFIGURE_A_TASK}`,

Copy link
Member

@vince-fugnitto vince-fugnitto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@alvsan09 alvsan09 merged commit 9525159 into master May 12, 2023
@alvsan09 alvsan09 deleted the asl/add-task-options branch May 12, 2023 13:15
@github-actions github-actions bot added this to the 1.38.0 milestone May 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tasks issues related to the task system
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Missing options related to 'Tasks'
2 participants