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 quick-open: multi-step input (#8777) #11055

Conversation

caseyflynn-google
Copy link
Contributor

@caseyflynn-google caseyflynn-google commented Apr 21, 2022

What it does

Fixes #8777 multiStep quick input flows that call createInputBox

Previously, when invoking show() a quick input box would be initially created by calling update({visible: true}) in super(), which in turn would invoke $createOrUpdate in quick-open-main and create an InputBox and corresponding session. After the session is created, show() then calls $showInputBox (An api method introduced by Theia, which is not supported by the VS Code API) which creates another InputBox, destroying the previously created session and returning no value to the caller. This leaves an orpaned InputBox on screen.

To correct this, we simply enable show to invoke $createOrUpdate which handles the quick input flow correctly, and set the proper value when received from the quick-open-main.

How to test

  1. Validate existing multi-step work flows by using the QuickInput sample
  2. Validate quick input works in multi-step flows used by VS Code Solution Explorer using the the reproduction steps provided

Review checklist

Reminder for reviewers

Fixes multiStep quick input flows that call createInputBox.

Previously, when invoking show() a quick input box would be initially
created by calling update({visible: true}) in super(), which in turn
would invoke $createOrUpdate in quick-open-main and create an InputBox
and corresponding session. After the session is created, show() then
calls $showInputBox (An api method introduced by Theia, which is not
supported by the VS Code API) which creates another InputBox, destroying
the previously created session and returning no value to the caller.
This leaves an orpaned InputBox on screen.

To correct this, we simply enable show to invoke $createOrUpdate which
handles the quick input flow correctly.

1. Validate existing multi-step work flows by using the
   [QuickInput](https://github.com/microsoft/vscode-extension-samples/tree/master/quickinput-sample)
   [sample](https://github.com/vince-fugnitto/quick-open-samples/releases/download/1.0.0/quickinput-sample-0.0.1.vsix)

2. Validate quick input works in multi-step flows used by [VS Code
   Solution Explorer](https://open-vsx.org/extension/fernandoescolar/vscode-solution-explorer)
   using the the [reproduction steps provided](eclipse-theia#8777 (comment))

- [x] As an author, I have thoroughly tested my changes and carefully followed [the review guidelines](https://github.com/eclipse-theia/theia/blob/master/doc/pull-requests.md#requesting-a-review)

- As a reviewer, I agree to review in accordance with [the review guidelines](https://github.com/eclipse-theia/theia/blob/master/doc/pull-requests.md#reviewing)

Signed-off-by: Casey Flynn <[email protected]>
@caseyflynn-google caseyflynn-google added vscode issues related to VSCode compatibility quick-open issues related to the quick-open labels Apr 21, 2022
Copy link
Contributor

@colin-grant-work colin-grant-work left a comment

Choose a reason for hiding this comment

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

I confirm that the workflows in the sample extension and the Postgress extension involving multi-step inputs now work as expected, and other plugin quick input use cases are also working well. Always nice to have a solution by subtraction :-).

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!

@caseyflynn-google caseyflynn-google merged commit 43f8e41 into eclipse-theia:master Apr 22, 2022
@colin-grant-work colin-grant-work added this to the 1.25.0 milestone Apr 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
quick-open issues related to the quick-open vscode issues related to VSCode compatibility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

quick-open: multi-step input does not work well
3 participants