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

feat(layout): keyboard navigation between sidebar, pane and editors #1924

Merged
merged 5 commits into from
Jun 13, 2020

Conversation

glennsl
Copy link
Member

@glennsl glennsl commented Jun 12, 2020

This adds keyboard navigation between editors, the sidebar and the bottom pane as an extension of the existing window movement keybindings. We lack good visual indication of where the keyboard focus actually is, but otherwise it works great!

Adding proper indication of focus will require some design work and is too big to in scope for this PR I think, but let me know if you think it should be added before merging.

@glennsl glennsl requested a review from bryphe June 12, 2020 17:09
Comment on lines +3 to +6
type panel =
| Left
| Center(int)
| Bottom;
Copy link
Member Author

Choose a reason for hiding this comment

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

This can easily be extended with Top and Right as well, but I didn't want to take that into account everywhere as long as we don't use it.

@glennsl
Copy link
Member Author

glennsl commented Jun 12, 2020

/azp run

@bryphe
Copy link
Member

bryphe commented Jun 13, 2020

I noticed one bug - mentioned it in a code comment.

Are there keybindings that work in the file explorer for moving the selection up/down? I thought we did have a concept of focus - and the arrow keys worked - but perhaps I'm mistaken.

@glennsl
Copy link
Member Author

glennsl commented Jun 13, 2020

Are there keybindings that work in the file explorer for moving the selection up/down? I thought we did have a concept of focus - and the arrow keys worked - but perhaps I'm mistaken.

Yeah, up, down and enter are the only keybindings implemented so far. You need to have an existing focus though. (Edit: Oh, and it seems like the focus isn't set tot he current file if you open it without using the file explorer. I'll fix that in a separate PR)

Now that all the infrastructure is in place, we ought to move the file explorer to a feature project, add commands for navigation and keybindings using those commands. Should be pretty straight-forward at this point I think.

@glennsl glennsl merged commit 9751ce1 into onivim:master Jun 13, 2020
@glennsl glennsl deleted the feat/layout/panel-navigation branch June 13, 2020 11:51
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.

2 participants