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

[task] update 'run selected text' isVisible and isEnabled handling #6018

Merged
merged 1 commit into from
Aug 26, 2019

Conversation

vince-fugnitto
Copy link
Member

@vince-fugnitto vince-fugnitto commented Aug 22, 2019

What it does

Fixes #6017

  • previously the command Task: Run Selected Text was always
    enabled and visible which lead to a poor user experience when
    no editor was currently opened. The handling for isVisible and
    isEnabled was updated to determine if an editor is currently opened
    using the EditorManager.

How to test

  • open a workspace
  • with no file opened, click the Task menu and verify if the menu item Run Selected Text is disabled
  • open an editor
  • click the Task menu and verify that the menu item Run Selected Text is enabled
  • execute the command successfully

Review checklist

Reminder for reviewers

Signed-off-by: Vincent Fugnitto [email protected]

@vince-fugnitto vince-fugnitto added enhancement issues that are enhancements to current functionality - nice to haves tasks issues related to the task system labels Aug 22, 2019
@vince-fugnitto vince-fugnitto self-assigned this Aug 22, 2019
@akosyakov akosyakov requested a review from a team August 23, 2019 06:39
Copy link
Contributor

@RomanNikitenko RomanNikitenko left a comment

Choose a reason for hiding this comment

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

I tested the changes, it works as described in the description of the PR:

  • Run Selected Text is disabled if I don't have open an editor
  • Run Selected Text is enabled and I can run some command if I have open an editor

I faced with another problem when I tested the changes, I checked it for master branch and created the separated issue: #6027 because it's not related to the PR changes.

@vince-fugnitto
Copy link
Member Author

@RomanNikitenko I updated the PR with a fix for #6027, can you confirm if it works correctly now for you?

@vince-fugnitto
Copy link
Member Author

I've tested more and it doesn't look like the bug is completely fixed yet.

Fixes #6017

- previously the command `Task: Run Selected Text` was always
enabled and visible which lead to a poor user experience when
no editor was currently opened. The handling for `isVisible` and
`isEnabled` was updated to determine if an editor is currently opened
using the `EditorManager`.

Signed-off-by: Vincent Fugnitto <[email protected]>
@vince-fugnitto
Copy link
Member Author

I'll see if I can fix #6027 as a separate pr and find the root cause of the issue.

@vince-fugnitto vince-fugnitto merged commit 530eb75 into master Aug 26, 2019
@vince-fugnitto vince-fugnitto deleted the vf/GH-6017 branch August 26, 2019 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement issues that are enhancements to current functionality - nice to haves tasks issues related to the task system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[task] add better handling for 'run selected text' command
2 participants