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

Fa/quick input box fix #2

Closed
wants to merge 1 commit into from
Closed

Conversation

FernandoAscencio
Copy link
Owner

@FernandoAscencio FernandoAscencio commented Feb 15, 2023

Not sure if this is the proper way to fix the issue, but for the moment it helps.

From my understanding the issue lies in the way each of the quick input menus are being called. Some like the commands menu call the Quick Input menu through the open('filter') as seen in the following examples:

  1. packages\core\src\browser\common-frontend-contribution.ts
  2. packages\core\src\browser\quick-input\quick-command-frontend-contribution.ts
  3. packages\plugin-ext-vscode\src\browser\plugin-vscode-commands-contribution.ts

As far as could tell, this is the main reason the quick input menu 'focuses' on the first option after a small amount of time. Thus, on Enter the first option is selected.

Other files call the showQuickPick<>() directly and open the Quick Input menu that way. Bypassing the open() function somehow. One example, and probably the most important one is packages\git\src\browser\git-quick-open-service.ts. Specifically the checkout() function which is called when the menu in question is opened.

What it does

This commit intends to close this issue using existing architecture.

QuickInputFallbackTest

How to test

Test is highlighted in the issue linked.

  1. Open Theia with git extension enabled.
  2. Click the branch name on the status bar.
  3. Press enter.

The first item should be highlighted.

Review checklist

Reminder for reviewers

This is the first solution step. Might be scrapped.

Signed-off-by: FernandoAScencio <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

QuickInput is not picking the first element as a fallback on Enter
1 participant