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

quickpick didn't open with 1 item #6050

Closed
i053322 opened this issue Aug 27, 2019 · 8 comments · Fixed by #6059
Closed

quickpick didn't open with 1 item #6050

i053322 opened this issue Aug 27, 2019 · 8 comments · Fixed by #6059
Assignees
Labels
bug bugs found in the application help wanted issues meant to be picked up, require help vscode issues related to VSCode compatibility
Milestone

Comments

@i053322
Copy link

i053322 commented Aug 27, 2019

Description

In the new version of theia ( theiaide/theia-full:next ) when I open quickpick with one item it doesn't show the item.
It works with multi items.

Reproduction Steps

I created vsix from github ( with 1 item)
https://github.com/i053322/quickpickexample
Load the VSIX and press F1 and choose Hello World

OS and Theia version:
master

Diagnostics:
I checked it on version 0.9.0 and it worked.
It it also worked on VS CODE

@akosyakov akosyakov added bug bugs found in the application help wanted issues meant to be picked up, require help vscode issues related to VSCode compatibility labels Aug 27, 2019
@akosyakov
Copy link
Member

cc @JPinkney @vinokurig

@vince-fugnitto
Copy link
Member

vince-fugnitto commented Aug 27, 2019

The same is true for the quickPick in the application.
If the quickPick only has one item, the item is simply executed instead of displaying the dropdown.

https://github.com/theia-ide/theia/blob/85b75768f702656db4ee8ff6eaad303be8102643/packages/core/src/browser/quick-open/quick-pick-service-impl.ts#L41-L43

Update
Removing this part of the code makes the quickPick [work] with a single item. Is this something we want to remove to align with VSCode?

@akosyakov
Copy link
Member

akosyakov commented Aug 27, 2019

I checked it on version 0.9.0 and it worked.

@vince-fugnitto so it is not true? If it is not a regression then it is fine not to fix for 0.10.0

Removing this part of the code makes the quickPick [work] with a single item. Is this something we want to remove to align with VSCode?

For VS Code extensions APIs should work like in VS Code. In Theia core it can behave differently, maybe we need an option to align the plugin system behaviour with VS Code. We should look at all clients outside of the plugin system and see for them what we want. I won't be surprised that it is different in VS Code as well for VS Code extensions and internal clients.

@akosyakov akosyakov added this to the 0.10.0 milestone Aug 27, 2019
@vince-fugnitto
Copy link
Member

I checked it on version 0.9.0 and it worked.

@vince-fugnitto so it is not true? If it is not a regression then it is fine not to fix for 0.10.0

I believe the regression comes from the fact that we now call the quickPick from core in the plugin-ext.

https://github.com/theia-ide/theia/blob/85b75768f702656db4ee8ff6eaad303be8102643/packages/plugin-ext/src/main/browser/quick-open-main.ts#L284-L296

1bbdf7c#diff-5b814eef870b0daed9365c04d6aaf9abR266

@akosyakov
Copy link
Member

@vince-fugnitto I see, actually it sounds strange now that on show we don't show for a single item, but changing it now we break other clients like git extension.

I wonder can we add a flag like runIfSingle which is true by default, but set to false for the plugin system call? Could you do it?

@vince-fugnitto
Copy link
Member

@vince-fugnitto I see, actually it sounds strange now that on show we don't show for a single item, but changing it now we break other clients like git extension.

I wonder can we add a flag like runIfSingle which is true by default, but set to false for the plugin system call? Could you do it?

Sure, the flag should be enough I believe :)

@vince-fugnitto vince-fugnitto self-assigned this Aug 28, 2019
vince-fugnitto added a commit that referenced this issue Aug 28, 2019
…item

Fixes #6050

- fixes issue where `quick-pick` which were initiated by the plugins was
not displayed when it only contains a single item. The fix is to include
a new flag `runIfSingle` which is used to determine if the quick-pick
should display or execute the item.
- The default value for `runIfSingle` is set to `true`.
- The `plugin-ext` sets the `runIfSingle` to `false` so it always displays
the quick-pick regardless if an single item is present. This behavior is aligned
with previous versions of Theia and VSCode.

Signed-off-by: Vincent Fugnitto <vincent.fugnitto@ericsson.com>
vince-fugnitto added a commit that referenced this issue Aug 28, 2019
…item

Fixes #6050

- fixes issue where `quick-pick` which were initiated by the plugins was
not displayed when it only contains a single item. The fix is to include
a new flag `runIfSingle` which is used to determine if the quick-pick
should display or execute the item.
- The default value for `runIfSingle` is set to `true`.
- The `plugin-ext` sets the `runIfSingle` to `false` so it always displays
the quick-pick regardless if an single item is present. This behavior is aligned
with previous versions of Theia and VSCode.

Signed-off-by: Vincent Fugnitto <vincent.fugnitto@ericsson.com>
vince-fugnitto added a commit that referenced this issue Aug 29, 2019
…item

Fixes #6050

- fixes issue where `quick-pick` which were initiated by the plugins was
not displayed when it only contains a single item. The fix is to include
a new flag `runIfSingle` which is used to determine if the quick-pick
should display or execute the item.
- The default value for `runIfSingle` is set to `true`.
- The `plugin-ext` sets the `runIfSingle` to `false` so it always displays
the quick-pick regardless if an single item is present. This behavior is aligned
with previous versions of Theia and VSCode.

Signed-off-by: Vincent Fugnitto <vincent.fugnitto@ericsson.com>
@offer8
Copy link

offer8 commented Aug 31, 2019

@vince-fugnitto will it be part of next theia v0.10.0 release ?

@vince-fugnitto
Copy link
Member

@offer8 yes it's included in last Thursday's release of v0.10.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs found in the application help wanted issues meant to be picked up, require help vscode issues related to VSCode compatibility
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants