Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

Add keyboard support to Connections popover #651

Merged
merged 3 commits into from
Mar 8, 2022

Conversation

gzdunek
Copy link
Contributor

@gzdunek gzdunek commented Mar 7, 2022

KeyboardArrowsNavigation has been implemented using context to allow iterating over the items which are placed on different DOM levels. It will be useful for example in Identity popup where on a single list we will have FilterableList items and Logout item.

| <searchbox>
| Cluster 1
| Cluster 2              <--- FilterableList
| Cluster 3
-----------
Logout                   <---- separate item

@gzdunek gzdunek requested a review from ravicious March 7, 2022 17:31
Copy link
Member

@ravicious ravicious left a comment

Choose a reason for hiding this comment

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

Interesting approach with addItem in that hook, I think it's the first time I'm seeing something like this!

@gzdunek gzdunek force-pushed the gzdunek/add-connections-keyboard-support branch from 09fbf0e to 88baa83 Compare March 8, 2022 16:30
@gzdunek gzdunek merged commit 1dadd05 into master Mar 8, 2022
@gzdunek gzdunek deleted the gzdunek/add-connections-keyboard-support branch March 8, 2022 16:43
ravicious added a commit that referenced this pull request Apr 27, 2022
* Add more tests to Teleterm (#601)

* add more tests to Teleterm

* Update command for generating gRPC files for Teleterm

* Add cluster context switching (#624)

* Add connections switcher (#647)

* Add keyboard support to `Connections` popover (#651)

* Add clusters picker (#668)

* Improve identity picker (#670)

* Reformat commandLauncher.ts

* Remove command palette commands from command launcher

The way their `run` function works conflicts with the new implementation
(it directly changes quickInputService's state), so we remove that in
this commit to have less to deal with in upcoming commits.

* Show autocomplete suggestions in command bar

This commit does not support actually choosing any suggestion yet, just
showing them in the UI.

* Remove code related to empty command bar item

Our new code isn't going to show anything when there are no matches.

* Remove old pickers, rename Item to Suggestion

* Autocomplete commands and ssh logins

* Ignore case for autocomplete

* Automatically append @ after ssh login suggestion

* QuickInputService.getAutocomplete: Return no-match on empty suggestions

This required adding all those mocks to the tests so that the returned
suggestions in some of the tests are not empty.

* Autocomplete ssh hostnames

* Open command bar commands in new local shell

* Append space after picking command suggestion

* Adjust how showing & hiding autocomplete works in command bar

1. Pressing Esc while suggestions are shown should first close the suggestions
and the second press should actually exit the input.

2. Picking a suggestion should close the autocomplete if we didn't append
anything to the token (see comment for details).

3. Typing something in the command bar should always show the autocomplete
in case there are suggestions to show.

Also remove unused call to setInputValue.

* Fix opening new terminal when there's no active document

* useQuickInput: Rename serviceQuickInput to quickInputService

* Include command to run in AutocompleteResult

* Create DocumentTshNode after executing "tsh ssh" in command bar

* Update teleterm styles (#674)

* Remove leftover cruft from quick pickers

* Launch unsupported invocations of tsh ssh in local shell

* add simple empty state to pickers

* adjust `QuickInput` to match designs

* always show active item in `QuickInputList`

* make middle part of `TopBar` central

Co-authored-by: Grzegorz Zdunek <[email protected]>
Co-authored-by: Grzegorz Zdunek <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants